From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7919) id 51F283858018; Tue, 12 Mar 2024 15:49:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51F283858018 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710258582; bh=oQ8tHDX8yiaFS5n6Nw7QkURyGnW5Ep1KuXUix8I2K+o=; h=From:To:Subject:Date:From; b=EqVGQacDzSbyPcimihIA/OWk7HPwHfDtVGARTLg/JzpH2bKbk+DDiiwWy24M6Ug83 2V5UBIF4qGwNWvYC8REwwGtcDkklquMQyCCOVTxZK6znKW3tmXZH0Xr4PmqpmQfogc Pi/UwuvYhhwVNy3uHDwpPkUahtpNpYpdWVv6V3XY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sam James To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] contrib: sync dg-extract-results.sh with GCC X-Act-Checkin: binutils-gdb X-Git-Author: Sam James X-Git-Refname: refs/heads/master X-Git-Oldrev: a02a739070ebec5f645b2c82f421d59521c830b6 X-Git-Newrev: f9b7cc0cd2a1699c5cb7d5b159c8392e6973663c Message-Id: <20240312154942.51F283858018@sourceware.org> Date: Tue, 12 Mar 2024 15:49:42 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df9b7cc0cd2a1= 699c5cb7d5b159c8392e6973663c commit f9b7cc0cd2a1699c5cb7d5b159c8392e6973663c Author: Sam James Date: Mon Mar 11 20:57:46 2024 +0000 contrib: sync dg-extract-results.sh with GCC =20 This syncs dg-extract-results.sh with GCC. =20 It contains two commits: r14-4333-g346f5991569fae and r14-9393-g64273a7= e6bd8ba. =20 contrib/ChangeLog: * dg-extract-results.sh: Sync with GCC. =20 Approved-By: Tom Tromey Diff: --- 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 =20 * dg-extract-results.py: Sync with GCC. + * dg-extract-results.sh: Sync with GCC. =20 2020-09-25 Simon Marchi =20 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. =20 -# Copyright (C) 2008, 2009, 2010, 2012 Free Software Foundation +# Copyright (C) 2008-2024 Free Software Foundation, Inc. # Contributed by Janis Johnson # # This file is part of GCC. @@ -28,14 +28,17 @@ =20 PROGNAME=3Ddg-extract-results.sh =20 -# 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 a= nd +# produces more stable results. PYTHON_VER=3D`echo "$0" | sed 's/sh$/py/'` -if test "$PYTHON_VER" !=3D "$0" && - test -f "$PYTHON_VER" && - python -c 'import sys, getopt, re, io, datetime, operator; sys.exit (0 = if sys.version_info >=3D (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" !=3D "$0" && + test -f "$PYTHON_VER" && + ${python} -c 'import sys, getopt, re, io, datetime, operator; sys.exi= t (0 if sys.version_info >=3D (2, 6) else 1)' \ + > /dev/null 2> /dev/null; then + exec ${python} $PYTHON_VER "$@" + fi +done =20 usage() { cat <&2 @@ -271,7 +274,7 @@ cat $SUM_FILES \ =20 # Write the begining of the combined summary file. =20 -head -n 2 $FIRST_SUM +head -n 3 $FIRST_SUM echo echo " =3D=3D=3D $TOOL tests =3D=3D=3D" echo