hush tests: remove the requirement that .config is in ../..
[oweals/busybox.git] / shell / hush_test / run-all
index 470adaa9b5cbb3df8a33b079ffae5121a3a61439..cde841e6606bdcdd486c0211a865d2300072aff9 100755 (executable)
@@ -13,14 +13,20 @@ test -x hush || {
        echo "No ./hush - creating a link to ../../busybox"
        ln -s ../../busybox hush
 }
-if test -e ../../.config ; then
-       eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' ../../.config)
+if test ! -e .config; then
+       if test -f ../../.config; then
+               cp ../../.config . || exit 1
+       else
+               echo "Missing .config file"
+               exit 1
+       fi
 fi
+eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' .config)
 
-PATH="$PWD:$PATH" # for hush and recho/zecho/printenv
+PATH="`pwd`:$PATH" # for hush and recho/zecho/printenv
 export PATH
 
-THIS_SH="$PWD/hush"
+THIS_SH="`pwd`/hush"
 export THIS_SH
 
 do_test()