This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: dg-extract-results.sh truncates logs containing "Running "
On 01/17/2013 01:47 PM, Pedro Alves wrote:
> On 01/17/2013 02:24 AM, David Blaikie wrote:
>> On Tue, Jan 15, 2013 at 7:25 AM, Pedro Alves <palves@redhat.com> wrote:
>>> Same script, same comment as the previous patch.
>>> Can you send this to gcc-patches@ , please?
>>
>> This & the other patch have both been submitted upstream in GCC:
>
> Thanks, I'll handle the merging.
Done. Tested on x86_64 Fedora 17, and committed. Patch
at the bottom.
Thanks David.
This brings in a 2010 change too.
A difference in the copyright headers remains afterwards:
$ diff -up /home/pedro/src/gcc/src/contrib/dg-extract-results.sh dg-extract-results.sh
--- /home/pedro/src/gcc/src/contrib/dg-extract-results.sh 2013-01-17 13:29:24.371296122 +0000
+++ dg-extract-results.sh 2013-01-17 14:18:45.537707397 +0000
@@ -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, 2010, 2012 Free Software Foundation
+# Copyright (C) 2008-2013 Free Software Foundation, Inc.
# Contributed by Janis Johnson <janis187@us.ibm.com>
#
# This file is part of GCC.
@@ -22,9 +22,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING. If not, write to
-# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
PROGNAME=dg-extract-results.sh
I saw that GCC is going through the process of
updating all their files to mention 2013 with a year range,
with a script, and moving to updating the years once
per year, like we do, so I'll just leave it at
that, and the difference may resolve itself in the
next weeks.
Can we add this file to the list of "3rd party" files
(I don't know where that is) that shouldn't get their
headers auto-updated in the future?
gdb/testsuite/
2013-01-17 Pedro Alves <palves@redhat.com>
Merge dg-extract-results.sh from upstream (svn 195224).
2013-01-15 David Blaikie <dblaikie@gmail.com>
* dg-extract-results.sh: Fix order of summary counts.
2013-01-15 David Blaikie <dblaikie@gmail.com>
* dg-extract-results.sh: Constrain the start-of-log pattern.
2013-01-15 David Blaikie <dblaikie@gmail.com>
* dg-extract-results.sh: Handle KPASSes.
2010-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* dg-extract-results.sh: Redirect grep output to /dev/null instead
of grep -q.
---
gdb/testsuite/dg-extract-results.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/dg-extract-results.sh b/gdb/testsuite/dg-extract-results.sh
index 574833e..7df2bb4 100755
--- a/gdb/testsuite/dg-extract-results.sh
+++ b/gdb/testsuite/dg-extract-results.sh
@@ -222,7 +222,7 @@ else
VARIANTS=""
for VAR in $VARS
do
- grep -q "Running target $VAR" $SUM_FILES && VARIANTS="$VARIANTS $VAR"
+ grep "Running target $VAR" $SUM_FILES > /dev/null && VARIANTS="$VARIANTS $VAR"
done
fi
@@ -286,7 +286,7 @@ BEGIN {
/^Using / {
if (variant == curvar && print_using) { print; next }
}
-/^Running / {
+/^Running .*\\.exp \\.\\.\\./ {
print_using=0
if (variant == curvar) {
if (need_close) close(curfile)
@@ -343,7 +343,7 @@ EOF
BEGIN {
variant="$VAR"
tool="$TOOL"
- passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0;
+ passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kpasscnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0;
curvar=""; insummary=0
}
/^Running target / { curvar = \$3; next }
@@ -352,6 +352,7 @@ BEGIN {
/^# of unexpected successes/ { if (insummary == 1) xpasscnt += \$5; next; }
/^# of unexpected failures/ { if (insummary == 1) failcnt += \$5; next; }
/^# of expected failures/ { if (insummary == 1) xfailcnt += \$5; next; }
+/^# of unknown successes/ { if (insummary == 1) kpasscnt += \$5; next; }
/^# of known failures/ { if (insummary == 1) kfailcnt += \$5; next; }
/^# of untested testcases/ { if (insummary == 1) untstcnt += \$5; next; }
/^# of unresolved testcases/ { if (insummary == 1) unrescnt += \$5; next; }
@@ -367,6 +368,7 @@ END {
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 (kpasscnt != 0) printf ("# of unknown successes\t\t%d\n", kpasscnt)
if (kfailcnt != 0) printf ("# of known failures\t\t%d\n", kfailcnt)
if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt)
if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt)
@@ -397,6 +399,7 @@ BEGIN {
/^# of unexpected failures/ { failcnt += \$5 }
/^# of unexpected successes/ { xpasscnt += \$5 }
/^# of expected failures/ { xfailcnt += \$5 }
+/^# of unknown successes/ { kpasscnt += \$5 }
/^# of known failures/ { kfailcnt += \$5 }
/^# of untested testcases/ { untstcnt += \$5 }
/^# of unresolved testcases/ { unrescnt += \$5 }
@@ -407,6 +410,7 @@ END {
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 (kpasscnt != 0) printf ("# of unknown successes\t\t%d\n", kpasscnt)
if (kfailcnt != 0) printf ("# of known failures\t\t%d\n", kfailcnt)
if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt)
if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt)
@@ -420,6 +424,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 -2 $FIRST_SUM | grep -q '^#' || tail -2 $FIRST_SUM
+tail -2 $FIRST_SUM | grep '^#' > /dev/null || tail -2 $FIRST_SUM
exit 0