aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-04-26 10:14:25 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-04-26 10:14:25 +0000
commit64d5bfda1af0b8d6fe2c1996b3df15a0fa513679 (patch)
treeb8aca320f0d4ce335d37fcbc57a27691be239dae
parent16afa38a7b6c837745492a785657c10b1b86f95c (diff)
downloadbusybox-w32-64d5bfda1af0b8d6fe2c1996b3df15a0fa513679.tar.gz
busybox-w32-64d5bfda1af0b8d6fe2c1996b3df15a0fa513679.tar.bz2
busybox-w32-64d5bfda1af0b8d6fe2c1996b3df15a0fa513679.zip
runtest: use numeric compare instead of string where appropriate
-rwxr-xr-xtestsuite/runtest10
1 files changed, 5 insertions, 5 deletions
diff --git a/testsuite/runtest b/testsuite/runtest
index 478764801..b8b2da8e0 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -37,7 +37,7 @@ run_applet_testcase()
37# echo "Running testcase $testcase" 37# echo "Running testcase $testcase"
38 d="$tsdir" sh -x -e "$testcase" >"$testname.stdout.txt" 2>&1 38 d="$tsdir" sh -x -e "$testcase" >"$testname.stdout.txt" 2>&1
39 status=$? 39 status=$?
40 if [ $status != 0 ]; then 40 if [ $status -ne 0 ]; then
41 echo "FAIL: $testname" 41 echo "FAIL: $testname"
42 if [ x"$VERBOSE" != x ]; then 42 if [ x"$VERBOSE" != x ]; then
43 cat "$testname.stdout.txt" 43 cat "$testname.stdout.txt"
@@ -71,7 +71,7 @@ run_applet_tests()
71 continue 71 continue
72 fi 72 fi
73 run_applet_testcase "$applet" "$testcase" 73 run_applet_testcase "$applet" "$testcase"
74 test $? = 0 || status=1 74 test $? -eq 0 || status=1
75 done 75 done
76 return $status 76 return $status
77} 77}
@@ -125,7 +125,7 @@ for applet in $applets; do
125 # Any old-style tests for this applet? 125 # Any old-style tests for this applet?
126 if [ "$applet" != "CVS" -a -d "$tsdir/$applet" ]; then 126 if [ "$applet" != "CVS" -a -d "$tsdir/$applet" ]; then
127 run_applet_tests "$applet" 127 run_applet_tests "$applet"
128 test $? = 0 || status=1 128 test $? -eq 0 || status=1
129 fi 129 fi
130 130
131 # Is this a new-style test? 131 # Is this a new-style test?
@@ -139,14 +139,14 @@ for applet in $applets; do
139 fi 139 fi
140# echo "Running test ${tsdir:-.}/${applet}.tests" 140# echo "Running test ${tsdir:-.}/${applet}.tests"
141 PATH="$LINKSDIR:$tsdir:$bindir:$PATH" "${tsdir:-.}/${applet}.tests" 141 PATH="$LINKSDIR:$tsdir:$bindir:$PATH" "${tsdir:-.}/${applet}.tests"
142 test $? = 0 || status=1 142 test $? -eq 0 || status=1
143 fi 143 fi
144done 144done
145 145
146# Leaving the dir makes it somewhat easier to run failed test by hand 146# Leaving the dir makes it somewhat easier to run failed test by hand
147#rm -rf "$LINKSDIR" 147#rm -rf "$LINKSDIR"
148 148
149if [ $status != 0 -a x"$VERBOSE" = x ]; then 149if [ $status -ne 0 -a x"$VERBOSE" = x ]; then
150 echo "Failures detected, running with -v (verbose) will give more info" 150 echo "Failures detected, running with -v (verbose) will give more info"
151fi 151fi
152exit $status 152exit $status