summaryrefslogtreecommitdiff
path: root/testsuite/runtest
diff options
context:
space:
mode:
authorDenis Vlasenko2008-05-15 22:43:48 +0000
committerDenis Vlasenko2008-05-15 22:43:48 +0000
commit81e97a13801eb0cc3887d1696208629e5dda77b5 (patch)
treef3537a330e23179f90e85aabbbb027f0144f25a1 /testsuite/runtest
parente251337a4d605e22715ed28b0a168b7fe18c4c9f (diff)
downloadbusybox-81e97a13801eb0cc3887d1696208629e5dda77b5.zip
busybox-81e97a13801eb0cc3887d1696208629e5dda77b5.tar.gz
testsuite instrumentation fixes by Christian
Diffstat (limited to 'testsuite/runtest')
-rwxr-xr-xtestsuite/runtest16
1 files changed, 7 insertions, 9 deletions
diff --git a/testsuite/runtest b/testsuite/runtest
index d9de879..624de8f 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -12,7 +12,7 @@ run_applet_testcase()
local applet="$1"
local testcase="$2"
- local status
+ local status=0
local uc_applet=$(echo "$applet" | tr a-z A-Z)
local testname="$testcase"
@@ -36,8 +36,8 @@ run_applet_testcase()
cd ".tmpdir.$applet" || return 1
# echo "Running testcase $testcase"
- d="$tsdir" sh -x -e "$testcase" >"$testname.stdout.txt" 2>&1
- status=$?
+ d="$tsdir" \
+ sh -x -e "$testcase" >"$testname.stdout.txt" 2>&1 || status=$?
if [ $status -ne 0 ]; then
echo "FAIL: $testname"
if [ x"$VERBOSE" != x ]; then
@@ -69,8 +69,7 @@ run_oldstyle_applet_tests()
*.mine) continue ;; # svn-produced junk
*.r[0-9]*) continue ;; # svn-produced junk
esac
- run_applet_testcase "$applet" "$testcase"
- test $? -eq 0 || status=1
+ run_applet_testcase "$applet" "$testcase" || status=1
done
return $status
}
@@ -125,8 +124,7 @@ status=0
for applet in $applets; do
# Any old-style tests for this applet?
if [ -d "$tsdir/$applet" ]; then
- run_oldstyle_applet_tests "$applet"
- test $? -eq 0 || status=1
+ run_oldstyle_applet_tests "$applet" || status=1
fi
# Is this a new-style test?
@@ -139,8 +137,8 @@ for applet in $applets; do
fi
fi
# echo "Running test $tsdir/$applet.tests"
- PATH="$LINKSDIR:$tsdir:$bindir:$PATH" "$tsdir/$applet.tests"
- test $? -eq 0 || status=1
+ PATH="$LINKSDIR:$tsdir:$bindir:$PATH" \
+ "$tsdir/$applet.tests" || status=1
fi
done