public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] contrib: sync dg-extract-results.py with GCC
@ 2024-03-11 20:57 Sam James
  2024-03-11 20:57 ` [PATCH 2/2] contrib: sync dg-extract-results.sh " Sam James
  2024-03-12 14:46 ` [PATCH 1/2] contrib: sync dg-extract-results.py " Tom Tromey
  0 siblings, 2 replies; 5+ messages in thread
From: Sam James @ 2024-03-11 20:57 UTC (permalink / raw)
  To: gdb-patches; +Cc: binutils, Sam James

This syncs dg-extract-results.py with GCC.

It contains only one commit: r14-7145-g8f67953d0198fe.

contrib/ChangeLog:
        * dg-extract-results.py: Sync with GCC.
---
 contrib/ChangeLog             | 4 ++++
 contrib/dg-extract-results.py | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 87526afc787..369bcc5bee2 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,7 @@
+2024-03-11  Sam James  <sam@gentoo.org>
+
+	* dg-extract-results.py: Sync with GCC.
+
 2020-09-25  Simon Marchi  <simon.marchi@polymtl.ca>
 
 	* mklog.py: New file, imported from gcc.
diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
index 30aa68771d4..0fe3c5f1519 100644
--- a/contrib/dg-extract-results.py
+++ b/contrib/dg-extract-results.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-# Copyright (C) 2014 Free Software Foundation, Inc.
+# Copyright (C) 2014-2024 Free Software Foundation, Inc.
 #
 # This script is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -113,7 +113,8 @@ class Prog:
         # Whether to create .sum rather than .log output.
         self.do_sum = True
         # Regexps used while parsing.
-        self.test_run_re = re.compile (r'^Test Run By (\S+) on (.*)$')
+        self.test_run_re = re.compile (r'^Test run by (\S+) on (.*)$',
+                                       re.IGNORECASE)
         self.tool_re = re.compile (r'^\t\t=== (.*) tests ===$')
         self.result_re = re.compile (r'^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED'
                                      r'|WARNING|ERROR|UNSUPPORTED|UNTESTED'
-- 
2.44.0


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

* [PATCH 2/2] contrib: sync dg-extract-results.sh with GCC
  2024-03-11 20:57 [PATCH 1/2] contrib: sync dg-extract-results.py with GCC Sam James
@ 2024-03-11 20:57 ` Sam James
  2024-03-12 14:46   ` Tom Tromey
  2024-03-12 14:46 ` [PATCH 1/2] contrib: sync dg-extract-results.py " Tom Tromey
  1 sibling, 1 reply; 5+ messages in thread
From: Sam James @ 2024-03-11 20:57 UTC (permalink / raw)
  To: gdb-patches; +Cc: binutils, Sam James

This syncs dg-extract-results.sh with GCC.

It contains two commits: r14-4333-g346f5991569fae and r14-9393-g64273a7e6bd8ba.

contrib/ChangeLog:
	* dg-extract-results.sh: Sync with GCC.
---
 contrib/ChangeLog             |  1 +
 contrib/dg-extract-results.sh | 21 ++++++++++++---------
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 369bcc5bee2..e5c54c330f4 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,6 +1,7 @@
 2024-03-11  Sam James  <sam@gentoo.org>
 
 	* dg-extract-results.py: Sync with GCC.
+	* dg-extract-results.sh: Sync with GCC.
 
 2020-09-25  Simon Marchi  <simon.marchi@polymtl.ca>
 
diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
index ff6c50d029c..539d596a89d 100755
--- a/contrib/dg-extract-results.sh
+++ b/contrib/dg-extract-results.sh
@@ -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-2024 Free Software Foundation, Inc.
 # Contributed by Janis Johnson <janis187@us.ibm.com>
 #
 # This file is part of GCC.
@@ -28,14 +28,17 @@
 
 PROGNAME=dg-extract-results.sh
 
-# Try to use the python version if possible, since it tends to be faster.
+# Try to use the python version if possible, since it tends to be faster and
+# produces more stable results.
 PYTHON_VER=`echo "$0" | sed 's/sh$/py/'`
-if test "$PYTHON_VER" != "$0" &&
-   test -f "$PYTHON_VER" &&
-   python -c 'import sys, getopt, re, io, datetime, operator; sys.exit (0 if sys.version_info >= (2, 6) else 1)' \
-     > /dev/null 2> /dev/null; then
-  exec python $PYTHON_VER "$@"
-fi
+for python in python3 python python2 ; do
+  if test "$PYTHON_VER" != "$0" &&
+     test -f "$PYTHON_VER" &&
+     ${python} -c 'import sys, getopt, re, io, datetime, operator; sys.exit (0 if sys.version_info >= (2, 6) else 1)' \
+       > /dev/null 2> /dev/null; then
+    exec ${python} $PYTHON_VER "$@"
+  fi
+done
 
 usage() {
   cat <<EOF >&2
@@ -271,7 +274,7 @@ cat $SUM_FILES \
 
 # Write the begining of the combined summary file.
 
-head -n 2 $FIRST_SUM
+head -n 3 $FIRST_SUM
 echo
 echo "		=== $TOOL tests ==="
 echo
-- 
2.44.0


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

* Re: [PATCH 1/2] contrib: sync dg-extract-results.py with GCC
  2024-03-11 20:57 [PATCH 1/2] contrib: sync dg-extract-results.py with GCC Sam James
  2024-03-11 20:57 ` [PATCH 2/2] contrib: sync dg-extract-results.sh " Sam James
@ 2024-03-12 14:46 ` Tom Tromey
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2024-03-12 14:46 UTC (permalink / raw)
  To: Sam James; +Cc: gdb-patches, binutils

>>>>> "Sam" == Sam James <sam@gentoo.org> writes:

Sam> This syncs dg-extract-results.py with GCC.
Sam> It contains only one commit: r14-7145-g8f67953d0198fe.

Sam> contrib/ChangeLog:
Sam>         * dg-extract-results.py: Sync with GCC.

Thank you.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

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

* Re: [PATCH 2/2] contrib: sync dg-extract-results.sh with GCC
  2024-03-11 20:57 ` [PATCH 2/2] contrib: sync dg-extract-results.sh " Sam James
@ 2024-03-12 14:46   ` Tom Tromey
  2024-03-12 15:50     ` Sam James
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2024-03-12 14:46 UTC (permalink / raw)
  To: Sam James; +Cc: gdb-patches, binutils

>>>>> "Sam" == Sam James <sam@gentoo.org> writes:

Sam> This syncs dg-extract-results.sh with GCC.
Sam> It contains two commits: r14-4333-g346f5991569fae and r14-9393-g64273a7e6bd8ba.

Sam> contrib/ChangeLog:
Sam> 	* dg-extract-results.sh: Sync with GCC.

Thanks.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

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

* Re: [PATCH 2/2] contrib: sync dg-extract-results.sh with GCC
  2024-03-12 14:46   ` Tom Tromey
@ 2024-03-12 15:50     ` Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2024-03-12 15:50 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches, binutils

Tom Tromey <tom@tromey.com> writes:

>>>>>> "Sam" == Sam James <sam@gentoo.org> writes:
>
> Sam> This syncs dg-extract-results.sh with GCC.
> Sam> It contains two commits: r14-4333-g346f5991569fae and r14-9393-g64273a7e6bd8ba.
>
> Sam> contrib/ChangeLog:
> Sam> 	* dg-extract-results.sh: Sync with GCC.
>
> Thanks.
> Approved-By: Tom Tromey <tom@tromey.com>

Thanks, pushed. I also appreciate the speedy reviews on the sync stuff
in particular. It's a bit labourious so getting it done and out of the
way to move onto the next thing is helpful :)

>
> Tom

best,
sam

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

end of thread, other threads:[~2024-03-12 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-11 20:57 [PATCH 1/2] contrib: sync dg-extract-results.py with GCC Sam James
2024-03-11 20:57 ` [PATCH 2/2] contrib: sync dg-extract-results.sh " Sam James
2024-03-12 14:46   ` Tom Tromey
2024-03-12 15:50     ` Sam James
2024-03-12 14:46 ` [PATCH 1/2] contrib: sync dg-extract-results.py " Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).