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 # filter C library differences
57 -e "/: invalid option /s:'::g" \
59 test $? -eq 77 && rm -f "../$1-$x.fail" && exit 77
60 diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail"
64 77) echo "$1/$x: skip (feature disabled)";;
65 *) echo "$1/$x: fail"; tret=1;;
72 # Main part of this script
73 # Usage: run-all [directories]
79 modules=`ls -d hush-*`
81 for module in $modules; do
82 do_test $module || ret=1
85 while [ $# -ge 1 ]; do