hust test: complain if busybox binary can't be found
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 12 Aug 2009 19:24:29 +0000 (21:24 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 12 Aug 2009 19:24:29 +0000 (21:24 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush_test/run-all

index ee8327f0d8018c3299a083592afe3787185a2896..256f152dc90c5062a9fa7c60c6aa53627f49a209 100755 (executable)
@@ -9,18 +9,22 @@ unset LC_NUMERIC
 unset LC_TIME
 unset LC_ALL
 
-test -x hush || {
+if test ! -x hush; then
+       if test ! -x ../../busybox; then
+               echo "Can't run tests. Put hush binary into this directory (`pwd`)"
+               exit 1
+       fi
        echo "No ./hush - creating a link to ../../busybox"
        ln -s ../../busybox hush
-}
-if test ! -e .config; then
-       if test -f ../../.config; then
-               cp ../../.config . || exit 1
-       else
+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)
 
 PATH="`pwd`:$PATH" # for hush and recho/zecho/printenv