aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test/run-all
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-24 02:49:56 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-24 02:49:56 +0200
commite34dbc4fdcae6e21bb186c225f76d399d2656d75 (patch)
treeddca2d6cb7209bd34e6775c26e211e0c6f49d0e7 /shell/ash_test/run-all
parent0675b03de44b75f5f5fc7a54c164628e9ee01e9c (diff)
downloadbusybox-e34dbc4fdcae6e21bb186c225f76d399d2656d75.tar.gz
ash: add all hush parsing tests to ast tests
All pass. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/run-all')
-rwxr-xr-xshell/ash_test/run-all22
1 files changed, 18 insertions, 4 deletions
diff --git a/shell/ash_test/run-all b/shell/ash_test/run-all
index 983e6d184..caf033577 100755
--- a/shell/ash_test/run-all
+++ b/shell/ash_test/run-all
@@ -2,10 +2,24 @@
TOPDIR=`pwd`
-test -x ash || {
- echo "No ./ash - creating a link to ../../busybox"
- ln -s ../../busybox ash
-}
+if test ! -x ash; then
+ if test ! -x ../../busybox; then
+ echo "Can't run tests. Put ash binary into this directory (`pwd`)"
+ exit 1
+ fi
+ echo "No ./ash - creating a link to ../../busybox"
+ ln -s ../../busybox ash
+fi
+if test ! -f .config; then
+ if test ! -f ../../.config; then
+ echo "Missing .config file"
+ exit 1
+ fi
+ cp ../../.config . || exit 1
+fi
+
+eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' .config)
+
test -x printenv || gcc -O2 -o printenv printenv.c || exit $?
test -x recho || gcc -O2 -o recho recho.c || exit $?
test -x zecho || gcc -O2 -o zecho zecho.c || exit $?