13 echo "No ./hush - creating a link to ../../busybox"
14 ln -s ..
/..
/busybox hush
16 if test -e ..
/..
/.config
; then
17 eval $
(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' ..
/..
/.config
)
20 PATH
="$PWD:$PATH" # for hush and recho/zecho/printenv
28 test -d "$1" ||
return 0
30 # echo Running tests in directory "$1"
33 cd "$1" ||
{ echo "cannot cd $1!"; exit 1; }
35 test -f "$x" ||
continue
37 "$0"|run-minimal|run-gprof
) ;;
39 #*) echo $x ; sh $x ;;
41 sh
"$x" >"../$1-$x.fail" 2>&1 && \
42 { echo "$1/$x: ok"; rm "../$1-$x.fail"; } ||
echo "$1/$x: fail";
46 # Many bash run-XXX scripts just do this,
47 # no point in duplication it all over the place
49 test -x "$x" ||
continue
51 test -f "$name.right" ||
continue
52 # echo Running test: "$x"
54 "$THIS_SH" "./$x" >"$name.xx" 2>&1
55 test $?
-eq 77 && rm -f "../$1-$x.fail" && exit 77
56 diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail"
60 77) echo "$1/$x: skip (feature disabled)";;
61 *) echo "$1/$x: fail"; tret
=1;;
68 # Main part of this script
69 # Usage: run-all [directories]
75 modules
=`ls -d hush-*`
77 for module
in $modules; do
78 do_test
$module || ret
=1
81 while [ $# -ge 1 ]; do