From patchwork Sat Jul 27 00:06:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 33824 Received: (qmail 62669 invoked by alias); 27 Jul 2019 00:06:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 62658 invoked by uid 89); 27 Jul 2019 00:06:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:cb6401d X-HELO: mx1.redhat.com From: DJ Delorie To: "Carlos O'Donell" Cc: joseph@codesourcery.com, libc-alpha@sourceware.org Subject: Re: RFC: make fastcheck In-Reply-To: (carlos@redhat.com) Date: Fri, 26 Jul 2019 20:06:21 -0400 Message-ID: MIME-Version: 1.0 "Carlos O'Donell" writes: > Please post that valuable patch for review for 2.31 :-) Formal patch to follow once the testing and bikeshedding is done ;-) Timing... on my 4/8-core i7 (i7-4790K, 4GHz), saves about 37 seconds of build-the-tests time. (make -j8 nptl/tests run-built-tests=no, 48s->11s) diff --git a/nptl/Makefile b/nptl/Makefile index 0567e77a79..d7a3857c95 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -666,7 +666,7 @@ $(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0 $(evaluate-test) $(objpfx)tst-cleanup0-cmp.out: tst-cleanup0.expect $(objpfx)tst-cleanup0.out - cmp $^ > $@; \ + cmp tst-cleanup0.expect $(objpfx)tst-cleanup0.out > $@; \ $(evaluate-test) $(objpfx)crti.o: $(objpfx)pt-crti.o @@ -723,7 +723,23 @@ tst-audit-threads-ENV = LD_AUDIT=$(objpfx)tst-audit-threads-mod1.so CFLAGS-tst-unwind-thread.c += -funwind-tables -# The tests here better do not run in parallel -ifneq ($(filter %tests,$(MAKECMDGOALS)),) -.NOTPARALLEL: +ifeq ($(run-built-tests),yes) +# The tests in this subdir should not be run in parallel. +# +# The following will create rules like "foo2.out :| foo1.out" for all +# tests, which forces the tests to be run serially, but does not force +# a test to be run just because some other test was run. +# +# Caveat: the :|-style dependencies won't be listed in $^, so avoid +# using $^ to depend on test result files. + +ALLTESTS = $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \ + $(tests-container:%=$(objpfx)%.out) \ + $(tests-special) $(tests-printers-out) \ + $(xtests:%=$(objpfx)%.out) $(xtests-special) + +ALLBUTFIRSTTEST = $(filter-out $(firstword $(ALLTESTS)), $(ALLTESTS)) +ALLBUTLASTTEST = $(filter-out $(lastword $(ALLTESTS)), $(ALLTESTS)) +TESTPAIRS = $(join $(ALLBUTFIRSTTEST),$(addprefix :|,$(ALLBUTLASTTEST))) +$(foreach pair,$(TESTPAIRS),$(eval $(pair))) endif