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 ;;
35 sh "$x" >"$TOPDIR/$noslash-$x.fail" 2>&1 && \
36 { echo "ok"; rm "$TOPDIR/$noslash-$x.fail"; } || echo "fail";
40 # Many bash run-XXX scripts just do this,
41 # no point in duplication it all over the place
43 test -x "$x" || continue
45 test -f "$name.right" || continue
48 "$THIS_SH" "./$x" >"$name.xx" 2>&1
49 diff -u "$name.xx" "$name.right" >"$TOPDIR/$noslash-$x.fail" \
50 && rm -f "$name.xx" "$TOPDIR/$noslash-$x.fail"
51 } && echo "ok" || echo "fail"
56 # main part of this script
57 # Usage: run-all [directories]
62 # If you want to test ash against hush and msh testsuites
63 # (have to copy hush_test and msh_test dirs to current dir first):
64 #modules=`ls -d ash-* hush_test/hush-* msh_test/msh-*`
66 for module in $modules; do
70 while [ $# -ge 1 ]; do