public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Frysinger <vapier@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] sim: testsuite: improve parallel test processing
Date: Wed, 26 Oct 2022 10:09:00 +0000 (GMT)	[thread overview]
Message-ID: <20221026100900.C76FE3858030@sourceware.org> (raw)

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

commit 8f97b519fb061a7243344905cc23a77adda6be7a
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Mon Oct 24 01:30:18 2022 +0545

    sim: testsuite: improve parallel test processing
    
    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:
 
 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' | sed 's:[.]exp$$::'`; \
+	$(MAKE) -k `printf 'check/%s.exp ' $$@`; \
 	ret=$$?; \
+	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.sum; \
 	$(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.log; \
 	echo; \
 	$(SED) -n '/^.*===.*Summary.*===/,$$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:
 
 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' | sed 's:[.]exp$$::'`; \
+	$(MAKE) -k `printf 'check/%s.exp ' $$@`; \
 	ret=$$?; \
+	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.sum; \
 	$(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.log; \
 	echo; \
 	$(SED) -n '/^.*===.*Summary.*===/,$$p' testrun.sum; \
 	exit $$ret)

                 reply	other threads:[~2022-10-26 10:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221026100900.C76FE3858030@sourceware.org \
    --to=vapier@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).