diff options
author | Mark Whitley <markw@lineo.com> | 2001-05-24 17:15:33 +0000 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2001-05-24 17:15:33 +0000 |
commit | 04052f96e1385405787356f0955afadd73d8f029 (patch) | |
tree | 1a95bdf6e1e21bb031b872d032ba2ca0d0664757 /tests/tester.sh | |
parent | a813afc24f864e0055bdd0ef8cde6777a514b212 (diff) | |
download | busybox-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-x | tests/tester.sh | 14 |
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) |
90 | if [ ! -z $SETUP ] | 90 | if [ ! -z "$SETUP" ] |
91 | then | 91 | then |
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) |
150 | if [ ! -z $CLEANUP ] | 154 | if [ ! -z "$CLEANUP" ] |
151 | then | 155 | then |
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 |