From db0efec505f7321e74532eda08fea6961153b737 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Tue, 21 Jun 2016 10:50:05 -0700 Subject: [PATCH] Make bots.sh print failure for when it's run locally (#4654) --- dev/bots/test.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dev/bots/test.sh b/dev/bots/test.sh index 300a1e42ea..f45721db0d 100755 --- a/dev/bots/test.sh +++ b/dev/bots/test.sh @@ -3,12 +3,18 @@ set -ex export PATH="$PWD/bin:$PWD/bin/cache/dart-sdk/bin:$PATH" +die() { + set +x + echo "Error: script exited early due to error" + exit 1 +} + # analyze all the Dart code in the repo flutter analyze --flutter-repo # verify that the tests actually return failure on failure and success on success -(cd dev/automated_tests; ! flutter test test_smoke_test/fail_test.dart > /dev/null) -(cd dev/automated_tests; flutter test test_smoke_test/pass_test.dart > /dev/null) +(cd dev/automated_tests; ! flutter test test_smoke_test/fail_test.dart > /dev/null) || die +(cd dev/automated_tests; flutter test test_smoke_test/pass_test.dart > /dev/null) || die # run tests (cd packages/flutter; flutter test)