X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/90dc47c27df1983f6ebc252b0c4b94c8718fe52d..79b9da22a1f4b26279940d285c1bc28ce4e99252:/xcscripts/install-test-framework.sh?ds=inline diff --git a/xcscripts/install-test-framework.sh b/xcscripts/install-test-framework.sh new file mode 100644 index 00000000..ae4aae17 --- /dev/null +++ b/xcscripts/install-test-framework.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +framework="$1" + +found=no + +for a in ${TEST_FRAMEWORK_SEARCH_PATHS}; do + if test -d "${a}/${framework}" ; then + dst="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + mkdir -p "{dst}" || { echo "mkdir failed with: $?" ; exit 1; } + ditto "${a}/${framework}" "${dst}/${framework}" || { echo "ditto failed with: $?" ; exit 1; } + xcrun codesign -s - -f "${dst}/${framework}" || { echo "codesign failed with: $?" ; exit 1; } + + found=yes + break + fi +done + +test "X${found}" != "Xyes" && exit 1 + +exit 0