summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko2009-08-12 21:24:29 +0200
committerDenys Vlasenko2009-08-12 21:24:29 +0200
commitdbfa45b3b23d882a7ff3e9ef4bf84378e6b9a4a8 (patch)
treef819ff72b42c425c21e0cde8a9bcc1331117cef8 /shell/hush_test
parentcbfe6ad4c6c6a218a3dd89623911183aca91b061 (diff)
downloadbusybox-dbfa45b3b23d882a7ff3e9ef4bf84378e6b9a4a8.zip
busybox-dbfa45b3b23d882a7ff3e9ef4bf84378e6b9a4a8.tar.gz
hust test: complain if busybox binary can't be found
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rwxr-xr-xshell/hush_test/run-all16
1 files changed, 10 insertions, 6 deletions
diff --git a/shell/hush_test/run-all b/shell/hush_test/run-all
index ee8327f..256f152 100755
--- a/shell/hush_test/run-all
+++ b/shell/hush_test/run-all
@@ -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