Skip to content

Instantly share code, notes, and snippets.

@netbe
Created July 9, 2013 08:30
Show Gist options
  • Save netbe/5955665 to your computer and use it in GitHub Desktop.
Save netbe/5955665 to your computer and use it in GitHub Desktop.
script to run unit test from command line xcode + custom variables passed
if [ "$RUN_UNIT_TEST_WITH_IOS_SIM" = "YES" ]; then
test_bundle_path="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.$WRAPPER_EXTENSION"
ios-sim launch "$(dirname "$TEST_HOST")" \
--setenv DYLD_INSERT_LIBRARIES=/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection \
--setenv XCInjectBundle="$test_bundle_path" \
--setenv RUN_TESTS=1 \
--setenv XCInjectBundleInto="$TEST_HOST" --args -SenTest All "$test_bundle_path"
echo "Finished running tests with ios-sim"
else
"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment