aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtestsuite/testing.sh16
1 files changed, 6 insertions, 10 deletions
diff --git a/testsuite/testing.sh b/testsuite/testing.sh
index 7897c1622..8bd23d803 100755
--- a/testsuite/testing.sh
+++ b/testsuite/testing.sh
@@ -37,7 +37,7 @@ export SKIP=
37 37
38# Helper functions 38# Helper functions
39 39
40optional () 40optional()
41{ 41{
42 option=`echo "$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)"` 42 option=`echo "$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)"`
43 # Not set? 43 # Not set?
@@ -55,7 +55,6 @@ testing ()
55{ 55{
56 NAME="$1" 56 NAME="$1"
57 [ -z "$1" ] && NAME=$2 57 [ -z "$1" ] && NAME=$2
58 ret=0
59 58
60 if [ $# -ne 5 ] 59 if [ $# -ne 5 ]
61 then 60 then
@@ -77,15 +76,12 @@ testing ()
77 echo -ne "$5" | eval "$2" > actual 76 echo -ne "$5" | eval "$2" > actual
78 RETVAL=$? 77 RETVAL=$?
79 78
80 cmp expected actual > /dev/null || ret=$? 79 cmp expected actual > /dev/null
81 if [ $ret -ne 0 ] 80 if [ $? -ne 0 ]
82 then 81 then
83 FAILCOUNT=$[$FAILCOUNT+1] 82 FAILCOUNT=$[$FAILCOUNT+1]
84 echo "FAIL: $NAME" 83 echo "FAIL: $NAME"
85 if [ -n "$VERBOSE" ] 84 [ -n "$VERBOSE" ] && diff -u expected actual
86 then
87 diff -u expected actual || /bin/true
88 fi
89 else 85 else
90 echo "PASS: $NAME" 86 echo "PASS: $NAME"
91 fi 87 fi
@@ -101,7 +97,7 @@ testing ()
101# the file is assumed to already be there and only its library dependencies 97# the file is assumed to already be there and only its library dependencies
102# are copied. 98# are copied.
103 99
104mkchroot () 100function mkchroot
105{ 101{
106 [ $# -lt 2 ] && return 102 [ $# -lt 2 ] && return
107 103
@@ -130,7 +126,7 @@ mkchroot ()
130# Needed commands listed on command line 126# Needed commands listed on command line
131# Script fed to stdin. 127# Script fed to stdin.
132 128
133dochroot () 129function dochroot
134{ 130{
135 mkdir tmpdir4chroot 131 mkdir tmpdir4chroot
136 mount -t ramfs tmpdir4chroot tmpdir4chroot 132 mount -t ramfs tmpdir4chroot tmpdir4chroot