[binutils-gdb] contrib: sync dg-extract-results.{sh,py} with GCC

Andrew Burgess aburgess@sourceware.org
Sat Jul 5 10:21:23 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a42172797ce96b4f01628d27003bba0ee56a17d9

commit a42172797ce96b4f01628d27003bba0ee56a17d9
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Mon Jun 23 16:30:20 2025 +0100

    contrib: sync dg-extract-results.{sh,py} with GCC
    
    Sync the dg-extract-results.{sh,py} scripts with GCC, up to commit
    4e9104ae5455a3c02c2a7e07f52e6bc574cc761d.
    
    This extends the dg-extract-results scripts to handle GDB's
    'unexpected core files' count.
    
    contrib/ChangeLog:
    
            * dg-extract-results.py: Handle GDB's unexpected core file count.
            * dg-extract-results.sh: Likewise.
    
    Reviewed-By: Keith Seitz <keiths@redhat.com>

Diff:
---
 contrib/dg-extract-results.py |  5 +++--
 contrib/dg-extract-results.sh | 10 +++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
index 0fe3c5f1519..c5bfbcaa020 100644
--- a/contrib/dg-extract-results.py
+++ b/contrib/dg-extract-results.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 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
@@ -146,7 +146,8 @@ class Prog:
             '# of unresolved testcases\t',
             '# of unsupported tests\t\t',
             '# of paths in test names\t',
-            '# of duplicate test names\t'
+            '# of duplicate test names\t',
+            '# of unexpected core files\t'
         ]
         self.runs = dict()
 
diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
index 539d596a89d..d64ba255838 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-2024 Free Software Foundation, Inc.
+# Copyright (C) 2008-2025 Free Software Foundation, Inc.
 # Contributed by Janis Johnson <janis187@us.ibm.com>
 #
 # This file is part of GCC.
@@ -403,7 +403,7 @@ BEGIN {
   variant="$VAR"
   tool="$TOOL"
   passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kpasscnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0; dgerrorcnt=0;
-  pathcnt=0; dupcnt=0
+  pathcnt=0; dupcnt=0; corecnt=0
   curvar=""; insummary=0
 }
 /^Running target /		{ curvar = \$3; next }
@@ -420,6 +420,7 @@ BEGIN {
 /^# of unsupported tests/	{ if (insummary == 1) unsupcnt += \$5; next; }
 /^# of paths in test names/	{ if (insummary == 1) pathcnt += \$7; next; }
 /^# of duplicate test names/	{ if (insummary == 1) dupcnt += \$6; next; }
+/^# of unexpected core files/	{ if (insummary == 1) corecnt += \$6; next; }
 /^$/				{ if (insummary == 1)
 				    { insummary = 0; curvar = "" }
 				  next
@@ -439,6 +440,7 @@ END {
   if (unsupcnt != 0) printf ("# of unsupported tests\t\t%d\n", unsupcnt)
   if (pathcnt != 0) printf ("# of paths in test names\t%d\n", pathcnt)
   if (dupcnt != 0) printf ("# of duplicate test names\t%d\n", dupcnt)
+  if (corecnt != 0) printf ("# of unexpected core files\t%d\n", corecnt)
 }
 EOF
 
@@ -460,7 +462,7 @@ cat << EOF > $TOTAL_AWK
 BEGIN {
   tool="$TOOL"
   passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0; dgerrorcnt=0
-  pathcnt=0; dupcnt=0
+  pathcnt=0; dupcnt=0; corecnt=0
 }
 /^# of DejaGnu errors/		{ dgerrorcnt += \$5 }
 /^# of expected passes/		{ passcnt += \$5 }
@@ -474,6 +476,7 @@ BEGIN {
 /^# of unsupported tests/	{ unsupcnt += \$5 }
 /^# of paths in test names/	{ pathcnt += \$7 }
 /^# of duplicate test names/	{ dupcnt += \$6 }
+/^# of unexpected core files/	{ corecnt += \$6 }
 END {
   printf ("\n\t\t=== %s Summary ===\n\n", tool)
   if (dgerrorcnt != 0) printf ("# of DejaGnu errors\t\t%d\n", dgerrorcnt)
@@ -488,6 +491,7 @@ END {
   if (unsupcnt != 0) printf ("# of unsupported tests\t\t%d\n", unsupcnt)
   if (pathcnt != 0) printf ("# of paths in test names\t%d\n", pathcnt)
   if (dupcnt != 0) printf ("# of duplicate test names\t%d\n", dupcnt)
+  if (corecnt != 0) printf ("# of unexpected core files\t%d\n", corecnt)
 }
 EOF


More information about the Binutils-cvs mailing list