Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Fix *.log tests merged output containing "==="
@ 2010-03-08 23:10 Jan Kratochvil
  2010-03-22 19:40 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kratochvil @ 2010-03-08 23:10 UTC (permalink / raw)
  To: gdb-patches, gcc-patches

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Fix *.log tests merged output containing "==="
  2010-03-08 23:10 [patch] Fix *.log tests merged output containing "===" Jan Kratochvil
@ 2010-03-22 19:40 ` Tom Tromey
  2010-03-22 20:24   ` Jan Kratochvil
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2010-03-22 19:40 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches, gcc-patches

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> while *.sum files were OK the *.log files sometimes miss the
Jan> content present in *.sum results.  For example
Jan> gdb.base/bitfields.exp output was missing while
Jan> gdb.base/bitfields.exp output was present.

Jan> OK to check-in?  (GCC + GDB approval requested)

This is ok for gdb as well.
Thanks.

Tom


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Fix *.log tests merged output containing "==="
  2010-03-22 19:40 ` Tom Tromey
@ 2010-03-22 20:24   ` Jan Kratochvil
  2010-03-22 20:26     ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kratochvil @ 2010-03-22 20:24 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On Mon, 22 Mar 2010 20:39:53 +0100, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 
> Jan> while *.sum files were OK the *.log files sometimes miss the
> Jan> content present in *.sum results.  For example
> Jan> gdb.base/bitfields.exp output was missing while
> Jan> gdb.base/bitfields.exp output was present.
> 
> Jan> OK to check-in?  (GCC + GDB approval requested)
> 
> This is ok for gdb as well.
> Thanks.

I see now I would rather sync it with gcc, OK to check in this way?

(I should have asked differently in the first place.)


Thanks,
Jan


2010-03-22  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* dg-extract-results.sh: Sync with GCC HEAD (import r155655, r157175
	and r157645).

--- gdbhead/gdb/testsuite/dg-extract-results.sh	2010-03-08 23:57:02.000000000 +0100
+++ gcchead/contrib/dg-extract-results.sh	2010-03-22 18:35:18.000000000 +0100
@@ -6,7 +6,7 @@
 # The resulting file can be used with test result comparison scripts for
 # results from tests that were run in parallel.  See usage() below.
 
-# Copyright (C) 2008, 2009 Free Software Foundation
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation
 # Contributed by Janis Johnson <janis187@us.ibm.com>
 #
 # This file is part of GCC.
@@ -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
@@ -365,8 +365,8 @@ BEGIN {
 END {
   printf ("\t\t=== %s Summary for %s ===\n\n", tool, variant)
   if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt)
-  if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)
   if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)
+  if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)
   if (xfailcnt != 0) printf ("# of expected failures\t\t%d\n", xfailcnt)
   if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt)
   if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt)
@@ -418,6 +418,6 @@ cat ${TMP}/var-* | $AWK -f $TOTAL_AWK
 # This is ugly, but if there's version output from the compiler under test
 # at the end of the file, we want it.  The other thing that might be there
 # is the final summary counts.
-tail -n 2 $FIRST_SUM | grep -q '^#' || tail -n 2 $FIRST_SUM
+tail -2 $FIRST_SUM | grep -q '^#' || tail -2 $FIRST_SUM
 
 exit 0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Fix *.log tests merged output containing "==="
  2010-03-22 20:24   ` Jan Kratochvil
@ 2010-03-22 20:26     ` Tom Tromey
  2010-03-22 20:41       ` Jan Kratochvil
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2010-03-22 20:26 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> I see now I would rather sync it with gcc, OK to check in this way?

Yes, thanks.

Tom


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Fix *.log tests merged output containing "==="
  2010-03-22 20:26     ` Tom Tromey
@ 2010-03-22 20:41       ` Jan Kratochvil
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kratochvil @ 2010-03-22 20:41 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On Mon, 22 Mar 2010 21:26:32 +0100, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 
> Jan> I see now I would rather sync it with gcc, OK to check in this way?
> 
> Yes, thanks.

Checked-in:
	http://sourceware.org/ml/gdb-cvs/2010-03/msg00204.html

It has imported these patches:
r155655	http://gcc.gnu.org/ml/gcc-patches/2010-01/msg00340.html
r157175	http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00125.html
r157645	http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00309.html


Thanks,
Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-22 20:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-08 23:10 [patch] Fix *.log tests merged output containing "===" Jan Kratochvil
2010-03-22 19:40 ` Tom Tromey
2010-03-22 20:24   ` Jan Kratochvil
2010-03-22 20:26     ` Tom Tromey
2010-03-22 20:41       ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox