ahci: link FIS receive mode to memory allocation
[minix.git] / test / run
blob67d847cbb75af066d037867453a31d3d3d83292d
1 #!/bin/sh
3 # Initialization
4 PATH=:/bin:/usr/bin
5 export PATH
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 \
17 61 62 63 64 65 \
18 sh1.sh sh2.sh interp.sh"
19 tests_no=`expr 0`
21 # Directory must be owned by bin
22 [ "$USER" != root ] || chown bin .
24 # Count tests
25 for i in `echo $tests`; do
26 if [ -x ./test$i ]; then
27 tests_no=`expr $tests_no + 1`
29 done
31 # Print test welcome message
32 clr
33 echo "Running POSIX compliance test suite. There are $tests_no tests in total."
34 echo " "
36 # Provide an argument for test63
37 ARGS_63=`pwd`/mod
39 # Run all the tests, keeping track of who failed.
40 for i in `echo $tests`
42 if [ -x ./test$i ]
43 then
44 total=`expr $total + 1`
45 FAIL=0
46 unset ARG
47 testid="`echo $i | sed 's/\..*//'`"
48 ARG=`eval echo "\\${ARGS_$testid}"`
49 if [ "$USER" = root ]
50 then su - bin -c "cd `pwd`; ./test$i $ARG" || FAIL=1
51 else ./test$i $ARG || FAIL=1
53 if [ $FAIL -eq 0 ]
54 then passed=`expr $passed + 1`
55 else failed=`expr $failed + 1`
56 badones=`echo $badones " " $i`
58 else
59 skipped=`expr $skipped + 1`
61 done
63 # Print results of the tests.
64 echo " "
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, \
68 skipped $skipped
69 echo The following tests failed: $badones
72 # echo " "