msh: aliased to hush
[oweals/busybox.git] / testsuite / runtest
index 2d60591fb1206787e39942ee65be7be70e7fa83d..3ff4b96dab64a3e936aa543b238d2e6cefaca1ad 100755 (executable)
@@ -1,20 +1,8 @@
 #!/bin/sh
-
 # Usage:
 # runtest [applet1] [applet2...]
 
-# Helper for helpers. Oh my...
-test x"$ECHO" != x"" || {
-       ECHO="echo"
-       test x"`echo -ne`" = x"" || {
-               # Compile and use a replacement 'echo' which understands -e -n
-               ECHO="$PWD/echo-ne"
-               test -x "$ECHO" || {
-                       gcc -Os -o "$ECHO" ../scripts/echo.c || exit 1
-               }
-       }
-       export ECHO
-}
+. ./testing.sh
 
 # Run one old-style test.
 # Tests are stored in applet/testcase shell scripts.
@@ -120,12 +108,17 @@ fi
 
 # Populate a directory with links to all busybox applets
 
-# Note: if $LINKSDIR/applet exists, we do not overwrite it.
-# Useful if one wants to run tests against a standard utility, not an applet.
 LINKSDIR="$bindir/runtest-tempdir-links"
-#rm -rf "$LINKSDIR" 2>/dev/null
+
+# Comment this line out if you have put a different binary in $LINKSDIR
+# (say, a "standard" tool's binary) in order to run tests against it:
+rm -rf "$LINKSDIR" 2>/dev/null
+
 mkdir "$LINKSDIR" 2>/dev/null
 for i in $implemented; do
+       # Note: if $LINKSDIR/applet exists, we do not overwrite it.
+       # Useful if one wants to run tests against a standard utility,
+       # not an applet.
        ln -s "$bindir/busybox" "$LINKSDIR/$i" 2>/dev/null
 done