projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix typo in comment
[oweals/busybox.git]
/
shell
/
ash_test
/
run-all
diff --git
a/shell/ash_test/run-all
b/shell/ash_test/run-all
index e023338880b531ea710a192b55355e1c579e1c9a..ad93e251d033b9bca2a8c0ab538d52a389825bff 100755
(executable)
--- a/
shell/ash_test/run-all
+++ b/
shell/ash_test/run-all
@@
-1,8
+1,10
@@
#!/bin/sh
#!/bin/sh
+TOPDIR=$PWD
+
test -x ash || {
test -x ash || {
- echo "No ./ash
?! Perhaps you want to run 'ln -s ../../busybox ash'
"
- exit
+ echo "No ./ash
- creating a link to ../../busybox
"
+ ln -s ../../busybox ash
}
test -x printenv || gcc -O2 -o printenv printenv.c || exit $?
test -x recho || gcc -O2 -o recho recho.c || exit $?
}
test -x printenv || gcc -O2 -o printenv printenv.c || exit $?
test -x recho || gcc -O2 -o recho recho.c || exit $?
@@
-17,7
+19,9
@@
export THIS_SH
do_test()
{
test -d "$1" || return 0
do_test()
{
test -d "$1" || return 0
- echo do_test "$1"
+# echo do_test "$1"
+ # $1 but with / replaced by # so that it can be used as filename part
+ noslash=`echo "$1" | sed 's:/:#:g'`
(
cd "$1" || { echo "cannot cd $1!"; exit 1; }
for x in run-*; do
(
cd "$1" || { echo "cannot cd $1!"; exit 1; }
for x in run-*; do
@@
-27,8
+31,8
@@
do_test()
*.orig|*~) ;;
#*) echo $x ; sh $x ;;
*)
*.orig|*~) ;;
#*) echo $x ; sh $x ;;
*)
- sh "$x" >"
../$1
-$x.fail" 2>&1 && \
- { echo "$1/$x: ok"; rm "
../$1
-$x.fail"; } || echo "$1/$x: fail";
+ sh "$x" >"
$TOPDIR/$noslash
-$x.fail" 2>&1 && \
+ { echo "$1/$x: ok"; rm "
$TOPDIR/$noslash
-$x.fail"; } || echo "$1/$x: fail";
;;
esac
done
;;
esac
done
@@
-40,7
+44,8
@@
do_test()
test -f "$name.right" || continue
{
"$THIS_SH" "./$x" >"$name.xx" 2>&1
test -f "$name.right" || continue
{
"$THIS_SH" "./$x" >"$name.xx" 2>&1
- diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail"
+ diff -u "$name.xx" "$name.right" >"$TOPDIR/$noslash-$x.fail" \
+ && rm -f "$name.xx" "$TOPDIR/$noslash-$x.fail"
} && echo "$1/$x: ok" || echo "$1/$x: fail"
done
)
} && echo "$1/$x: ok" || echo "$1/$x: fail"
done
)
@@
-52,6
+57,9
@@
do_test()
if [ $# -lt 1 ]; then
# All sub directories
modules=`ls -d ash-*`
if [ $# -lt 1 ]; then
# All sub directories
modules=`ls -d ash-*`
+ # If you want to test ash against hush and msh testsuites
+ # (have to copy hush_test and msh_test dirs to current dir first):
+ #modules=`ls -d ash-* hush_test/hush-* msh_test/msh-*`
for module in $modules; do
do_test $module
for module in $modules; do
do_test $module