diff mbox series

contrib: Add KPASS support to dg-extract-results.{sh,py}

Message ID 20191003143237.19386-1-andrew.burgess@embecosm.com
State New
Headers show
Series contrib: Add KPASS support to dg-extract-results.{sh,py} | expand

Commit Message

Andrew Burgess Oct. 3, 2019, 2:32 p.m. UTC
My motivation for the patch below comes from GDB.  The binutils-gdb
project maintains a copy of the contrib directory that it keeps in
sync with upstream GCC, and patches to contrib/ are ideally first
applied to GCC then backported to binutils-gdb.

This patch extends the dg-extract-results.* scripts to support KPASS
results.  These results are a part of standard dejagnu.

I haven't checked if this is going to impact GCC, but if it does, it
should only be a good impact - adding previously missing results into
the final .sum file.  I tested on GDB and we now pick up some
previously missing results.

Will this be OK to apply?

Thanks,
Andrew

---

Extend dg-extract-results.sh and dg-extract-results.py to support the
KPASS test result status.  This is required by GDB which uses a copy
of the dg-extract-results.{sh,py} scripts that it tries to keep in
sync with GCC.

ChangeLog:

	* contrib/dg-extract-results.sh: Add support for KPASS.
	* contrib/dg-extract-results.py: Likewise.
---
 ChangeLog                     | 5 +++++
 contrib/dg-extract-results.py | 2 +-
 contrib/dg-extract-results.sh | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

Comments

Richard Biener Oct. 4, 2019, 10:42 a.m. UTC | #1
On Thu, Oct 3, 2019 at 4:33 PM Andrew Burgess
<andrew.burgess@embecosm.com> wrote:
>
> My motivation for the patch below comes from GDB.  The binutils-gdb
> project maintains a copy of the contrib directory that it keeps in
> sync with upstream GCC, and patches to contrib/ are ideally first
> applied to GCC then backported to binutils-gdb.
>
> This patch extends the dg-extract-results.* scripts to support KPASS
> results.  These results are a part of standard dejagnu.
>
> I haven't checked if this is going to impact GCC, but if it does, it
> should only be a good impact - adding previously missing results into
> the final .sum file.  I tested on GDB and we now pick up some
> previously missing results.
>
> Will this be OK to apply?

OK.

Richard.

> Thanks,
> Andrew
>
> ---
>
> Extend dg-extract-results.sh and dg-extract-results.py to support the
> KPASS test result status.  This is required by GDB which uses a copy
> of the dg-extract-results.{sh,py} scripts that it tries to keep in
> sync with GCC.
>
> ChangeLog:
>
>         * contrib/dg-extract-results.sh: Add support for KPASS.
>         * contrib/dg-extract-results.py: Likewise.
> ---
>  ChangeLog                     | 5 +++++
>  contrib/dg-extract-results.py | 2 +-
>  contrib/dg-extract-results.sh | 2 +-
>  3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
> index 4e113a8dd6b..7100794d42a 100644
> --- a/contrib/dg-extract-results.py
> +++ b/contrib/dg-extract-results.py
> @@ -117,7 +117,7 @@ class Prog:
>          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'
> -                                     r'|KFAIL):\s*(.+)')
> +                                     r'|KFAIL|KPASS):\s*(.+)')
>          self.completed_re = re.compile (r'.* completed at (.*)')
>          # Pieces of text to write at the head of the output.
>          # start_line is a pair in which the first element is a datetime
> diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
> index 97ac222b54a..f948088370e 100755
> --- a/contrib/dg-extract-results.sh
> +++ b/contrib/dg-extract-results.sh
> @@ -326,7 +326,7 @@ BEGIN {
>    }
>  }
>  /^\t\t=== .* ===$/ { curvar = ""; next }
> -/^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED|WARNING|ERROR|UNSUPPORTED|UNTESTED|KFAIL):/ {
> +/^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED|WARNING|ERROR|UNSUPPORTED|UNTESTED|KFAIL|KPASS):/ {
>    testname=\$2
>    # Ugly hack for gfortran.dg/dg.exp
>    if ("$TOOL" == "gfortran" && testname ~ /^gfortran.dg\/g77\//)
> --
> 2.14.5
>
diff mbox series

Patch

diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
index 4e113a8dd6b..7100794d42a 100644
--- a/contrib/dg-extract-results.py
+++ b/contrib/dg-extract-results.py
@@ -117,7 +117,7 @@  class Prog:
         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'
-                                     r'|KFAIL):\s*(.+)')
+                                     r'|KFAIL|KPASS):\s*(.+)')
         self.completed_re = re.compile (r'.* completed at (.*)')
         # Pieces of text to write at the head of the output.
         # start_line is a pair in which the first element is a datetime
diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
index 97ac222b54a..f948088370e 100755
--- a/contrib/dg-extract-results.sh
+++ b/contrib/dg-extract-results.sh
@@ -326,7 +326,7 @@  BEGIN {
   }
 }
 /^\t\t=== .* ===$/ { curvar = ""; next }
-/^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED|WARNING|ERROR|UNSUPPORTED|UNTESTED|KFAIL):/ {
+/^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED|WARNING|ERROR|UNSUPPORTED|UNTESTED|KFAIL|KPASS):/ {
   testname=\$2
   # Ugly hack for gfortran.dg/dg.exp
   if ("$TOOL" == "gfortran" && testname ~ /^gfortran.dg\/g77\//)