Use xcodebuild and delete "Framework Search Paths" for Xcode 7.3 to un-stall the tests

Summary:The Obj-C tests were stalling when we updated TravisCI to use the OS X image with Xcode 7.3 and iOS 9.3.

On my own MBP with Xcode 7.3 the tests stall as well. Running `./scripts/objc-test.sh` prints out a warning near the end, which says `ld` couldn't find a Frameworks folder under the iPhoneSimulator9.3 SDK directory. Indeed, this directory doesn't exist on my computer. When creating a brand new project with unit tests and UI tests, both test targets don't specify "Framework Search Paths" so I don't think we need to specify it anymore.
Closes https://github.com/facebook/react-native/pull/7168

Differential Revision: D3216524

fb-gh-sync-id: 3097bda98d78289ecdba86801bcd461f3311ac47
fbshipit-source-id: 3097bda98d78289ecdba86801bcd461f3311ac47
This commit is contained in:
James Ide
2016-04-22 23:03:12 -07:00
committed by Facebook Github Bot 2
parent 09a34f4d0f
commit 6fac6db4d4
5 changed files with 9 additions and 31 deletions

View File

@@ -26,7 +26,11 @@ trap cleanup EXIT
./packager/packager.sh --nonPersistent &
SERVER_PID=$!
xctool \
# TODO: We use xcodebuild because xctool would stall when collecting info about
# the tests before running them. Switch back when this issue with xctool has
# been resolved.
xcodebuild \
-project Examples/UIExplorer/UIExplorer.xcodeproj \
-scheme UIExplorer -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 5,OS=9.3' \
test
test \
| xcpretty

View File

@@ -151,7 +151,7 @@ if (args.indexOf('--ios') !== -1) {
// shelljs exec('', {async: true}) does not emit stdout events, so we rely on good old spawn
let packagerEnv = Object.create(process.env);
packagerEnv.REACT_NATIVE_MAX_WORKERS = 1;
const packagerProcess = spawn('npm', ['start', '--', '--non-persistent'],
const packagerProcess = spawn('npm', ['start', '--', '--non-persistent'],
{
stdio: 'inherit',
env: packagerEnv
@@ -162,7 +162,7 @@ if (args.indexOf('--ios') !== -1) {
exec('response=$(curl --write-out %{http_code} --silent --output /dev/null localhost:8081/index.ios.bundle?platform=ios&dev=true)');
echo(`Starting packager server, ${SERVER_PID}`);
echo('Executing ios e2e test');
if (exec('xctool -scheme EndToEndTest -sdk iphonesimulator test').code) {
if (exec('xcodebuild -scheme EndToEndTest -sdk iphonesimulator test | xcpretty').code) {
exit(cleanup(1));
}
cd('..');