From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id C76FE3858030; Wed, 26 Oct 2022 10:09:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C76FE3858030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666778940; bh=4SdiS2G6DYC50RfQjaJUtyQU9KMbM4FhOV6aBIbw2oQ=; h=From:To:Subject:Date:From; b=UKw+a6RL8PXP++8YQedVAGx+i6gV4rSuKCxR2l57vNdWl4NJFkVL21NAWvBS18/Vl zndwlyeJ/cDtbzsoSkjBsS0O9pGlPengUBzlMqIqE52ZmL9qEtiwcIWbh+dyB8vKXv M/QfelU0BJuP7W3oY1KxVymUHlfsAlgkEchjGPE0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: testsuite: improve parallel test processing X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: f84ffabbb304853a6570656200dfbd32e732386f X-Git-Newrev: 8f97b519fb061a7243344905cc23a77adda6be7a Message-Id: <20221026100900.C76FE3858030@sourceware.org> Date: Wed, 26 Oct 2022 10:09:00 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8f97b519fb06= 1a7243344905cc23a77adda6be7a commit 8f97b519fb061a7243344905cc23a77adda6be7a Author: Mike Frysinger Date: Mon Oct 24 01:30:18 2022 +0545 sim: testsuite: improve parallel test processing =20 The current logic limits itself to a maxdepth of 4 when looking for results. This wouldn't be a problem if cris didn't have a testsuite at a depth of 5 which we end up ignoring when summarizing. Rather than bump the number from 4 to 5, rework the code so that we gather the exact set of tests that we tried to run. Diff: --- sim/Makefile.in | 9 +++++---- sim/testsuite/local.mk | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/sim/Makefile.in b/sim/Makefile.in index 18e84e52266..f471289600c 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -2474,13 +2474,14 @@ check/%.exp: =20 check-DEJAGNU-parallel: $(AM_V_at)( \ - $(MAKE) -k \ - `cd $(srcdir)/testsuite && find . -name '*.exp' -printf 'check/%P '`; \ + set -- `cd $(srcdir)/testsuite && find . -name '*.exp' -printf '%P\n' | s= ed 's:[.]exp$$::'`; \ + $(MAKE) -k `printf 'check/%s.exp ' $$@`; \ ret=3D$$?; \ + set -- `printf 'testsuite/%s/ ' $$@`; \ $(SHELL) $(srcroot)/contrib/dg-extract-results.sh \ - `find testsuite/ -maxdepth 4 -name testrun.sum | sort` > testrun.sum; \ + `find $$@ -maxdepth 1 -name testrun.sum 2>/dev/null | sort` > testrun.s= um; \ $(SHELL) $(srcroot)/contrib/dg-extract-results.sh -L \ - `find testsuite/ -maxdepth 4 -name testrun.log | sort` > testrun.log; \ + `find $$@ -maxdepth 1 -name testrun.log 2>/dev/null | sort` > testrun.l= og; \ echo; \ $(SED) -n '/^.*=3D=3D=3D.*Summary.*=3D=3D=3D/,$$p' testrun.sum; \ exit $$ret) diff --git a/sim/testsuite/local.mk b/sim/testsuite/local.mk index b8114a56599..cee51f24ae0 100644 --- a/sim/testsuite/local.mk +++ b/sim/testsuite/local.mk @@ -50,13 +50,14 @@ check/%.exp: =20 check-DEJAGNU-parallel: $(AM_V_at)( \ - $(MAKE) -k \ - `cd $(srcdir)/testsuite && find . -name '*.exp' -printf 'check/%P '`; \ + set -- `cd $(srcdir)/testsuite && find . -name '*.exp' -printf '%P\n' | s= ed 's:[.]exp$$::'`; \ + $(MAKE) -k `printf 'check/%s.exp ' $$@`; \ ret=3D$$?; \ + set -- `printf 'testsuite/%s/ ' $$@`; \ $(SHELL) $(srcroot)/contrib/dg-extract-results.sh \ - `find testsuite/ -maxdepth 4 -name testrun.sum | sort` > testrun.sum; \ + `find $$@ -maxdepth 1 -name testrun.sum 2>/dev/null | sort` > testrun.s= um; \ $(SHELL) $(srcroot)/contrib/dg-extract-results.sh -L \ - `find testsuite/ -maxdepth 4 -name testrun.log | sort` > testrun.log; \ + `find $$@ -maxdepth 1 -name testrun.log 2>/dev/null | sort` > testrun.l= og; \ echo; \ $(SED) -n '/^.*=3D=3D=3D.*Summary.*=3D=3D=3D/,$$p' testrun.sum; \ exit $$ret)