diff --git a/local-cli/generator-ios/templates/tests/Tests.m b/local-cli/generator-ios/templates/tests/Tests.m index ecb0d881f0c..0b1e61a65b3 100644 --- a/local-cli/generator-ios/templates/tests/Tests.m +++ b/local-cli/generator-ios/templates/tests/Tests.m @@ -13,7 +13,7 @@ #import "RCTLog.h" #import "RCTRootView.h" -#define TIMEOUT_SECONDS 240 +#define TIMEOUT_SECONDS 600 #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" @interface <%= name %>Tests : XCTestCase diff --git a/scripts/run-ci-e2e-tests.js b/scripts/run-ci-e2e-tests.js index 3ffe396ddac..9c7af063e46 100644 --- a/scripts/run-ci-e2e-tests.js +++ b/scripts/run-ci-e2e-tests.js @@ -151,26 +151,28 @@ 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'], + const packagerProcess = spawn('npm', ['start', '--', '--non-persistent'], { stdio: 'inherit', env: packagerEnv }); SERVER_PID = packagerProcess.pid; echo(`Starting packager server, ${SERVER_PID}`); - exec('sleep 5s'); - // prepare cache to reduce chances of possible red screen "Can't fibd variable __fbBatchedBridge..." - exec('response=$(curl --write-out %{http_code} --silent --output /dev/null localhost:8081/index.ios.bundle?platform=ios)'); echo('Executing ios e2e test'); if (exec('xctool -scheme EndToEndTest -sdk iphonesimulator test').code) { exit(cleanup(1)); } + cd('..'); } if (args.indexOf('--js') !== -1) { // Check the packager produces a bundle (doesn't throw an error) if (exec('react-native bundle --platform android --dev true --entry-file index.android.js --bundle-output android-bundle.js').code) { - echo('Could not build package'); + echo('Could not build android package'); + exit(cleanup(1)); + } + if (exec('react-native bundle --platform ios --dev true --entry-file index.ios.js --bundle-output ios-bundle.js').code) { + echo('Could not build ios package'); exit(cleanup(1)); } if (exec(`${ROOT}/node_modules/.bin/flow check`).code) {