aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2005-02-01 17:31:33 +0000
committerJanis Johnson <janis@gcc.gnu.org>2005-02-01 17:31:33 +0000
commit0e7eed46026720d0a1a0696128499293913566bf (patch)
tree6af5cbc744f967ea9d400adeb434f4f0c55f7f52 /gcc
parent395909dddc2f0412da11261052aaaf41d55b0960 (diff)
downloadgcc-0e7eed46026720d0a1a0696128499293913566bf.zip
gcc-0e7eed46026720d0a1a0696128499293913566bf.tar.gz
gcc-0e7eed46026720d0a1a0696128499293913566bf.tar.bz2
test-framework.awk: Change recording and printing of passes and failures.
* gcc.test-framework/test-framework.awk: Change recording and printing of passes and failures. From-SVN: r94549
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.test-framework/test-framework.awk43
2 files changed, 34 insertions, 12 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c572d3c..7a3356c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2005-02-01 Janis Johnson <janis187@us.ibm.com>
+ * gcc.test-framework/test-framework.awk: Change recording and
+ printing of passes and failures.
+
* gcc.test-framework: New directory.
* gcc.test-framework/README: New.
* gcc.test-framework/test-framework.exp: New.
diff --git a/gcc/testsuite/gcc.test-framework/test-framework.awk b/gcc/testsuite/gcc.test-framework/test-framework.awk
index cddcb4c..90e76ca 100644
--- a/gcc/testsuite/gcc.test-framework/test-framework.awk
+++ b/gcc/testsuite/gcc.test-framework/test-framework.awk
@@ -19,24 +19,43 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-BEGIN { skip = 1; pass = 0 }
+function pass(msg) {
+ passes++;
+ # printf("pass %s\n", $0);
+ }
+function fail(msg) {
+ fails++;
+ printf("fail %s\n", $0);
+ }
+function ignore(msg) {
+ # printf("ignore %s\n", $0);
+ }
+
+BEGIN { skip = 1; passes = 0; fails = 0; }
/Running.*test-frame/ { skip = 0; next }
/gcc Summary/ { skip = 1; next }
{ if (skip) next }
/^$/ { next }
# The post tests are always expected to pass.
-/^PASS.*-2.c/ { next }
+/^PASS.*-2.c/ { ignore(); next }
# dg-xfail-if applies to the compile step; these should be XPASS for the
# compile step on dox tests, which are run tests.
-/^XPASS.*dox.*xiff.*-1.c.*(test for excess errors)/ { next }
+/^XPASS.*dox.*xiff.*-1.c.*(test for excess errors)/ { ignore(); next }
# xfail for scan-assembler-not tests doesn't apply to the compile step.
-/^PASS.*sa.*-1.c.*(test for excess errors)/ { next }
+/^PASS.*sa.*-1.c.*(test for excess errors)/ { ignore(); next }
# The other dox tests pass the compile step; ignore that message.
-/^PASS.*dox.*(test for excess errors)/ { next }
-/^PASS/ { if (match ($0, "exp-P")) { pass++; next } }
-/^FAIL/ { if (match ($0, "exp-F")) { pass++; next } }
-/^XPASS/ { if (match ($0, "exp-XP")) { pass++; next } }
-/^XFAIL/ { if (match ($0, "exp-XF")) { pass++; next } }
-/^UNSUPPORTED/ { if (match ($0, "exp-U")) { pass++; next } }
- { print }
-END { printf("%d tests passed\n", pass) }
+/^PASS.*dox.*(test for excess errors)/ { ignore(); next }
+# Ignore lines that begin with comma.
+/^,/ { ignore(); next }
+/^PASS/ { if (match ($0, "exp-P")) { pass(); next } }
+/^FAIL/ { if (match ($0, "exp-F")) { pass(); next } }
+/^XPASS/ { if (match ($0, "exp-XP")) { pass(); next } }
+/^XFAIL/ { if (match ($0, "exp-XF")) { pass(); next } }
+/^UNSUPPORTED/ { if (match ($0, "exp-U")) { pass(); next } }
+ { fail() }
+END {
+ printf("\n\t\t=== Test Framework Summary ===\n\n");
+ printf("# of expected passes\t\t%d\n", passes);
+ if (fails != 0)
+ printf("# of unexpected failures\t%d\n", fails);
+ }