blob: 2ce39d17e1c24e969a7ab8667971986f0567061f [file] [log] [blame]
Eric Biederman90089602004-05-28 14:11:54 +00001#!/bin/sh
2type="simple"
3if [ -n "$1" ] ; then
4 type=$1
5fi
6if [ "$type" = "simple" ] ; then
7LIST="18 57 21 79 77 40 62 52 65 78 63 81 80 64 12 8 9 7 53 58 37 35 48 11 75 51 49 41 71 23 70 16 13 24 31 55 19 69 67 66 17 28 68 61 32 33 43 60 45 47 36 10 46 15 3 29 50 56 76 34 74 25 26 27 20 1 14 73 5 4"
8LIST="82 83 $LIST"
9BASE="simple_test"
10#REG_SKIP="34 73 5 33 45 47 25 27 26 20 "
11#SKIP="$REG_SKIP"
12EXPECTED_BAD="34 73 5 4"
13fi
14if [ "$type" = "linux" ] ; then
15LIST="1 2 3 4 5 6 7 8 9 10 11 12"
16BASE="linux_test"
17#SKIP="5"
18EXPECTED_BAD=""
19fi
20if [ "$type" = "raminit" ] ; then
21LIST="1 2 3 4 5 6"
22BASE="raminit_test"
23#SKIP="6"
24EXPECTED_BAD=""
Stefan Reinauer14e22772010-04-27 06:56:47 +000025fi
Eric Biederman90089602004-05-28 14:11:54 +000026if [ "$type" = "hello" ] ; then
27LIST="1 2"
28BASE="hello_world"
29EXPECTED_BAD=""
Stefan Reinauer14e22772010-04-27 06:56:47 +000030fi
Eric Biederman90089602004-05-28 14:11:54 +000031
32
33SKIPPED=""
34GOOD=""
35BAD=""
36OLD_BAD=""
37NEW_BAD=""
38NEW_GOOD=""
Stefan Reinauer14e22772010-04-27 06:56:47 +000039for i in $LIST ; do
Eric Biederman90089602004-05-28 14:11:54 +000040 DO_SKIP=""
41 for j in $SKIP ; do
42 if [ "$j" = "$i" ] ; then
43 DO_SKIP="yes"
44 break;
45 fi
46 done
47 if [ ! -z "$DO_SKIP" ] ; then
48 SKIPPED="$SKIPPED$i "
49 continue;
50 fi
51 PROBLEM=""
52 for j in $EXPECTED_BAD ; do
53 if [ "$j" = "$i" ] ; then
54 PROBLEM=":("
55 break;
56 fi
57 done
Stefan Reinauer14e22772010-04-27 06:56:47 +000058 echo -e -n "$i $PROBLEM\t"
59 if ./tests.sh $BASE $i > /dev/null 2> /dev/null ; then
Eric Biederman90089602004-05-28 14:11:54 +000060 echo OK
61 if [ ! -z "$PROBLEM" ] ; then
62 NEW_GOOD="$NEW_GOOD$i "
63 fi
64 GOOD="$GOOD$i "
65 else
66 echo -n "FAILED: "
67 tail -n 1 tests/$BASE$i.debug2 | tr -d '\r\n'
Stefan Reinauer14e22772010-04-27 06:56:47 +000068 echo
Eric Biederman90089602004-05-28 14:11:54 +000069 if [ -z "$PROBLEM" ] ; then
70 NEW_BAD="$NEW_BAD$i "
Stefan Reinauer14e22772010-04-27 06:56:47 +000071 else
Eric Biederman90089602004-05-28 14:11:54 +000072 OLD_BAD="$OLD_BAD$i "
73 fi
74 BAD="$BAD$i "
75 fi
76done
77echo -e "SKIPPED\t\t$SKIPPED"
78echo -e "FAILED\t\t$BAD"
79if [ ! -z "$NEW_BAD" ]; then
80 echo -e "NEW FAILED\t$NEW_BAD"
81fi
82echo -e "OK\t\t$GOOD"
83if [ ! -z "$NEW_GOOD" ]; then
84 echo -e "NEW OK\t\t$NEW_GOOD"
85fi
86
87for i in $NEW_BAD ; do
88 printf "%2d: " $i
89 tail -n 1 tests/$BASE$i.debug2 | tr -d '\n\r'
90 echo
91done
92echo "-----"
93for i in $OLD_BAD ; do
94 printf "%2d: " $i
95 tail -n 1 tests/$BASE$i.debug2
96done