aboutsummaryrefslogtreecommitdiff
path: root/tests/tester.sh
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2001-05-24 17:15:33 +0000
committerMark Whitley <markw@lineo.com>2001-05-24 17:15:33 +0000
commit04052f96e1385405787356f0955afadd73d8f029 (patch)
tree1a95bdf6e1e21bb031b872d032ba2ca0d0664757 /tests/tester.sh
parenta813afc24f864e0055bdd0ef8cde6777a514b212 (diff)
downloadbusybox-w32-04052f96e1385405787356f0955afadd73d8f029.tar.gz
busybox-w32-04052f96e1385405787356f0955afadd73d8f029.tar.bz2
busybox-w32-04052f96e1385405787356f0955afadd73d8f029.zip
Numerous new testcases from Larry Doolittle and a patch to tester.sh to avoid
a bash2-ism and quote variables that contain strings.
Diffstat (limited to 'tests/tester.sh')
-rwxr-xr-xtests/tester.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/tester.sh b/tests/tester.sh
index a4fa38d34..92090068d 100755
--- a/tests/tester.sh
+++ b/tests/tester.sh
@@ -87,7 +87,7 @@ unalias -a # gets rid of aliases that might create different output
87 87
88 88
89# do extra setup (if any) 89# do extra setup (if any)
90if [ ! -z $SETUP ] 90if [ ! -z "$SETUP" ]
91then 91then
92 [ $DEBUG -ge 2 ] && echo "running setup commands in $SETUP" 92 [ $DEBUG -ge 2 ] && echo "running setup commands in $SETUP"
93 source $SETUP 93 source $SETUP
@@ -120,8 +120,12 @@ do
120 120
121 # change line to include "busybox" before every statement 121 # change line to include "busybox" before every statement
122 line="$BUSYBOX $line" 122 line="$BUSYBOX $line"
123 line=${line//;/; $BUSYBOX } 123 # is this a bash-2-ism?
124 line=${line//|/| $BUSYBOX } 124 # line=${line//;/; $BUSYBOX }
125 # line=${line//|/| $BUSYBOX }
126 # assume $BUSYBOX has no commas
127 line=`echo $line | sed -e 's,;,; '$BUSYBOX, \
128 -e 's,|,| '$BUSYBOX,`
125 129
126 # execute line using busybox programs 130 # execute line using busybox programs
127 [ $DEBUG -ge 2 ] && echo "testing: $line" | tee -a $LOGFILE 131 [ $DEBUG -ge 2 ] && echo "testing: $line" | tee -a $LOGFILE
@@ -143,11 +147,11 @@ done
143 147
144 148
145# do normal cleanup 149# do normal cleanup
146[ $KEEPTMPFILES == "no" ] && rm -f $BB_OUT $GNU_OUT 150[ "$KEEPTMPFILES" = "no" ] && rm -f $BB_OUT $GNU_OUT
147 151
148 152
149# do extra cleanup (if any) 153# do extra cleanup (if any)
150if [ ! -z $CLEANUP ] 154if [ ! -z "$CLEANUP" ]
151then 155then
152 [ $DEBUG -ge 2 ] && echo "running cleanup commands in $CLEANUP" 156 [ $DEBUG -ge 2 ] && echo "running cleanup commands in $CLEANUP"
153 source $CLEANUP 157 source $CLEANUP