Skip to content

Instantly share code, notes, and snippets.

@swarut
Forked from mbinna/RunUnitTests.sh
Created October 11, 2013 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swarut/6930517 to your computer and use it in GitHub Desktop.
Save swarut/6930517 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Launch application using ios-sim and set up environment to inject test bundle into application
# Source: http://stackoverflow.com/a/12682617/504494
if [ "$RUN_APPLICATION_TESTS_WITH_IOS_SIM" = "YES" ]; then
test_bundle_path="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.$WRAPPER_EXTENSION"
environment_args="--setenv DYLD_INSERT_LIBRARIES=/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection --setenv XCInjectBundle=$test_bundle_path --setenv XCInjectBundleInto=$TEST_HOST"
ios-sim launch $(dirname $TEST_HOST) $environment_args --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