1 |
300 |
jeremybenn |
# Process the gcc.sum file for a run through gcc.test-framework.
|
2 |
|
|
# Print result lines that show potential problems. Report the number
|
3 |
|
|
# of passing tests.
|
4 |
|
|
#
|
5 |
|
|
#
|
6 |
|
|
# Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009
|
7 |
|
|
# Free Software Foundation, Inc.
|
8 |
|
|
#
|
9 |
|
|
# This file is free software; you can redistribute it and/or modify
|
10 |
|
|
# it under the terms of the GNU General Public License as published by
|
11 |
|
|
# the Free Software Foundation; either version 3 of the License, or
|
12 |
|
|
# (at your option) any later version.
|
13 |
|
|
#
|
14 |
|
|
# This program is distributed in the hope that it will be useful,
|
15 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
|
|
# GNU General Public License for more details.
|
18 |
|
|
#
|
19 |
|
|
# You should have received a copy of the GNU General Public License
|
20 |
|
|
# along with GCC; see the file COPYING3. If not see
|
21 |
|
|
# <http://www.gnu.org/licenses/>.
|
22 |
|
|
|
23 |
|
|
function pass(msg) {
|
24 |
|
|
passes++;
|
25 |
|
|
# printf("pass %s\n", $0);
|
26 |
|
|
}
|
27 |
|
|
function fail(msg) {
|
28 |
|
|
fails++;
|
29 |
|
|
printf("fail %s\n", $0);
|
30 |
|
|
}
|
31 |
|
|
function ignore(msg) {
|
32 |
|
|
# printf("ignore %s\n", $0);
|
33 |
|
|
}
|
34 |
|
|
|
35 |
|
|
BEGIN { skip = 1; passes = 0; fails = 0; }
|
36 |
|
|
/Running.*test-frame/ { skip = 0; next }
|
37 |
|
|
/gcc Summary/ { skip = 1; next }
|
38 |
|
|
{ if (skip) next }
|
39 |
|
|
/^$/ { next }
|
40 |
|
|
# The post tests are always expected to pass.
|
41 |
|
|
/^PASS.*-2.c/ { ignore(); next }
|
42 |
|
|
# dg-xfail-if applies to the compile step; these should be XPASS for the
|
43 |
|
|
# compile step on dox tests, which are run tests.
|
44 |
|
|
/^XPASS.*dox.*xiff.*-1.c.*\(test for excess errors\)/ { ignore(); next }
|
45 |
|
|
# xfail for scan-assembler-not tests doesn't apply to the compile step.
|
46 |
|
|
/^PASS.*sa.*-1.c.*\(test for excess errors\)/ { ignore(); next }
|
47 |
|
|
# ignore compile step, tests for warnings for output-exists[-not] tests.
|
48 |
|
|
/dg-outexists.*\(test for excess errors)/ { ignore(); next }
|
49 |
|
|
/dg-outexists.*\(test for warnings/ { ignore(); next }
|
50 |
|
|
/dg-outexists.*\(test for errors/ { ignore(); next }
|
51 |
|
|
# ignore compile step for dg-xfail-run-if tests.
|
52 |
|
|
/run-xrif.*\(test for excess errors)/ { ignore(); next }
|
53 |
|
|
# The other dox tests pass the compile step; ignore that message.
|
54 |
|
|
/^PASS.*dox.*\(test for excess errors\)/ { ignore(); next }
|
55 |
|
|
# The sf tests pass the compile step; ignore that message.
|
56 |
|
|
/^PASS.*sf.*\(test for excess errors\)/ { ignore(); next }
|
57 |
|
|
# Ignore passing compile step for scan tests.
|
58 |
|
|
/^PASS.*scan.*\(test for excess errors\)/ { ignore(); next }
|
59 |
|
|
# Ignore lines that begin with comma.
|
60 |
|
|
/^,/ { ignore(); next }
|
61 |
|
|
# For tests of dg-output, ignore successful compilation.
|
62 |
|
|
/^PASS.*dg-output.*\(test for excess errors\)/ { ignore(); next }
|
63 |
|
|
# For tests of dg-output, ignore successful execution.
|
64 |
|
|
/^PASS.*dg-output.*execution test/ { ignore(); next }
|
65 |
|
|
/^PASS/ { if (match ($0, "exp-P")) { pass(); next } }
|
66 |
|
|
/^FAIL/ { if (match ($0, "exp-F")) { pass(); next } }
|
67 |
|
|
/^XPASS/ { if (match ($0, "exp-XP")) { pass(); next } }
|
68 |
|
|
/^XFAIL/ { if (match ($0, "exp-XF")) { pass(); next } }
|
69 |
|
|
/^UNSUPPORTED/ { if (match ($0, "exp-U")) { pass(); next } }
|
70 |
|
|
{ fail() }
|
71 |
|
|
END {
|
72 |
|
|
printf("\n\t\t=== Test Framework Summary ===\n\n");
|
73 |
|
|
printf("# of expected passes\t\t%d\n", passes);
|
74 |
|
|
if (fails != 0)
|
75 |
|
|
printf("# of unexpected failures\t%d\n", fails);
|
76 |
|
|
}
|