This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] contrib: Add KPASS support to dg-extract-results.{sh,py}
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 4 Oct 2019 12:42:34 +0200
- Subject: Re: [PATCH] contrib: Add KPASS support to dg-extract-results.{sh,py}
- References: <20191003143237.19386-1-andrew.burgess@embecosm.com>
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
>