From: Stephan Bergmann Date: Sat, 3 Jun 2017 19:38:24 +0000 (+0200) Subject: gb_SUPPRESS_TESTS to build tests but not run them X-Git-Tag: archive/raspbian/1%5.4.1-1+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6380ac1fb4b2805b35d2c3891772e46456fd46b7;p=libreoffice.git gb_SUPPRESS_TESTS to build tests but not run them Change-Id: I390b97bbacfc123b952be2b54cf1333b4d5c24a7 Gbp-Pq: Name gb_SUPPRESS_TESTS.diff --- diff --git a/idlc/CustomTarget_parser_test.mk b/idlc/CustomTarget_parser_test.mk index 84b01d9cb45..0c9d15e4f86 100644 --- a/idlc/CustomTarget_parser_test.mk +++ b/idlc/CustomTarget_parser_test.mk @@ -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: diff --git a/odk/CustomTarget_build-examples.mk b/odk/CustomTarget_build-examples.mk index 89e42734808..81ac3a1437c 100644 --- a/odk/CustomTarget_build-examples.mk +++ b/odk/CustomTarget_build-examples.mk @@ -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 \ diff --git a/odk/CustomTarget_check.mk b/odk/CustomTarget_check.mk index 538409f7aee..2d9d5ee6dcb 100644 --- a/odk/CustomTarget_check.mk +++ b/odk/CustomTarget_check.mk @@ -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: diff --git a/registry/CustomTarget_regcompare_test.mk b/registry/CustomTarget_regcompare_test.mk index efdc070a362..e7816301f8c 100644 --- a/registry/CustomTarget_regcompare_test.mk +++ b/registry/CustomTarget_regcompare_test.mk @@ -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 \ diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 65957266864..4bccabf6e46 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -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))) diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk index 30e226d6146..36f29b50ef2 100644 --- a/solenv/gbuild/JunitTest.mk +++ b/solenv/gbuild/JunitTest.mk @@ -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 diff --git a/solenv/gbuild/PythonTest.mk b/solenv/gbuild/PythonTest.mk index eeff6a013ea..8ac62c43f44 100644 --- a/solenv/gbuild/PythonTest.mk +++ b/solenv/gbuild/PythonTest.mk @@ -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 diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk index 1edb3f76908..21560c8ced1 100644 --- a/solenv/gbuild/UITest.mk +++ b/solenv/gbuild/UITest.mk @@ -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 diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt index 05005becc87..0b11b3698a2 100644 --- a/solenv/gbuild/gbuild.help.txt +++ b/solenv/gbuild/gbuild.help.txt @@ -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). diff --git a/testtools/CustomTarget_uno_test.mk b/testtools/CustomTarget_uno_test.mk index 4b960e46ecb..4850e5ca66b 100644 --- a/testtools/CustomTarget_uno_test.mk +++ b/testtools/CustomTarget_uno_test.mk @@ -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: diff --git a/unoidl/CustomTarget_unoidl-write_test.mk b/unoidl/CustomTarget_unoidl-write_test.mk index 22c25b0085c..a1c17c488bc 100644 --- a/unoidl/CustomTarget_unoidl-write_test.mk +++ b/unoidl/CustomTarget_unoidl-write_test.mk @@ -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: