7 rm -rf DIR
* # remove any old junk lying around
8 passed
=`expr 0` # count number of tests run correctly
9 failed
=`expr 0` # count number of tests that failed
10 skipped
=`expr 0` # count number of tests that were skipped
11 total
=`expr 0` # total number of tests tried
12 badones
= # list of tests that failed
14 tests
=" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
15 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
16 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
18 sh1.sh sh2.sh interp.sh"
21 # Directory must be owned by bin
22 [ "$USER" != root
] || chown bin .
25 for i
in `echo $tests`; do
26 if [ -x .
/test$i ]; then
27 tests_no
=`expr $tests_no + 1`
31 # Print test welcome message
33 echo "Running POSIX compliance test suite. There are $tests_no tests in total."
36 # Provide an argument for test63
39 # Run all the tests, keeping track of who failed.
40 for i
in `echo $tests`
44 total
=`expr $total + 1`
47 testid
="`echo $i | sed 's/\..*//'`"
48 ARG
=`eval echo "\\${ARGS_$testid}"`
50 then su
- bin
-c "cd `pwd`; ./test$i $ARG" || FAIL
=1
51 else .
/test$i $ARG || FAIL
=1
54 then passed
=`expr $passed + 1`
55 else failed
=`expr $failed + 1`
56 badones
=`echo $badones " " $i`
59 skipped
=`expr $skipped + 1`
63 # Print results of the tests.
65 if test $total = $passed
66 then echo All
$passed tests completed without error \
($skipped skipped\
).
67 else echo Testing completed. Score
: $passed passed
, $failed failed
, \
69 echo The following tests failed
: $badones