From 15523724fe002a98244ec831dc22d5f8c71398d5 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 9 Nov 2021 16:47:41 -0500 Subject: [PATCH] Fix test_suites.sh to fail if the chip-tool command fails. (#11593) If chip-tool crashed, the script was not treating this as a failure, because the default exit code of a pipeline is that of the last command in the pipeline and we are piping through tee. --- scripts/tests/test_suites.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/tests/test_suites.sh b/scripts/tests/test_suites.sh index 38e0bfd75ed3f3..f335fe539db21e 100755 --- a/scripts/tests/test_suites.sh +++ b/scripts/tests/test_suites.sh @@ -16,8 +16,13 @@ # limitations under the License. # +# Fail if one of our sub-commands fails. set -e +# Fail if anything in a pipeline fails, not just the last command (which for +# us tends to be 'tee'). +set -o pipefail + declare -i iterations=2 declare -i delay=0 declare -i node_id=0x12344321