c++-types-check: Do not run this test if there is no C++ support

Message ID 562E2784.5010306@redhat.com
State Changes Requested, archived
Headers

Commit Message

Florian Weimer Oct. 26, 2015, 1:15 p.m. UTC
  I'm not sure if there is a way to mark this test as UNSUPPORTED.  With
the attached patch, at least it is no longer reported as FAIL.

Florian
  

Comments

Roland McGrath Oct. 27, 2015, 7:25 p.m. UTC | #1
Follow the example of tst-chk4 et al in debug/Makefile.  That is, just add
it to tests-unsupported.  There is no need to conditionalize adding it to
tests or tests-special per se.  But if it's in tests-unsupported it can't
have an explicit foo.out rule, so for this case conditionalizing its
addition to tests-special along with the explicit rule makes sense.
  
Joseph Myers Oct. 27, 2015, 10 p.m. UTC | #2
On Tue, 27 Oct 2015, Roland McGrath wrote:

> Follow the example of tst-chk4 et al in debug/Makefile.  That is, just add
> it to tests-unsupported.  There is no need to conditionalize adding it to
> tests or tests-special per se.  But if it's in tests-unsupported it can't
> have an explicit foo.out rule, so for this case conditionalizing its
> addition to tests-special along with the explicit rule makes sense.

As I understand it, tests-unsupported doesn't work at top level.  Cf 
<https://sourceware.org/ml/libc-alpha/2015-08/msg01284.html> and 
<https://sourceware.org/ml/libc-alpha/2015-09/msg00127.html>, where Carlos 
offered to move this test to misc/.
  
Florian Weimer Oct. 27, 2015, 10:07 p.m. UTC | #3
On 10/27/2015 11:00 PM, Joseph Myers wrote:
> On Tue, 27 Oct 2015, Roland McGrath wrote:
> 
>> Follow the example of tst-chk4 et al in debug/Makefile.  That is, just add
>> it to tests-unsupported.  There is no need to conditionalize adding it to
>> tests or tests-special per se.  But if it's in tests-unsupported it can't
>> have an explicit foo.out rule, so for this case conditionalizing its
>> addition to tests-special along with the explicit rule makes sense.
> 
> As I understand it, tests-unsupported doesn't work at top level.

Yes, that's exactly the problem I'm running into.

> Cf <https://sourceware.org/ml/libc-alpha/2015-08/msg01284.html> and 
> <https://sourceware.org/ml/libc-alpha/2015-09/msg00127.html>, where Carlos 
> offered to move this test to misc/.

Thanks for the references.  I'll check what can be done about this.

Florian
  

Patch

 2015-10-26  Florian Weimer  <fweimer@redhat.com>
 
	* Makefile (c++-types-check.out): Change condition from CXX == no
	to CXX = "".
	(tests-special): Do not add c++-types-check.out.
	[CXX] (tests-special): Add c++-types-check.out.

diff --git a/Makefile b/Makefile
index b2dd771..e370770 100644
--- a/Makefile
+++ b/Makefile
@@ -250,11 +250,11 @@  mostlyclean: parent-mostlyclean
 tests-clean:
 	@$(MAKE) subdir_testclean no_deps=t
 
-tests-special += $(objpfx)c++-types-check.out $(objpfx)check-local-headers.out
-ifneq ($(CXX),no)
+tests-special += $(objpfx)check-local-headers.out
 
+ifneq ($(CXX),)
+tests-special += $(objpfx)c++-types-check.out
 vpath c++-types.data $(+sysdep_dirs)
-
 $(objpfx)c++-types-check.out: c++-types.data scripts/check-c++-types.sh
 	scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu99 $(+gccwarn-c),$(CFLAGS)) $(CPPFLAGS) > $@; \
 	$(evaluate-test)