[PATCH] runtest: Reintroduce "local" to fix clobbering status
James Clarke
jrtc27 at jrtc27.com
Sat Oct 7 17:04:20 UTC 2017
Without "local", run_applet_testcase overwrites the global "status",
causing previous test failures to be ignored. Bashisms already exist
elsewhere in the file, including "local", so we can just add "local"
back.
Fixes: bca4ea8b68403e6f751341b82c65937f14590679
Signed-off-by: James Clarke <jrtc27 at jrtc27.com>
---
testsuite/runtest | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/testsuite/runtest b/testsuite/runtest
index 44f9cd1a1..aa452a205 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -12,14 +12,14 @@ total_failed=0
# Option -e will make testcase stop on the first failed command.
run_applet_testcase()
{
- applet="$1"
- testcase="$2"
+ local applet="$1"
+ local testcase="$2"
- status=0
- uc_applet=$(echo "$applet" | tr a-z A-Z)
- testname="$testcase"
+ local status=0
+ local uc_applet=$(echo "$applet" | tr a-z A-Z)
+ local testname="$testcase"
- testname="${testname##*/}" # take basename
+ local testname="${testname##*/}" # take basename
if grep "^# CONFIG_$uc_applet is not set$" "$bindir/.config" >/dev/null; then
echo "UNTESTED: $testname"
return 0
--
2.14.1
More information about the busybox
mailing list