From 2e553caf353646a9620b0b61c05f519cb8fe2ea2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 7 May 2014 23:03:31 +0200 Subject: [PATCH] Fix test suite for languages without Doxygen support. "-doxygen" can't be used in SWIGOPT for the languages other than Java and Python, this results in immediate error as it's not supported by SWIG when using any other language. Use this switch -- and run the Doxygen tests -- only for the languages that do support it and, to avoid slowing down the test suite even more, only for the tests that need it. Also allow running only the Doxygen tests using check-doxygen target. --- Examples/test-suite/common.mk | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index a670e1fb1..d0463badd 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -64,7 +64,7 @@ CXXSRCS = CSRCS = TARGETPREFIX = TARGETSUFFIX = -SWIGOPT = -doxygen -outcurrentdir -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) +SWIGOPT = -outcurrentdir -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) INCLUDES = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) LIBS = -L. LIBPREFIX = lib @@ -195,13 +195,6 @@ CPP_TEST_CASES += \ director_using \ director_wombat \ disown \ - doxygen_parsing \ - doxygen_basic_translate \ - doxygen_basic_notranslate \ - doxygen_translate \ - doxygen_translate_all_tags \ - doxygen_translate_links \ - doxygen_misc_constructs \ dynamic_cast \ empty \ enum_ignore \ @@ -541,6 +534,27 @@ CPP11_TEST_BROKEN = \ # cpp11_variadic_templates \ # Broken for some languages (such as Java) # cpp11_reference_wrapper \ # No typemaps +# Doxygen support test cases: can only be used with languages supporting +# Doxygen comment translation, currently only Python and Java. +python_HAS_DOXYGEN := 1 +java_HAS_DOXYGEN := 1 + +$(eval HAS_DOXYGEN := $($(LANGUAGE)_HAS_DOXYGEN)) + +ifdef HAS_DOXYGEN +DOXYGEN_TEST_CASES := \ + doxygen_parsing \ + doxygen_basic_translate \ + doxygen_basic_notranslate \ + doxygen_translate \ + doxygen_translate_all_tags \ + doxygen_translate_links \ + doxygen_misc_constructs \ + +$(DOXYGEN_TEST_CASES:=.cpptest): SWIGOPT += -doxygen + +CPP_TEST_CASES += $(DOXYGEN_TEST_CASES) +endif # # Put all the heavy STD/STL cases here, where they can be skipped if needed @@ -680,6 +694,10 @@ check-cpp: $(CPP_TEST_CASES:=.cpptest) check-cpp11: $(CPP11_TEST_CASES:=.cpptest) +ifdef HAS_DOXYGEN +check-doxygen: $(DOXYGEN_TEST_CASES:=.cpptest) +endif + endif # partialcheck target runs SWIG only, ie no compilation or running of tests (for a subset of languages)