gb_SUPPRESS_TESTS to build tests but not run them
authorStephan Bergmann <sbergman@redhat.com>
Sat, 3 Jun 2017 19:38:24 +0000 (21:38 +0200)
committerRene Engelhard <rene@debian.org>
Thu, 14 Dec 2017 23:29:20 +0000 (23:29 +0000)
Change-Id: I390b97bbacfc123b952be2b54cf1333b4d5c24a7

Gbp-Pq: Name gb_SUPPRESS_TESTS.diff

idlc/CustomTarget_parser_test.mk
odk/CustomTarget_build-examples.mk
odk/CustomTarget_check.mk
registry/CustomTarget_regcompare_test.mk
solenv/gbuild/CppunitTest.mk
solenv/gbuild/JunitTest.mk
solenv/gbuild/PythonTest.mk
solenv/gbuild/UITest.mk
solenv/gbuild/gbuild.help.txt
testtools/CustomTarget_uno_test.mk
unoidl/CustomTarget_unoidl-write_test.mk

index 84b01d9cb45e6f792ad804a7b52e24e95983c945..0c9d15e4f86ba0311fe095445ae8019d6162154b 100644 (file)
@@ -25,6 +25,9 @@ $(call gb_CustomTarget_get_target,idlc/parser_test) : \
             $(SRCDIR)/idlc/test/parser/struct.tests \
             $(SRCDIR)/idlc/test/parser/typedef.tests \
             | $(call gb_CustomTarget_get_workdir,idlc/parser_test)/.dir
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Helper_abbreviate_dirs,( \
             $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
                 $(SRCDIR)/idlc/test/parser/attribute.tests \
@@ -77,5 +80,6 @@ $(call gb_CustomTarget_get_target,idlc/parser_test) : \
                 $(call gb_Executable_get_command,idlc) \
                 -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {}) \
             > $@.log 2>&1 || (cat $@.log && false))
+endif
 
 # vim: set noet sw=4 ts=4:
index 89e4273480878d1465545944ff647aa20023c79b..81ac3a1437c601407672aab989d3deb023212664 100644 (file)
@@ -89,6 +89,9 @@ endif
 
 $(call gb_CustomTarget_get_target,odk/build-examples): \
         $(call gb_CustomTarget_get_workdir,odk/build-examples)/setsdkenv
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1)
        (saved_library_path=$${$(gb_Helper_LIBRARY_PATH_VAR)} && . $< \
         $(if $(filter MACOSX,$(OS)),, \
@@ -102,6 +105,7 @@ $(call gb_CustomTarget_get_target,odk/build-examples): \
         || (RET=$$? \
             && cat $(call gb_CustomTarget_get_workdir,odk/build-examples)/log \
             && exit $$RET)
+endif
 
 $(call gb_CustomTarget_get_workdir,odk/build-examples)/setsdkenv: \
         $(SRCDIR)/odk/config/setsdkenv_unix.sh.in \
index 538409f7aee1ed27da479c672e69d6cb8fd70914..2d9d5ee6dcbdb6eac5ef2881998aa3c0743f0987 100644 (file)
@@ -24,6 +24,7 @@ odk_PLATFORM := $(if $(filter WNT,$(OS)),windows,\
                                                $(if $(filter MACOSX,$(OS)),macosx,\
                                                        $(if $(filter AIX,$(OS)),aix))))))))
 
+.PHONY: $(call gb_CustomTarget_get_workdir,odk/check)/checkbin
 $(call gb_CustomTarget_get_workdir,odk/check)/checkbin : \
                $(SRCDIR)/odk/util/check.pl \
                $(if $(DOXYGEN),$(call gb_GeneratedPackage_get_target,odk_doxygen)) \
@@ -38,6 +39,9 @@ $(call gb_CustomTarget_get_workdir,odk/check)/checkbin : \
                $(call gb_Package_get_target,odk_settings) \
                $(call gb_Package_get_target,odk_settings_generated) \
                $(if $(ENABLE_JAVA),$(call gb_Package_get_target,odk_unowinreg))
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1)
        $(call gb_Helper_print_on_error,\
                $(PERL) $< \
@@ -45,5 +49,6 @@ $(call gb_CustomTarget_get_workdir,odk/check)/checkbin : \
                        $(odk_PLATFORM) '$(gb_Executable_EXT)' \
                ,$@.log \
        )
+endif
 
 # vim: set noet sw=4 ts=4:
index efdc070a3620dd8c3091b203140bcc336281375c..e7816301f8ce14b873f22beeb92b6ef3aaa387d6 100644 (file)
@@ -31,6 +31,9 @@ $(call gb_CustomTarget_get_target,registry/regcompare_test): \
         $(call gb_CustomTarget_get_workdir,registry/regcompare_test)/ue.rdb \
         $(call gb_CustomTarget_get_workdir,registry/regcompare_test)/usa.rdb \
         $(call gb_CustomTarget_get_workdir,registry/regcompare_test)/usb.rdb
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Helper_abbreviate_dirs,( \
         $(call gb_Executable_get_command,unoidl-check) --ignore-unpublished \
             $(call gb_CustomTarget_get_workdir,registry/regcompare_test)/psa.rdb \
@@ -191,6 +194,7 @@ $(call gb_CustomTarget_get_target,registry/regcompare_test): \
             $(call gb_CustomTarget_get_workdir,registry/regcompare_test)/usa.rdb \
             -- $(call gb_CustomTarget_get_workdir,registry/regcompare_test)/other2.rdb) \
         > $@.log 2>&1 || (cat $@.log && false))
+endif
 
 $(call gb_CustomTarget_get_workdir,registry/regcompare_test)/%.rdb: \
         $(call gb_CustomTarget_get_workdir,registry/regcompare_test)/%.urd \
index 6595726686487ce7b83327ccf76138da82d2f203..4bccabf6e46ed0ec530c4807bd18cb47121882ed 100644 (file)
@@ -106,6 +106,9 @@ $(call gb_CppunitTest_get_clean_target,%) :
 
 .PHONY : $(call gb_CppunitTest_get_target,%)
 $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_RUNTIMEDEPS)
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Output_announce,$*,$(true),CUT,2)
        $(call gb_Helper_abbreviate_dirs,\
                $(if $(gb_CppunitTest_vcl_hide_windows),export VCL_HIDE_WINDOWS=1 && ) \
@@ -140,6 +143,7 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_RUNTIMEDEPS)
                                        RET=$$?; \
                                        $(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET) >> $@.log 2>&1;) \
                                cat $@.log; $(gb_CppunitTest_UNITTESTFAILED) Cppunit $*)))
+endif
 
 define gb_CppunitTest_CppunitTest
 $(call gb_CppunitTest__CppunitTest_impl,$(1),$(call gb_CppunitTest_get_linktarget,$(1)))
index 30e226d614677201766ee2a0f6436464c82c63b9..36f29b50ef2830a5d1ad5d144014c580022dd8b0 100644 (file)
@@ -32,6 +32,9 @@ ifneq (,$(strip $(OOO_JUNIT_JAR)))
 
 .PHONY : $(call gb_JunitTest_get_target,%)
 $(call gb_JunitTest_get_target,%) :
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Output_announce,$*,$(true),JUT,2)
        $(call gb_Helper_abbreviate_dirs,\
         rm -rf $(call gb_JunitTest_get_userdir,$*) && \
@@ -53,6 +56,7 @@ $(call gb_JunitTest_get_target,%) :
                && echo \
                && false)))
        $(CLEAN_CMD)
+endif
 
 define gb_JunitTest_JunitTest
 $(call gb_JunitTest_get_target,$(1)) : T_CP := $(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$(if $(HAMCREST_JAR),$$(gb_CLASSPATHSEP)$(HAMCREST_JAR))$$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_URE_LIB_FOLDER)
@@ -152,7 +156,9 @@ else # OOO_JUNIT_JAR
 
 .PHONY : $(call gb_JunitTest_get_target,$(1))
 $(call gb_JunitTest_get_target,%) :
+ifeq ($(gb_SUPPRESS_TESTS),)
        $(call gb_Output_announce,$* (skipped - no Junit),$(true),JUT,2)
+endif
        @true
 
 define gb_JunitTest_JunitTest
index eeff6a013ead1f9bf8914cd6f240a392349afb90..8ac62c43f445a866b81eaae9f4c1268cda52cace 100644 (file)
@@ -32,6 +32,9 @@ ifneq ($(DISABLE_PYTHON),TRUE)
 
 .PHONY : $(call gb_PythonTest_get_target,%)
 $(call gb_PythonTest_get_target,%) :| $(gb_PythonTest_DEPS)
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Output_announce,$*,$(true),PYT,2)
        $(call gb_Helper_abbreviate_dirs,\
                rm -rf $(dir $(call gb_PythonTest_get_target,$*)) && \
@@ -61,6 +64,7 @@ $(call gb_PythonTest_get_target,%) :| $(gb_PythonTest_DEPS)
                                        RET=$$?; \
                                        $(call gb_CppunitTest_postprocess,$(gb_PythonTest_EXECUTABLE_GDB),$@.core,$$RET) >> $@.log 2>&1;) \
                                cat $@.log; $(gb_PythonTest_UNITTESTFAILED) Python $*))))
+endif
 
 # always use udkapi and URE services
 define gb_PythonTest_PythonTest
@@ -99,7 +103,9 @@ else # DISABLE_PYTHON
 
 .PHONY : $(call gb_PythonTest_get_target,$(1))
 $(call gb_PythonTest_get_target,%) :
+ifeq ($(gb_SUPPRESS_TESTS),)
        $(call gb_Output_announce,$* (skipped - no PythonTest),$(true),PYT,2)
+endif
        @true
 
 define gb_PythonTest_PythonTest
index 1edb3f76908181bdb5b2b14ec4462cd6dd5ba436..21560c8ced188b539a4b36fe1b9d5b70a103a755 100644 (file)
@@ -37,6 +37,9 @@ ifneq ($(DISABLE_PYTHON),TRUE)
 
 .PHONY : $(call gb_UITest_get_target,%)
 $(call gb_UITest_get_target,%) :| $(gb_UITest_DEPS)
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Output_announce,$*,$(true),UIT,2)
        $(call gb_Helper_abbreviate_dirs,\
                rm -rf $(dir $(call gb_UITest_get_target,$*)) && \
@@ -69,6 +72,7 @@ $(call gb_UITest_get_target,%) :| $(gb_UITest_DEPS)
                                    RET=$$?; \
                                    $(call gb_CppunitTest_postprocess,$(gb_UITest_EXECUTABLE_GDB),$@.core,$$RET) >> $@.log 2>&1;) \
                            cat $@.log; $(gb_UITest_UNITTESTFAILED) UI $*))))
+endif
 
 # always use udkapi and URE services
 define gb_UITest_UITest
@@ -111,7 +115,9 @@ else # DISABLE_PYTHON
 
 .PHONY : $(call gb_UITest_get_target,$(1))
 $(call gb_UITest_get_target,%) :
+ifeq ($(gb_SUPPRESS_TESTS),)
        $(call gb_Output_announce,$* (skipped - no UITest),$(true),PYT,2)
+endif
        @true
 
 define gb_UITest_UITest
index 05005becc87aa9281e603f2abd0ae1f1e6b4ec75..0b11b3698a2e5c22534f925c83c9a39217d87695 100644 (file)
@@ -145,3 +145,5 @@ INTERACTIVE VARIABLES:
                        set the build environment.
        gb_DBGARGS      Append these arguments to GDBs "set args" command for
                        debugrun. Double quotes will be automatically escaped.
+       gb_SUPPRESS_TESTS Do not run tests (but still build them, when requested
+                       by the given targets).
index 4b960e46ecb3efbeb64f928c2250e87b9a643579..4850e5ca66b288d85dc5008c76ad0adb0c8aaa87 100644 (file)
@@ -19,6 +19,9 @@ $(call gb_CustomTarget_get_target,testtools/uno_test) : \
                $(call gb_Rdb_get_target,uno_services) \
                $(call gb_Rdb_get_target,ure/services) \
                $(call gb_UnoApi_get_target,udkapi)
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Helper_abbreviate_dirs,\
                $(call gb_Executable_get_command,uno) \
                -s com.sun.star.test.bridge.BridgeTest \
@@ -26,5 +29,6 @@ $(call gb_CustomTarget_get_target,testtools/uno_test) : \
                -env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD)) \
                -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services)) \
                -env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb))
+endif
 
 # vim:set shiftwidth=4 tabstop=4 noexpandtab:
index 22c25b0085c5adfc2f1565662a9a5aa264222912..a1c17c488bc3ecb8edd9e3198e9ce1db88c03777 100644 (file)
@@ -25,6 +25,9 @@ $(call gb_CustomTarget_get_target,unoidl/unoidl-write_test) : \
         $(SRCDIR)/idlc/test/parser/struct.tests \
         $(SRCDIR)/idlc/test/parser/typedef.tests \
         | $(call gb_CustomTarget_get_workdir,unoidl/unoidl-write_test)/.dir
+ifneq ($(gb_SUPPRESS_TESTS),)
+       @true
+else
        $(call gb_Helper_abbreviate_dirs,( \
         $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
             $(SRCDIR)/idlc/test/parser/attribute.tests \
@@ -87,5 +90,6 @@ $(call gb_CustomTarget_get_target,unoidl/unoidl-write_test) : \
             {} \
             $(call gb_CustomTarget_get_workdir,unoidl/unoidl-write_test)/out.rdb) \
         > $@.log 2>&1 || (cat $@.log && false))
+endif
 
 # vim: set noet sw=4 ts=4: