Created
November 15, 2011 00:27
-
-
Save vgrichina/1365687 to your computer and use it in GitHub Desktop.
Patch for RunPlatformUnitTests to allow running iOS application tests in Simulator using xcodebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** /Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/RunPlatformUnitTests 2011-08-30 06:49:13.000000000 +0300 | |
--- /Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/RunPlatformUnitTests.new 2011-11-15 02:21:59.000000000 +0200 | |
*************** | |
*** 90,101 **** | |
Configure_TEST_ARCHS | |
if [ "${TEST_HOST}" != "" ]; then | |
! Warning ${LINENO} "Skipping tests; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set)." | |
else | |
# If no TEST_HOST is specified, assume we're running the test bundle. | |
RunTestsForBundle "${TEST_BUNDLE_PATH}" | |
fi | |
--- 90,103 ---- | |
Configure_TEST_ARCHS | |
if [ "${TEST_HOST}" != "" ]; then | |
! #Warning ${LINENO} "Skipping tests; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set)." | |
+ export OTHER_TEST_FLAGS="-RegisterForSystemEvents" | |
+ RunTestsForApplication "${TEST_HOST}" "${TEST_BUNDLE_PATH}" | |
else | |
# If no TEST_HOST is specified, assume we're running the test bundle. | |
RunTestsForBundle "${TEST_BUNDLE_PATH}" | |
fi |
Now can be applied as:
cd /Applications/Xcode.app/Contents/Developer
patch -p2 --ignore-whitespace < /path/to/RunPlatformUnitTests.patch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can be applied using such command: