#!/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.
# 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