aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-06-01 16:33:05 -0400
committerMike Frysinger <vapier@gentoo.org>2009-06-01 16:33:05 -0400
commiteab40e58858d01372b5d74b7330be2d7b1c7fc75 (patch)
treee1b1b8142efe9765f3787f4f51b1733af6d727c9 /shell
parenta1e5ebe9bd3cd0482f0badbacc1cb477d504b420 (diff)
downloadbusybox-w32-eab40e58858d01372b5d74b7330be2d7b1c7fc75.tar.gz
busybox-w32-eab40e58858d01372b5d74b7330be2d7b1c7fc75.tar.bz2
busybox-w32-eab40e58858d01372b5d74b7330be2d7b1c7fc75.zip
hush_test: stop mixing tabs/spaces for indentation
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'shell')
-rwxr-xr-xshell/hush_test/run-all74
1 files changed, 37 insertions, 37 deletions
diff --git a/shell/hush_test/run-all b/shell/hush_test/run-all
index cb9c5f321..470adaa9b 100755
--- a/shell/hush_test/run-all
+++ b/shell/hush_test/run-all
@@ -10,8 +10,8 @@ unset LC_TIME
10unset LC_ALL 10unset LC_ALL
11 11
12test -x hush || { 12test -x hush || {
13 echo "No ./hush - creating a link to ../../busybox" 13 echo "No ./hush - creating a link to ../../busybox"
14 ln -s ../../busybox hush 14 ln -s ../../busybox hush
15} 15}
16if test -e ../../.config ; then 16if test -e ../../.config ; then
17 eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' ../../.config) 17 eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' ../../.config)
@@ -25,48 +25,48 @@ export THIS_SH
25 25
26do_test() 26do_test()
27{ 27{
28 test -d "$1" || return 0 28 test -d "$1" || return 0
29 d=${d%/} 29 d=${d%/}
30# echo Running tests in directory "$1" 30# echo Running tests in directory "$1"
31 ( 31 (
32 tret=0 32 tret=0
33 cd "$1" || { echo "cannot cd $1!"; exit 1; } 33 cd "$1" || { echo "cannot cd $1!"; exit 1; }
34 for x in run-*; do 34 for x in run-*; do
35 test -f "$x" || continue 35 test -f "$x" || continue
36 case "$x" in 36 case "$x" in
37 "$0"|run-minimal|run-gprof) ;; 37 "$0"|run-minimal|run-gprof) ;;
38 *.orig|*~) ;; 38 *.orig|*~) ;;
39 #*) echo $x ; sh $x ;; 39 #*) echo $x ; sh $x ;;
40 *) 40 *)
41 sh "$x" >"../$1-$x.fail" 2>&1 && \ 41 sh "$x" >"../$1-$x.fail" 2>&1 && \
42 { echo "$1/$x: ok"; rm "../$1-$x.fail"; } || echo "$1/$x: fail"; 42 { echo "$1/$x: ok"; rm "../$1-$x.fail"; } || echo "$1/$x: fail";
43 ;; 43 ;;
44 esac 44 esac
45 done 45 done
46 # Many bash run-XXX scripts just do this, 46 # Many bash run-XXX scripts just do this,
47 # no point in duplication it all over the place 47 # no point in duplication it all over the place
48 for x in *.tests; do 48 for x in *.tests; do
49 test -x "$x" || continue 49 test -x "$x" || continue
50 name="${x%%.tests}" 50 name="${x%%.tests}"
51 test -f "$name.right" || continue 51 test -f "$name.right" || continue
52# echo Running test: "$x" 52# echo Running test: "$x"
53 ( 53 (
54 "$THIS_SH" "./$x" >"$name.xx" 2>&1 54 "$THIS_SH" "./$x" >"$name.xx" 2>&1
55 # filter C library differences 55 # filter C library differences
56 sed -i \ 56 sed -i \
57 -e "/: invalid option /s:'::g" \ 57 -e "/: invalid option /s:'::g" \
58 "$name.xx" 58 "$name.xx"
59 test $? -eq 77 && rm -f "../$1-$x.fail" && exit 77 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" 60 diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail"
61 ) 61 )
62 case $? in 62 case $? in
63 0) echo "$1/$x: ok";; 63 0) echo "$1/$x: ok";;
64 77) echo "$1/$x: skip (feature disabled)";; 64 77) echo "$1/$x: skip (feature disabled)";;
65 *) echo "$1/$x: fail"; tret=1;; 65 *) echo "$1/$x: fail"; tret=1;;
66 esac 66 esac
67 done 67 done
68 exit ${tret} 68 exit ${tret}
69 ) 69 )
70} 70}
71 71
72# Main part of this script 72# Main part of this script
@@ -75,19 +75,19 @@ do_test()
75ret=0 75ret=0
76 76
77if [ $# -lt 1 ]; then 77if [ $# -lt 1 ]; then
78 # All sub directories 78 # All sub directories
79 modules=`ls -d hush-*` 79 modules=`ls -d hush-*`
80 80
81 for module in $modules; do 81 for module in $modules; do
82 do_test $module || ret=1 82 do_test $module || ret=1
83 done 83 done
84else 84else
85 while [ $# -ge 1 ]; do 85 while [ $# -ge 1 ]; do
86 if [ -d $1 ]; then 86 if [ -d $1 ]; then
87 do_test $1 || ret=1 87 do_test $1 || ret=1
88 fi 88 fi
89 shift 89 shift
90 done 90 done
91fi 91fi
92 92
93exit ${ret} 93exit ${ret}