diff options
author | Scott James Remnant <keybuk@google.com> | 2015-11-18 09:40:03 -0800 |
---|---|---|
committer | Scott James Remnant <keybuk@google.com> | 2015-11-18 09:41:09 -0800 |
commit | 0ff191abbfa3d23d4e8a81cb674509580873bdc2 (patch) | |
tree | ce0b17dd0765388f23fabbff166373900d883dc7 /test | |
parent | 8531fc357121b8e2fc0135b00f7703205e64e7e7 (diff) | |
download | android_system_bt-0ff191abbfa3d23d4e8a81cb674509580873bdc2.tar.gz android_system_bt-0ff191abbfa3d23d4e8a81cb674509580873bdc2.tar.bz2 android_system_bt-0ff191abbfa3d23d4e8a81cb674509580873bdc2.zip |
Give run_unit_tests an exit code
So you can tell whether tests failed by checking $?
Change-Id: I0eb55c49946a4183206bd68cd3c0b1bdc69f6bb0
Diffstat (limited to 'test')
-rwxr-xr-x | test/run_unit_tests.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/run_unit_tests.sh b/test/run_unit_tests.sh index 9acbed6f6..bf3e427eb 100755 --- a/test/run_unit_tests.sh +++ b/test/run_unit_tests.sh @@ -39,7 +39,9 @@ run_tests() { if [ "$failed_tests" != "" ]; then echo "$failed_tests"; + return 1 fi + return 0 } tests=() @@ -71,7 +73,7 @@ while [ $# -gt 0 ]; do done if [ ${#tests[*]} -eq 0 ]; then - run_tests "$device" ${known_tests[*]} + run_tests "$device" ${known_tests[*]} || exit 1 else - run_tests "$device" ${tests[*]} + run_tests "$device" ${tests[*]} || exit 1 fi |