This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Allow tests-special to be marked as UNSUPPORTED.

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 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.



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.

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
 vpath $(+sysdep_dirs)
 $(objpfx)c++-types-check.out: scripts/
@@ -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/ $(patsubst $(common-objpfx)%.out,%,$@) \
+				      77 false false > $(@:.out=.test-result)
 # 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)
+# NOTE: There is a tests-special-unsupported target, which should go here, but
+# for now lives in the top-level Makefile.
 endif	# tests


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]