6 echo "No ./ash - creating a link to ../../busybox"
7 ln -s ../../busybox ash
9 test -x printenv || gcc -O2 -o printenv printenv.c || exit $?
10 test -x recho || gcc -O2 -o recho recho.c || exit $?
11 test -x zecho || gcc -O2 -o zecho zecho.c || exit $?
13 PATH="$PWD:$PATH" # for ash and recho/zecho/printenv
21 test -d "$1" || return 0
23 # $1 but with / replaced by # so that it can be used as filename part
24 noslash=`echo "$1" | sed 's:/:#:g'`
26 cd "$1" || { echo "cannot cd $1!"; exit 1; }
28 test -f "$x" || continue
30 "$0"|run-minimal|run-gprof) ;;
32 #*) echo $x ; sh $x ;;
34 sh "$x" >"$TOPDIR/$noslash-$x.fail" 2>&1 && \
35 { echo "$1/$x: ok"; rm "$TOPDIR/$noslash-$x.fail"; } || echo "$1/$x: fail";
39 # Many bash run-XXX scripts just do this,
40 # no point in duplication it all over the place
42 test -x "$x" || continue
44 test -f "$name.right" || continue
46 "$THIS_SH" "./$x" >"$name.xx" 2>&1
47 diff -u "$name.xx" "$name.right" >"$TOPDIR/$noslash-$x.fail" \
48 && rm -f "$name.xx" "$TOPDIR/$noslash-$x.fail"
49 } && echo "$1/$x: ok" || echo "$1/$x: fail"
54 # main part of this script
55 # Usage: run-all [directories]
60 # If you want to test ash against hush and msh testsuites
61 # (have to copy hush_test and msh_test dirs to current dir first):
62 #modules=`ls -d ash-* hush_test/hush-* msh_test/msh-*`
64 for module in $modules; do
68 while [ $# -ge 1 ]; do