added cache prepare step for packager in ios e2e test

Summary: Closes https://github.com/facebook/react-native/pull/6977

Differential Revision: D3178986

fb-gh-sync-id: 642b96fefcc506d1f8ada588ed79e5de48829338
fbshipit-source-id: 642b96fefcc506d1f8ada588ed79e5de48829338
This commit is contained in:
Konstantin Raev 2016-04-14 06:11:42 -07:00 committed by Facebook Github Bot 2
parent f2e45bcd48
commit a6a5ef4acc
1 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,9 @@ if (args.indexOf('--ios') !== -1) {
env: packagerEnv env: packagerEnv
}); });
SERVER_PID = packagerProcess.pid; SERVER_PID = packagerProcess.pid;
exec('sleep 15s');
// 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&dev=true)');
echo(`Starting packager server, ${SERVER_PID}`); echo(`Starting packager server, ${SERVER_PID}`);
echo('Executing ios e2e test'); echo('Executing ios e2e test');
if (exec('xctool -scheme EndToEndTest -sdk iphonesimulator test').code) { if (exec('xctool -scheme EndToEndTest -sdk iphonesimulator test').code) {