summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorEric Andersen2004-04-06 00:41:39 +0000
committerEric Andersen2004-04-06 00:41:39 +0000
commitc354f6ee54c53057eca50359a94c7b50246b0e53 (patch)
tree34b5ee3d1a8c5aa2377aff28d83d7657d9820aa3 /testsuite
parentb2e267f15380ff6c48b0ee5c7cd9dd7f279b38c7 (diff)
downloadbusybox-c354f6ee54c53057eca50359a94c7b50246b0e53.zip
busybox-c354f6ee54c53057eca50359a94c7b50246b0e53.tar.gz
Fix the test suite script so it actually works and actually flags
all errors as such. Make verbose mode exit on FAIL and provide a printout of the failed test run.
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/runtest17
1 files changed, 13 insertions, 4 deletions
diff --git a/testsuite/runtest b/testsuite/runtest
index 2cf85f5..f57f464 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -26,6 +26,7 @@ run_applet_testcase ()
local status=0
local X=
+ local RES=
local uc_applet=$(echo $applet | tr a-z A-Z)
local testname=$(basename $testcase)
@@ -48,14 +49,22 @@ run_applet_testcase ()
X=X
fi
- mkdir tmp
+ rm -rf tmp
+ mkdir -p tmp
pushd tmp >/dev/null
- if . ../$testcase >/dev/null 2>&1; then
- show_result ${X}PASS $testname
+ sh -x -e ../$testcase >.logfile.txt 2>&1
+
+ if [ $? != 0 ] ; then
+ show_result ${X}FAIL $testname
+ if [ "$verbose" == 1 ]; then
+ cat .logfile.txt
+ exit 1;
+ fi;
status=$?
else
- show_result ${X}FAIL $testname
+ show_result ${X}PASS $testname
+ rm -f .logfile.txt
status=$?
fi