From 650fe63467e693990cf357c51b74db3278088a56 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 6 Apr 2004 11:10:30 +0000 Subject: 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 --- testsuite/runtest | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'testsuite/runtest') 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 -- cgit v1.2.3