diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-04-30 16:51:21 +0200 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-05-02 07:52:03 +0200 |
commit | a3d758d528d3408fcccd7d3673439b5d68347e30 (patch) | |
tree | 56c653af8f0c91f894c4a1c315c1567143b22a52 | |
parent | 79b1a61303af8dc8716c03151b28bfce13162eb0 (diff) |
Prepare to run (select) tests during Emscripten build
...by e.g. executing generated Wasm code with node. This requires check targets
to not be skipped unconditionally, unlike for other CROSS_COMPILING builds, so
introduce gb_CAN_EXECUTE_HOST_CODE to distinguish these cases.
Which revealed that some CppunitTest targets unconditionally used artefacts that
are covered by some ENABLE_WASM_STRIP_*, so made those uses conditional
accordingly (even though the resulting binaries might actually be dysfunctional,
lacking relevant parts; we'll fix that if and when we actually build and run
them).
Change-Id: I7144eeb908ede25358a3c8186198ac532de4d9f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166931
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
-rw-r--r-- | drawinglayer/CppunitTest_drawinglayer_processors.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/extensions/post_SpeedUpTargets.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/gbuild.mk | 8 | ||||
-rw-r--r-- | solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk | 2 | ||||
-rw-r--r-- | writerperfect/CppunitTest_writerperfect_epubexport.mk | 2 |
5 files changed, 13 insertions, 4 deletions
diff --git a/drawinglayer/CppunitTest_drawinglayer_processors.mk b/drawinglayer/CppunitTest_drawinglayer_processors.mk index fcbbf247f10a..627809b814a8 100644 --- a/drawinglayer/CppunitTest_drawinglayer_processors.mk +++ b/drawinglayer/CppunitTest_drawinglayer_processors.mk @@ -16,7 +16,7 @@ $(eval $(call gb_CppunitTest_use_api,drawinglayer_processors,\ $(eval $(call gb_CppunitTest_use_libraries,drawinglayer_processors, \ basegfx \ - cppcanvas \ + $(if $(ENABLE_WASM_STRIP_CANVAS),,cppcanvas) \ cppu \ cppuhelper \ sal \ diff --git a/solenv/gbuild/extensions/post_SpeedUpTargets.mk b/solenv/gbuild/extensions/post_SpeedUpTargets.mk index 44539cc5576d..18f1277a8039 100644 --- a/solenv/gbuild/extensions/post_SpeedUpTargets.mk +++ b/solenv/gbuild/extensions/post_SpeedUpTargets.mk @@ -9,6 +9,9 @@ ifneq ($(CROSS_COMPILING),) gb_Module_add_targets_for_build := +endif + +ifeq ($(gb_CAN_EXECUTE_HOST_CODE),$(false)) gb_Module_SKIPTARGETS := check coverage slowcheck screenshot subsequentcheck uicheck endif diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index 2f5704896d42..ab6132e3b5d2 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -166,6 +166,14 @@ ifneq ($(strip $(ENVCFLAGSCXX)),) gb__ENV_CXXFLAGS := $(ENVCFLAGSCXX) endif +ifeq ($(CROSS_COMPILING),) +gb_CAN_EXECUTE_HOST_CODE := $(true) +else ifeq ($(OS),EMSCRIPTEN) +gb_CAN_EXECUTE_HOST_CODE := $(true) +else +gb_CAN_EXECUTE_HOST_CODE := $(false) +endif + include $(GBUILDDIR)/ExternalExecutable.mk include $(GBUILDDIR)/TargetLocations.mk diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index e660c20cc650..7cd4d3c6fa02 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -92,8 +92,6 @@ $(call gb_LinkTarget_add_auxtargets,$(2),\ endef -gb_SUPPRESS_TESTS := $(true) - define gb_Library_get_rpath endef diff --git a/writerperfect/CppunitTest_writerperfect_epubexport.mk b/writerperfect/CppunitTest_writerperfect_epubexport.mk index 298a045b32e3..ff8410b345be 100644 --- a/writerperfect/CppunitTest_writerperfect_epubexport.mk +++ b/writerperfect/CppunitTest_writerperfect_epubexport.mk @@ -30,7 +30,7 @@ $(eval $(call gb_CppunitTest_use_libraries,writerperfect_epubexport, \ )) $(eval $(call gb_CppunitTest_use_externals,writerperfect_epubexport,\ - epubgen \ + $(if $(ENABLE_WASM_STRIP_EPUB),,epubgen) \ libxml2 \ revenge \ )) |