13 echo "No ./hush - creating a link to ../../busybox"
14 ln -s ../../busybox hush
16 if test ! -e .config; then
17 if test -f ../../.config; then
18 cp ../../.config . || exit 1
20 echo "Missing .config file"
24 eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' .config)
26 PATH="`pwd`:$PATH" # for hush and recho/zecho/printenv
34 test -d "$1" || return 0
36 # echo Running tests in directory "$1"
39 cd "$1" || { echo "cannot cd $1!"; exit 1; }
41 test -f "$x" || continue
43 "$0"|run-minimal|run-gprof) ;;
45 #*) echo $x ; sh $x ;;
47 sh "$x" >"../$1-$x.fail" 2>&1 && \
48 { echo "$1/$x: ok"; rm "../$1-$x.fail"; } || echo "$1/$x: fail";
52 # Many bash run-XXX scripts just do this,
53 # no point in duplication it all over the place
55 test -x "$x" || continue
57 test -f "$name.right" || continue
58 # echo Running test: "$x"
60 "$THIS_SH" "./$x" >"$name.xx" 2>&1
61 # filter C library differences
63 -e "/: invalid option /s:'::g" \
65 test $? -eq 77 && rm -f "../$1-$x.fail" && exit 77
66 diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail"
70 77) echo "$1/$x: skip (feature disabled)";;
71 *) echo "$1/$x: fail"; tret=1;;
78 # Main part of this script
79 # Usage: run-all [directories]
85 modules=`ls -d hush-*`
87 for module in $modules; do
88 do_test $module || ret=1
91 while [ $# -ge 1 ]; do