Note that this patch actually changes the meaning of check-venv slightly
to how it has been operating in the past: this target now only installs
the necessary patches to run "make check" and will no longer pull in
dependencies for functional tests.

This winds up being safe to do because the meson dependencies will
handle this satisfactorily; the target here could even be removed, but
it's still useful as a manual invocation prior to running tests from
outside the meson test runner system.

Signed-off-by: John Snow <[email protected]>
---
 tests/Makefile.include | 25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 40b114bd158..237d410ad83 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -83,33 +83,16 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES)
 .PHONY: distclean-tcg
 distclean-tcg: $(DISTCLEAN_TCG_TARGET_RULES)
 
-# Python venv for running tests
-
-.PHONY: check-venv
-
 # Build up our target list from the filtered list of ninja targets
 TARGETS=$(patsubst libqemu-%.a, %, $(filter libqemu-%.a, $(ninja-targets)))
 
-TESTS_VENV_TOKEN=$(BUILD_DIR)/pyvenv/tests.group
-
-quiet-venv-pip = $(quiet-@)$(call quiet-command-run, \
-    $(PYTHON) -m pip -q --disable-pip-version-check $1, \
-    "VENVPIP","$1")
-
-$(TESTS_VENV_TOKEN): $(SRC_PATH)/pythondeps.toml
-       $(call quiet-venv-pip,install -e "$(SRC_PATH)/python/")
-       $(MKVENV_ENSUREGROUP) $< checktests functests
-       $(call quiet-command, touch $@)
-
-check-venv: $(TESTS_VENV_TOKEN)
-
 FUNCTIONAL_TARGETS=$(patsubst %-softmmu,check-functional-%, $(filter 
%-softmmu,$(TARGETS)))
 .PHONY: $(FUNCTIONAL_TARGETS)
-$(FUNCTIONAL_TARGETS): check-venv
+$(FUNCTIONAL_TARGETS):
        @$(MAKE) SPEED=thorough $(subst -functional,-func,$@)
 
 .PHONY: check-functional
-check-functional: check-venv
+check-functional:
        @$(NINJA) precache-functional
        @$(PYTHON) $(SRC_PATH)/scripts/clean_functional_cache.py
        @QEMU_TEST_NO_DOWNLOAD=1 $(MAKE) SPEED=thorough check-func 
check-func-quick
@@ -117,6 +100,10 @@ check-functional: check-venv
 .PHONY: check-func check-func-quick
 check-func check-func-quick:
 
+.PHONY: check-venv
+check-venv:
+       @$(NINJA) pyvenv/checktests.group
+
 # Consolidated targets
 
 .PHONY: check check-clean
-- 
2.51.1


Reply via email to