From 48f1793a600030087fe03f883c9e62cb38921fdc Mon Sep 17 00:00:00 2001 From: liuhaitao Date: Sat, 8 Feb 2020 11:40:29 +0800 Subject: [PATCH] tools/testbuild.sh: make sure fail get the real return error value --- tools/testbuild.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/testbuild.sh b/tools/testbuild.sh index 16ccd703a6..5985c033e5 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -151,8 +151,9 @@ cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; } function makefunc { ${MAKE} $@ - if [ $? != 0 ]; then - fail=$? + ret=$? + if [ $ret != 0 ]; then + fail=$ret fi }