Exit with the error status code from xcodebuild

Summary:See https://github.com/supermarin/xcpretty#usage -- xcpretty will suppress xcodebuild's status code so we need to add `&& exit ${PIPESTATUS[0]}`.
Closes https://github.com/facebook/react-native/pull/7172

Differential Revision: D3216731

fb-gh-sync-id: 942fd213105cc365d1d9a9c4d146441c044dd506
fbshipit-source-id: 942fd213105cc365d1d9a9c4d146441c044dd506
This commit is contained in:
James Ide
2016-04-23 04:18:39 -07:00
committed by Facebook Github Bot 9
parent dd244f5530
commit f5130c8073
2 changed files with 2 additions and 2 deletions

View File

@@ -33,4 +33,4 @@ xcodebuild \
-project Examples/UIExplorer/UIExplorer.xcodeproj \
-scheme UIExplorer -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 5,OS=9.3' \
test \
| xcpretty
| xcpretty && exit ${PIPESTATUS[0]}

View File

@@ -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('xcodebuild -scheme EndToEndTest -sdk iphonesimulator test | xcpretty').code) {
if (exec('xcodebuild -scheme EndToEndTest -sdk iphonesimulator test | xcpretty && exit ${PIPESTATUS[0]}').code) {
exit(cleanup(1));
}
cd('..');