summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorMike Frysinger2009-04-09 07:49:43 +0000
committerMike Frysinger2009-04-09 07:49:43 +0000
commit20300d0129e9e551be657be4d603de7f071f5989 (patch)
tree43b472810081224ab2a36b3c6be23c8a0cd768d0 /shell/hush_test
parentfe013a74ff46cf53ec85d00f693ed72cbeef4eda (diff)
downloadbusybox-20300d0129e9e551be657be4d603de7f071f5989.zip
busybox-20300d0129e9e551be657be4d603de7f071f5989.tar.gz
source the .config so tests can signal they need to be skipped due to feature disable
Diffstat (limited to 'shell/hush_test')
-rwxr-xr-xshell/hush_test/run-all13
1 files changed, 11 insertions, 2 deletions
diff --git a/shell/hush_test/run-all b/shell/hush_test/run-all
index c7989a1..57a5c25 100755
--- a/shell/hush_test/run-all
+++ b/shell/hush_test/run-all
@@ -13,6 +13,9 @@ 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)
+fi
PATH="$PWD:$PATH" # for hush and recho/zecho/printenv
export PATH
@@ -47,10 +50,16 @@ do_test()
name="${x%%.tests}"
test -f "$name.right" || continue
# echo Running test: "$x"
- {
+ (
"$THIS_SH" "./$x" >"$name.xx" 2>&1
+ test $? -eq 77 && rm -f "../$1-$x.fail" && exit 77
diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail"
- } && echo "$1/$x: ok" || { echo "$1/$x: fail"; tret=1; }
+ )
+ case $? in
+ 0) echo "$1/$x: ok";;
+ 77) echo "$1/$x: skip (feature disabled)";;
+ *) echo "$1/$x: fail"; tret=1;;
+ esac
done
exit ${tret}
)