From 91350679a648cc6c37d500e4dec74f50fab08e8a Mon Sep 17 00:00:00 2001 From: Chun-Hung Tseng Date: Wed, 15 Nov 2023 21:33:40 +0100 Subject: [PATCH] Enable exit-on-error setting to gdbstub-test.sh --- .ci/gdbstub-test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/gdbstub-test.sh b/.ci/gdbstub-test.sh index c08fb518..6bba5668 100755 --- a/.ci/gdbstub-test.sh +++ b/.ci/gdbstub-test.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# set -e -u -o pipefail +set -e -u -o pipefail export PATH=`pwd`/toolchain/riscv/bin:$PATH @@ -8,10 +8,12 @@ GDB= prefixes=("${CROSS_COMPILE}" "riscv32-unknown-elf" "riscv-none-elf") for prefix in "${prefixes[@]}"; do utility=${prefix}-gdb + set +e # temporarily disable exit on error command -v "${utility}" &> /dev/null if [[ $? == 0 ]]; then GDB=${utility} fi + set -e done # Check if GDB is available