Kaydet (Commit) fbcdc3ec authored tarafından David Tardon's avatar David Tardon

fix deps for PythonTest

System python can be used for build even if the bundled python is
enabled, c.f. --enable-python=internal vs. fully-internal. We need to
use the python that is used at runtime, not for building.

Change-Id: Ia1cd0b787d23645ce469e6975d90f01239256b9b
üst 1961b699
...@@ -12,9 +12,15 @@ ...@@ -12,9 +12,15 @@
ifeq ($(SYSTEM_PYTHON),) ifeq ($(SYSTEM_PYTHON),)
gb_PythonTest_EXECUTABLE := $(gb_Python_INSTALLED_EXECUTABLE) gb_PythonTest_EXECUTABLE := $(gb_Python_INSTALLED_EXECUTABLE)
gb_PythonTest_EXECUTABLE_GDB := $(gb_Python_INSTALLED_EXECUTABLE_GDB) gb_PythonTest_EXECUTABLE_GDB := $(gb_Python_INSTALLED_EXECUTABLE_GDB)
ifeq ($(OS),MACOSX)
gb_PythonTest_DEPS := $(call gb_GeneratedPackage_get_target_for_build,python3)
else
gb_PythonTest_DEPS := $(call gb_Package_get_target_for_build,python3)
endif
else else
gb_PythonTest_EXECUTABLE := $(PYTHON_FOR_BUILD) gb_PythonTest_EXECUTABLE := $(PYTHON_FOR_BUILD)
gb_PythonTest_EXECUTABLE_GDB := $(PYTHON_FOR_BUILD) gb_PythonTest_EXECUTABLE_GDB := $(PYTHON_FOR_BUILD)
gb_PythonTest_DEPS :=
endif endif
gb_PythonTest_COMMAND := $(gb_PythonTest_EXECUTABLE) -m unittest gb_PythonTest_COMMAND := $(gb_PythonTest_EXECUTABLE) -m unittest
...@@ -29,7 +35,7 @@ ifneq ($(DISABLE_PYTHON),TRUE) ...@@ -29,7 +35,7 @@ ifneq ($(DISABLE_PYTHON),TRUE)
# pass a hard-coded 139 to the gdb postprocess script to match soffice.bin # pass a hard-coded 139 to the gdb postprocess script to match soffice.bin
# signal exit values (assumption: non-0 exit value here means it crashed) # signal exit values (assumption: non-0 exit value here means it crashed)
.PHONY : $(call gb_PythonTest_get_target,%) .PHONY : $(call gb_PythonTest_get_target,%)
$(call gb_PythonTest_get_target,%) :| $(call gb_ExternalExecutable_get_dependencies,python) $(call gb_PythonTest_get_target,%) :| $(gb_PythonTest_DEPS)
$(call gb_Output_announce,$*,$(true),PYT,2) $(call gb_Output_announce,$*,$(true),PYT,2)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
rm -rf $(dir $(call gb_PythonTest_get_target,$*)) && \ rm -rf $(dir $(call gb_PythonTest_get_target,$*)) && \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment