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