From e34dbc4fdcae6e21bb186c225f76d399d2656d75 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 24 Jul 2017 02:49:56 +0200 Subject: ash: add all hush parsing tests to ast tests All pass. Signed-off-by: Denys Vlasenko --- shell/ash_test/run-all | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'shell/ash_test/run-all') 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 $? -- cgit v1.2.3