diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-04-09 07:49:43 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-04-09 07:49:43 +0000 |
commit | 20300d0129e9e551be657be4d603de7f071f5989 (patch) | |
tree | 43b472810081224ab2a36b3c6be23c8a0cd768d0 | |
parent | fe013a74ff46cf53ec85d00f693ed72cbeef4eda (diff) | |
download | busybox-w32-20300d0129e9e551be657be4d603de7f071f5989.tar.gz busybox-w32-20300d0129e9e551be657be4d603de7f071f5989.tar.bz2 busybox-w32-20300d0129e9e551be657be4d603de7f071f5989.zip |
source the .config so tests can signal they need to be skipped due to feature disable
-rwxr-xr-x | shell/hush_test/run-all | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/shell/hush_test/run-all b/shell/hush_test/run-all index c7989a172..57a5c253b 100755 --- a/shell/hush_test/run-all +++ b/shell/hush_test/run-all | |||
@@ -13,6 +13,9 @@ test -x hush || { | |||
13 | echo "No ./hush - creating a link to ../../busybox" | 13 | echo "No ./hush - creating a link to ../../busybox" |
14 | ln -s ../../busybox hush | 14 | ln -s ../../busybox hush |
15 | } | 15 | } |
16 | if test -e ../../.config ; then | ||
17 | eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' ../../.config) | ||
18 | fi | ||
16 | 19 | ||
17 | PATH="$PWD:$PATH" # for hush and recho/zecho/printenv | 20 | PATH="$PWD:$PATH" # for hush and recho/zecho/printenv |
18 | export PATH | 21 | export PATH |
@@ -47,10 +50,16 @@ do_test() | |||
47 | name="${x%%.tests}" | 50 | name="${x%%.tests}" |
48 | test -f "$name.right" || continue | 51 | test -f "$name.right" || continue |
49 | # echo Running test: "$x" | 52 | # echo Running test: "$x" |
50 | { | 53 | ( |
51 | "$THIS_SH" "./$x" >"$name.xx" 2>&1 | 54 | "$THIS_SH" "./$x" >"$name.xx" 2>&1 |
55 | test $? -eq 77 && rm -f "../$1-$x.fail" && exit 77 | ||
52 | diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail" | 56 | diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail" |
53 | } && echo "$1/$x: ok" || { echo "$1/$x: fail"; tret=1; } | 57 | ) |
58 | case $? in | ||
59 | 0) echo "$1/$x: ok";; | ||
60 | 77) echo "$1/$x: skip (feature disabled)";; | ||
61 | *) echo "$1/$x: fail"; tret=1;; | ||
62 | esac | ||
54 | done | 63 | done |
55 | exit ${tret} | 64 | exit ${tret} |
56 | ) | 65 | ) |