From e6582ac2f7f870eb612a72b3279373cf1e039f02 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