aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runtest
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-04-06 11:10:30 +0000
committerEric Andersen <andersen@codepoet.org>2004-04-06 11:10:30 +0000
commit650fe63467e693990cf357c51b74db3278088a56 (patch)
tree660b1fb0e4d7f99802a85cdd00166fafbf3132dc /testsuite/runtest
parent39396b95fc7c46bfa29ec576357fb7f8e755762c (diff)
downloadbusybox-650fe63467e693990cf357c51b74db3278088a56.tar.gz
Kill off the old 'tests' stuff. Write a ton of new tests for the
'testsuite' dir. Fix a bunch of broken tests. Fix the testsuite 'runtest' script so it actually reports all failures and provides meaningful feedback. -Erik
Diffstat (limited to 'testsuite/runtest')
-rwxr-xr-xtestsuite/runtest34
1 files changed, 6 insertions, 28 deletions
diff --git a/testsuite/runtest b/testsuite/runtest
index f57f464ee..89aba3985 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -2,37 +2,19 @@
PATH=$(dirname $(pwd)):$PATH
-show_result ()
-{
- local resolution=$1
- local testcase=$2
- local status=0
-
- if [ $resolution = XPASS -o $resolution = FAIL ]; then
- status=1
- fi
-
- if [ "$verbose" -o $status -eq 1 ]; then
- echo "$resolution: $testcase"
- fi
-
- return $status
-}
-
run_applet_testcase ()
{
local applet=$1
local testcase=$2
local status=0
- local X=
local RES=
local uc_applet=$(echo $applet | tr a-z A-Z)
local testname=$(basename $testcase)
if grep -q "^# CONFIG_${uc_applet} is not set$" ../.config; then
- show_result UNTESTED $testname
+ echo UNTESTED: $testname
return 0
fi
@@ -40,15 +22,11 @@ run_applet_testcase ()
local feature=`sed -ne 's/^# FEATURE: //p' $testcase`
if grep -q "^# ${feature} is not set$" ../.config; then
- show_result UNTESTED $testname
+ echo UNTESTED: $testname
return 0
fi
fi
- if grep -q "^# XFAIL$" $testcase; then
- X=X
- fi
-
rm -rf tmp
mkdir -p tmp
pushd tmp >/dev/null
@@ -56,14 +34,14 @@ run_applet_testcase ()
sh -x -e ../$testcase >.logfile.txt 2>&1
if [ $? != 0 ] ; then
- show_result ${X}FAIL $testname
- if [ "$verbose" == 1 ]; then
+ echo FAIL: $testname
+ if [ "$verbose" = 1 ]; then
cat .logfile.txt
- exit 1;
+ #exit 1;
fi;
status=$?
else
- show_result ${X}PASS $testname
+ echo PASS: $testname
rm -f .logfile.txt
status=$?
fi