aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2023-06-14 15:19:02 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2023-06-14 15:19:02 +0200
commit2ff01bb699d80cb7d24a93e812cc91c54be5cc20 (patch)
treea4b324819eef22453af95eeaa7842362cf7b19f1 /shell/hush_test
parent66139330fc09384f2ce95e60ea1f5268badbafc9 (diff)
downloadbusybox-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/hush_test')
-rwxr-xr-xshell/hush_test/run-all12
1 files changed, 8 insertions, 4 deletions
diff --git a/shell/hush_test/run-all b/shell/hush_test/run-all
index 3fbc7c531..7345fee43 100755
--- a/shell/hush_test/run-all
+++ b/shell/hush_test/run-all
@@ -29,7 +29,7 @@ fi
29 29
30eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' .config) 30eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' .config)
31 31
32PATH="`pwd`:$PATH" # for hush and recho/zecho/printenv 32PATH="`pwd`:$PATH" # for hush
33export PATH 33export PATH
34 34
35THIS_SH="`pwd`/hush" 35THIS_SH="`pwd`/hush"
@@ -67,7 +67,8 @@ do_test()
67# echo Running test: "$x" 67# echo Running test: "$x"
68 echo -n "$1/$x:" 68 echo -n "$1/$x:"
69 ( 69 (
70 "$THIS_SH" "./$x" >"$name.xx" 2>&1 70 "$THIS_SH" "./$x" 2>&1 | \
71 grep -va "^hush: using fallback suid method$" >"$name.xx"
71 r=$? 72 r=$?
72 # filter C library differences 73 # filter C library differences
73 sed -i \ 74 sed -i \
@@ -83,7 +84,7 @@ do_test()
83 *) echo " fail ($?)"; tret=1;; 84 *) echo " fail ($?)"; tret=1;;
84 esac 85 esac
85 done 86 done
86 exit ${tret} 87 exit $tret
87 ) 88 )
88} 89}
89 90
@@ -95,6 +96,9 @@ ret=0
95if [ $# -lt 1 ]; then 96if [ $# -lt 1 ]; then
96 # All sub directories 97 # All sub directories
97 modules=`ls -d hush-*` 98 modules=`ls -d hush-*`
99 # If you want to test hush against ash testsuite
100 # (have to copy ash_test dir to current dir first):
101 #modules=`ls -d hush-* ash_test/ash-*`
98 102
99 for module in $modules; do 103 for module in $modules; do
100 do_test $module || ret=1 104 do_test $module || ret=1
@@ -108,4 +112,4 @@ else
108 done 112 done
109fi 113fi
110 114
111exit ${ret} 115exit $ret