This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix *.log tests merged output containing "==="
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 9 Mar 2010 00:10:19 +0100
- Subject: [patch] Fix *.log tests merged output containing "==="
Hi,
while *.sum files were OK the *.log files sometimes miss the content present
in *.sum results. For example gdb.base/bitfields.exp output was missing while
gdb.base/bitfields.exp output was present.
It got broken if arbitrary "===" string has appeared in the tests output.
Grepped dejagnu the proposed more strict pattern should match fine:
$ grep === `rpm -ql dejagnu`
/usr/share/dejagnu/framework.exp: clone_output "\n\t\t=== $tool Summary for $current_target_name ===\n"
/usr/share/dejagnu/framework.exp: clone_output "\n\t\t=== $tool Summary ===\n"
/usr/share/dejagnu/runtest.exp:clone_output "\n\t\t=== $tool tests ===\n"
For GDB `grep '^Running ' gdb.log | wc -l' changes 1770 -> 1818.
For GCC `cat *.log | wc -l' changes 444633 -> 482178.
(checked the output change looks OK for both cases)
I am not aware why there was "/\===/" instead of just "/===/".
OK to check-in? (GCC + GDB approval requested)
Thanks,
Jan
gdb/testsuite/ | contrib/
2010-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix *.log tests output containing "===".
* dg-extract-results.sh (/\===/): Rename to ...
(/^\t\t=== .* ===$/): ... this pattern.
--- a/gdb/testsuite/dg-extract-results.sh
+++ b/gdb/testsuite/dg-extract-results.sh
@@ -299,7 +299,7 @@ BEGIN {
next
}
}
-/\===/ { curvar = ""; next }
+/^\t\t=== .* ===$/ { curvar = ""; next }
/^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED|WARNING|ERROR|UNSUPPORTED|UNTESTED|KFAIL):/ {
testname=\$2
# Ugly hack for gfortran.dg/dg.exp