diff options
author | 2015-11-04 23:02:02 +0000 | |
---|---|---|
committer | 2015-11-05 16:50:44 +0000 | |
commit | 6153243bb95f832220d6e5fca8f62af5213a93f2 (patch) | |
tree | 596c2a00eb5820746f66cdad21331391c47d2d68 /tools | |
parent | 8a600fea7cdd7efed54ff7379ea1fea44cde6283 (diff) |
Add xcrun support to ios_test.sh so that the simulator path isn't hardcoded.
--
MOS_MIGRATED_REVID=107081793
Diffstat (limited to 'tools')
-rw-r--r-- | tools/objc/ios_test.sh.bazel_template | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/objc/ios_test.sh.bazel_template b/tools/objc/ios_test.sh.bazel_template index 4a7efb375e..2cbb44b30a 100644 --- a/tools/objc/ios_test.sh.bazel_template +++ b/tools/objc/ios_test.sh.bazel_template @@ -30,15 +30,18 @@ SIMHOME="$(mktemp -d -t simhome)" LOGFILE="$(mktemp -t logfile)" +SIMULATOR_PLATFORM="$(/usr/bin/xcrun --sdk iphonesimulator --show-sdk-platform-path)" +SIMULATOR_DEV_LIBRARY="$SIMULATOR_PLATFORM/Developer/Library" + "%(iossim_path)s" \ -u "${SIMHOME}" \ -d "%(device_type)s" \ -s "%(simulator_sdk)s" \ -t 60 \ - -e DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection \ + -e DYLD_INSERT_LIBRARIES="$SIMULATOR_DEV_LIBRARY/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection" \ -e "XCInjectBundle=${TEST_APP_DIR}" \ -e "XCInjectBundleInto=${XCTEST_APP_DIR}" \ - -e DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks \ + -e DYLD_FALLBACK_FRAMEWORK_PATH="$SIMULATOR_DEV_LIBRARY/Frameworks" \ "${XCTEST_APP_DIR}" \ -NSTreatUnknownArgumentsAsOpen NO \ -ApplePersistenceIgnoreState YES \ |