summaryrefslogtreecommitdiff
path: root/testsuite/runtest
diff options
context:
space:
mode:
authorDenis Vlasenko2008-07-11 21:41:14 +0000
committerDenis Vlasenko2008-07-11 21:41:14 +0000
commitabe49fa54fbd4d13f8424532abced8c3bc9afd0c (patch)
tree46b91fabcbe3aab24dd2f926c915553f633c5ed9 /testsuite/runtest
parent94884eb4866815e63293a6261f974601ce95b1dd (diff)
downloadbusybox-abe49fa54fbd4d13f8424532abced8c3bc9afd0c.zip
busybox-abe49fa54fbd4d13f8424532abced8c3bc9afd0c.tar.gz
testsuite: uniformly use $ECHO with -n -e
Diffstat (limited to 'testsuite/runtest')
-rwxr-xr-xtestsuite/runtest13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/runtest b/testsuite/runtest
index 624de8f..cade871 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -3,6 +3,19 @@
# 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
+}
+
# Run one old-style test.
# Tests are stored in applet/testcase shell scripts.
# They are run using "sh -x -e applet/testcase".