aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runtest
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-15 22:43:48 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-15 22:43:48 +0000
commit81e97a13801eb0cc3887d1696208629e5dda77b5 (patch)
treef3537a330e23179f90e85aabbbb027f0144f25a1 /testsuite/runtest
parente251337a4d605e22715ed28b0a168b7fe18c4c9f (diff)
downloadbusybox-w32-81e97a13801eb0cc3887d1696208629e5dda77b5.tar.gz
busybox-w32-81e97a13801eb0cc3887d1696208629e5dda77b5.tar.bz2
busybox-w32-81e97a13801eb0cc3887d1696208629e5dda77b5.zip
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 d9de8799f..624de8fde 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -12,7 +12,7 @@ run_applet_testcase()
12 local applet="$1" 12 local applet="$1"
13 local testcase="$2" 13 local testcase="$2"
14 14
15 local status 15 local status=0
16 local uc_applet=$(echo "$applet" | tr a-z A-Z) 16 local uc_applet=$(echo "$applet" | tr a-z A-Z)
17 local testname="$testcase" 17 local testname="$testcase"
18 18
@@ -36,8 +36,8 @@ run_applet_testcase()
36 cd ".tmpdir.$applet" || return 1 36 cd ".tmpdir.$applet" || return 1
37 37
38# echo "Running testcase $testcase" 38# echo "Running testcase $testcase"
39 d="$tsdir" sh -x -e "$testcase" >"$testname.stdout.txt" 2>&1 39 d="$tsdir" \
40 status=$? 40 sh -x -e "$testcase" >"$testname.stdout.txt" 2>&1 || status=$?
41 if [ $status -ne 0 ]; then 41 if [ $status -ne 0 ]; then
42 echo "FAIL: $testname" 42 echo "FAIL: $testname"
43 if [ x"$VERBOSE" != x ]; then 43 if [ x"$VERBOSE" != x ]; then
@@ -69,8 +69,7 @@ run_oldstyle_applet_tests()
69 *.mine) continue ;; # svn-produced junk 69 *.mine) continue ;; # svn-produced junk
70 *.r[0-9]*) continue ;; # svn-produced junk 70 *.r[0-9]*) continue ;; # svn-produced junk
71 esac 71 esac
72 run_applet_testcase "$applet" "$testcase" 72 run_applet_testcase "$applet" "$testcase" || status=1
73 test $? -eq 0 || status=1
74 done 73 done
75 return $status 74 return $status
76} 75}
@@ -125,8 +124,7 @@ status=0
125for applet in $applets; do 124for applet in $applets; do
126 # Any old-style tests for this applet? 125 # Any old-style tests for this applet?
127 if [ -d "$tsdir/$applet" ]; then 126 if [ -d "$tsdir/$applet" ]; then
128 run_oldstyle_applet_tests "$applet" 127 run_oldstyle_applet_tests "$applet" || status=1
129 test $? -eq 0 || status=1
130 fi 128 fi
131 129
132 # Is this a new-style test? 130 # Is this a new-style test?
@@ -139,8 +137,8 @@ for applet in $applets; do
139 fi 137 fi
140 fi 138 fi
141# echo "Running test $tsdir/$applet.tests" 139# echo "Running test $tsdir/$applet.tests"
142 PATH="$LINKSDIR:$tsdir:$bindir:$PATH" "$tsdir/$applet.tests" 140 PATH="$LINKSDIR:$tsdir:$bindir:$PATH" \
143 test $? -eq 0 || status=1 141 "$tsdir/$applet.tests" || status=1
144 fi 142 fi
145done 143done
146 144