From patchwork Mon Aug 31 17:57:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 8528 Received: (qmail 34555 invoked by alias); 31 Aug 2015 17:57:50 -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 34546 invoked by uid 89); 31 Aug 2015 17:57:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com From: "Carlos O'Donell" Subject: [PATCH] Allow tests-special to be marked as UNSUPPORTED. To: GNU C Library , "Joseph S. Myers" , Roland McGrath X-Enigmail-Draft-Status: N1110 Message-ID: <55E49599.2050200@redhat.com> Date: Mon, 31 Aug 2015 13:57:45 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Joseph, Roland, Is this the way we want to solve marking special tests as unsupported? This patch adds a new target, similar to tests-unsupported, but allows tests-special to be marked as unsupported. When the test is unsupported the rule to make the test should be removed, and the test added to tests-special-unsupported. The test should always be added to tests-special to trigger the running of the test. I immediately use this to mark c++-types-test.sh as unsupported if a C++ compiler is not present, as might be the case during a bootstrap. At present this generates a FAIL for c++-types-test during Fedora stage1 bootstrap because there is no C++ compiler yet, and because the check is `ifneq ($(CXX),no)` which is always true since CXX is set to empty when no compiler present or a valid path to a compiler when it is present. Tested on x86_64 without a C++ compiler installed to verify that all the C++ related tests become UNSUPPORTED, including c++-types-check. Note that due to the tests-special in Makefile we can't put this target into Rules, but we add to Rules a comment. OK? Cheers, Carlos. 2015-08-28 Carlos O'Donell * Makefile [ifeq (,$(CXX)] (tests-special-unsupported): Add $(objpfx)c++-types-check.out. [ifneq "$(strip $(tests-special-unsupported))" ""] ($(tests-special-unsupported)): New target. * Rules: Add comment that $(tests-special-unsupported) target is in Makefile. --- Cheers, Carlos. diff --git a/Makefile b/Makefile index 658ccfa..585100a 100644 --- a/Makefile +++ b/Makefile @@ -251,8 +251,11 @@ tests-clean: @$(MAKE) subdir_testclean no_deps=t tests-special += $(objpfx)c++-types-check.out $(objpfx)check-local-headers.out -ifneq ($(CXX),no) +ifeq (,$(CXX)) +# This test requires a C++ compiler to verify the types. +tests-special-unsupported += $(objpfx)c++-types-check.out +else vpath c++-types.data $(+sysdep_dirs) $(objpfx)c++-types-check.out: c++-types.data scripts/check-c++-types.sh @@ -338,6 +341,24 @@ xtests: > $(objpfx)xtests.sum $(call summarize-tests,xtests.sum, for extra tests) +# tests-special-unsupported lists tests that we will not try to run at all in +# this configuration. Note this runs every time because it does not actually +# create its target. The dependency on Makefile is meant to ensure that it +# runs after a Makefile change to add a tests to the list when it previously +# ran and produced a .out file. +# +# The tests-special-unsupported target lives in Makefile because there are +# top-level tests in Makefile, and one or more of those top-level tests should +# be unsupported in some configurations, and Rules can't be included here due +# to ordering. A better solution would be to move all tests-special tests out +# of the top-level and into subdirs and move this rule into Rules with the +# matching tests-unsupported target. +ifneq "$(strip $(tests-special-unsupported))" "" +$(tests-special-unsupported): Makefile + $(..)scripts/evaluate-test.sh $(patsubst $(common-objpfx)%.out,%,$@) \ + 77 false false > $(@:.out=.test-result) +endif + # The realclean target is just like distclean for the parent, but we want # the subdirs to know the difference in case they care. realclean distclean: parent-clean diff --git a/Rules b/Rules index e237d03..7706fd1 100644 --- a/Rules +++ b/Rules @@ -210,6 +210,9 @@ $(tests-unsupported:%=$(objpfx)%.out): $(objpfx)%.out: Makefile 77 false false > $(@:.out=.test-result) endif +# NOTE: There is a tests-special-unsupported target, which should go here, but +# for now lives in the top-level Makefile. + endif # tests