diff options
Diffstat (limited to '')
-rwxr-xr-x | testsuite/runtest | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/testsuite/runtest b/testsuite/runtest index 44f9cd1a1..adbcb1178 100755 --- a/testsuite/runtest +++ b/testsuite/runtest | |||
@@ -99,6 +99,20 @@ if [ x"$1" = x"-v" ]; then | |||
99 | shift | 99 | shift |
100 | fi | 100 | fi |
101 | 101 | ||
102 | if [ -f "$bindir/busybox.exe" ]; then | ||
103 | suffix=".exe" | ||
104 | lnflag="" | ||
105 | |||
106 | # Some tests require /bin/echo and /bin/true exist | ||
107 | test ! -d /tmp && mkdir /tmp | ||
108 | test ! -d /bin && mkdir /bin | ||
109 | test ! -f /bin/echo.exe && cp "$bindir/busybox.exe" /bin/echo.exe | ||
110 | test ! -f /bin/true.exe && cp "$bindir/busybox.exe" /bin/true.exe | ||
111 | else | ||
112 | suffix="" | ||
113 | lnflag="-s" | ||
114 | fi | ||
115 | |||
102 | implemented=$( | 116 | implemented=$( |
103 | printf "busybox " # always implemented | 117 | printf "busybox " # always implemented |
104 | "$bindir/busybox" 2>&1 | | 118 | "$bindir/busybox" 2>&1 | |
@@ -128,7 +142,7 @@ for i in $implemented; do | |||
128 | # Note: if $LINKSDIR/applet exists, we do not overwrite it. | 142 | # Note: if $LINKSDIR/applet exists, we do not overwrite it. |
129 | # Useful if one wants to run tests against a standard utility, | 143 | # Useful if one wants to run tests against a standard utility, |
130 | # not an applet. | 144 | # not an applet. |
131 | ln -s "$bindir/busybox" "$LINKSDIR/$i" 2>/dev/null | 145 | ln $lnflag "$bindir/busybox$suffix" "$LINKSDIR/$i$suffix" 2>/dev/null |
132 | done | 146 | done |
133 | 147 | ||
134 | # Set up option flags so tests can be selective. | 148 | # Set up option flags so tests can be selective. |
@@ -146,7 +160,7 @@ for applet in $applets; do | |||
146 | 160 | ||
147 | # Is this a new-style test? | 161 | # Is this a new-style test? |
148 | if [ -f "$applet.tests" ]; then | 162 | if [ -f "$applet.tests" ]; then |
149 | if [ ! -e "$LINKSDIR/$applet" ]; then | 163 | if [ ! -e "$LINKSDIR/$applet$suffix" ]; then |
150 | # (avoiding bash'ism "${applet:0:4}") | 164 | # (avoiding bash'ism "${applet:0:4}") |
151 | if ! echo "$applet" | grep "^all_" >/dev/null; then | 165 | if ! echo "$applet" | grep "^all_" >/dev/null; then |
152 | echo "SKIPPED: $applet (not built)" | 166 | echo "SKIPPED: $applet (not built)" |