aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-06-15 20:07:57 +0000
committerRob Landley <rob@landley.net>2006-06-15 20:07:57 +0000
commitcd82c3c041139c03fceea7e76fb48280b00d73da (patch)
tree403a08d61e570a94e887007685e8ee1bca0150d5 /testsuite
parent04b7ef967bfb5a4b97600b27d60eb42e0346d8ab (diff)
downloadbusybox-cd82c3c041139c03fceea7e76fb48280b00d73da.tar.gz
Don't do workarounds for broken shells. Busybox is about to grow a shell that
we can run our own testsuite under, and I want it to handle the full range of strange and peverted behavior you can find in real world shell scripts. In the meantime, I'll just say #!/bin/bash in places that may care.
Diffstat (limited to 'testsuite')
-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=
# Helper functions
-optional ()
+optional()
{
option=`echo "$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)"`
# Not set?
@@ -55,7 +55,6 @@ testing ()
{
NAME="$1"
[ -z "$1" ] && NAME=$2
- ret=0
if [ $# -ne 5 ]
then
@@ -77,15 +76,12 @@ testing ()
echo -ne "$5" | eval "$2" > actual
RETVAL=$?
- cmp expected actual > /dev/null || ret=$?
- if [ $ret -ne 0 ]
+ cmp expected actual > /dev/null
+ if [ $? -ne 0 ]
then
FAILCOUNT=$[$FAILCOUNT+1]
echo "FAIL: $NAME"
- if [ -n "$VERBOSE" ]
- then
- diff -u expected actual || /bin/true
- fi
+ [ -n "$VERBOSE" ] && diff -u expected actual
else
echo "PASS: $NAME"
fi
@@ -101,7 +97,7 @@ testing ()
# the file is assumed to already be there and only its library dependencies
# are copied.
-mkchroot ()
+function mkchroot
{
[ $# -lt 2 ] && return
@@ -130,7 +126,7 @@ mkchroot ()
# Needed commands listed on command line
# Script fed to stdin.
-dochroot ()
+function dochroot
{
mkdir tmpdir4chroot
mount -t ramfs tmpdir4chroot tmpdir4chroot