diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2023-06-14 15:19:02 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2023-06-14 15:19:02 +0200 |
commit | 2ff01bb699d80cb7d24a93e812cc91c54be5cc20 (patch) | |
tree | a4b324819eef22453af95eeaa7842362cf7b19f1 /shell/ash_test/run-all | |
parent | 66139330fc09384f2ce95e60ea1f5268badbafc9 (diff) | |
download | busybox-w32-2ff01bb699d80cb7d24a93e812cc91c54be5cc20.tar.gz busybox-w32-2ff01bb699d80cb7d24a93e812cc91c54be5cc20.tar.bz2 busybox-w32-2ff01bb699d80cb7d24a93e812cc91c54be5cc20.zip |
shell: sync ash/hush test scripts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/run-all')
-rwxr-xr-x | shell/ash_test/run-all | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/shell/ash_test/run-all b/shell/ash_test/run-all index 96703ef12..066327dc0 100755 --- a/shell/ash_test/run-all +++ b/shell/ash_test/run-all | |||
@@ -47,6 +47,7 @@ do_test() | |||
47 | # $1 but with / replaced by # so that it can be used as filename part | 47 | # $1 but with / replaced by # so that it can be used as filename part |
48 | noslash=`echo "$1" | sed 's:/:#:g'` | 48 | noslash=`echo "$1" | sed 's:/:#:g'` |
49 | ( | 49 | ( |
50 | tret=0 | ||
50 | cd "$1" || { echo "cannot cd $1!"; exit 1; } | 51 | cd "$1" || { echo "cannot cd $1!"; exit 1; } |
51 | for x in run-*; do | 52 | for x in run-*; do |
52 | test -f "$x" || continue | 53 | test -f "$x" || continue |
@@ -69,13 +70,25 @@ do_test() | |||
69 | test -f "$name.right" || continue | 70 | test -f "$name.right" || continue |
70 | # echo Running test: "$x" | 71 | # echo Running test: "$x" |
71 | echo -n "$1/$x:" | 72 | echo -n "$1/$x:" |
72 | { | 73 | ( |
73 | "$THIS_SH" "./$x" 2>&1 | \ | 74 | "$THIS_SH" "./$x" 2>&1 | \ |
74 | grep -va "^ash: using fallback suid method$" >"$name.xx" | 75 | grep -va "^ash: using fallback suid method$" >"$name.xx" |
76 | r=$? | ||
77 | # filter C library differences | ||
78 | sed -i \ | ||
79 | -e "/: invalid option /s:'::g" \ | ||
80 | "$name.xx" | ||
81 | test $r -eq 77 && rm -f "$TOPDIR/$noslash-$x.fail" && exit 77 | ||
75 | diff -u "$name.xx" "$name.right" >"$TOPDIR/$noslash-$x.fail" \ | 82 | diff -u "$name.xx" "$name.right" >"$TOPDIR/$noslash-$x.fail" \ |
76 | && rm -f "$name.xx" "$TOPDIR/$noslash-$x.fail" | 83 | && rm -f "$name.xx" "$TOPDIR/$noslash-$x.fail" |
77 | } && echo " ok" || echo " fail" | 84 | ) |
85 | case $? in | ||
86 | 0) echo " ok";; | ||
87 | 77) echo " skip (feature disabled)";; | ||
88 | *) echo " fail ($?)"; tret=1;; | ||
89 | esac | ||
78 | done | 90 | done |
91 | exit $tret | ||
79 | ) | 92 | ) |
80 | } | 93 | } |
81 | 94 | ||
@@ -103,4 +116,4 @@ else | |||
103 | done | 116 | done |
104 | fi | 117 | fi |
105 | 118 | ||
106 | exit ${ret} | 119 | exit $ret |