summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.include
diff options
context:
space:
mode:
authorJohn Snow2022-05-26 02:09:18 +0200
committerPaolo Bonzini2022-06-06 09:26:54 +0200
commit0e7647aa8a5d5b99a0ffb401ba75f0ae8c171c96 (patch)
tree2e40d1c5572914150863fd5f2026c9b91a30606c /tests/Makefile.include
parenttests: add quiet-venv-pip macro (diff)
downloadqemu-0e7647aa8a5d5b99a0ffb401ba75f0ae8c171c96.tar.gz
qemu-0e7647aa8a5d5b99a0ffb401ba75f0ae8c171c96.tar.xz
qemu-0e7647aa8a5d5b99a0ffb401ba75f0ae8c171c96.zip
tests: install "qemu" namespace package into venv
This patch adds the "qemu" namespace package to the $build/tests/venv directory. It does so in "editable" mode, which means that changes to the source python directory will actively be reflected by the venv. This patch also then removes any sys.path hacking from the avocado test scripts directly. By doing this, the environment of where to find these packages is managed entirely by the virtual environment and not by the scripts themselves. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220526000921.1581503-7-jsnow@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/Makefile.include')
-rw-r--r--tests/Makefile.include1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include
index fa46c0c61b..3accb83b13 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -110,6 +110,7 @@ quiet-venv-pip = $(quiet-@)$(call quiet-command-run, \
$(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
$(call quiet-command, $(PYTHON) -m venv $@, VENV, $@)
+ $(call quiet-venv-pip,install -e "$(SRC_PATH)/python/")
$(call quiet-venv-pip,install -r $(TESTS_VENV_REQ))
$(call quiet-command, touch $@)