Skip to content

Commit

Permalink
Exit with the error status code from xcodebuild
Browse files Browse the repository at this point in the history
Summary:See https://github.com/supermarin/xcpretty#usage -- xcpretty will suppress xcodebuild's status code so we need to add `&& exit ${PIPESTATUS[0]}`.
Closes facebook#7172

Differential Revision: D3216731

fb-gh-sync-id: 942fd213105cc365d1d9a9c4d146441c044dd506
fbshipit-source-id: 942fd213105cc365d1d9a9c4d146441c044dd506
  • Loading branch information
ide authored and Facebook Github Bot 9 committed Apr 23, 2016
1 parent dd244f5 commit f5130c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/objc-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]}
2 changes: 1 addition & 1 deletion scripts/run-ci-e2e-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('..');
Expand Down

0 comments on commit f5130c8

Please sign in to comment.