diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-06 14:05:50 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-21 06:18:35 -0400 |
commit | 00eb3db0aa2a9ff602d00e9870b52a2da36336df (patch) | |
tree | 0643a90e9ba5f07ce60b310a9c7260f62495d95b /tests/vm | |
parent | f5c730698a33ced107d6de26eb8c1b34486d8c2d (diff) |
tests/vm: check for Python YAML parser in the Makefile
No need to do it in the configure file if it is only used for a help message.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/Makefile.include | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index a599d1994d..61f893ffdc 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -17,6 +17,10 @@ IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES)) .PRECIOUS: $(IMAGE_FILES) +ifneq ($(PYTHON),) +HAVE_PYTHON_YAML = $(shell $(PYTHON) -c "import yaml" 2> /dev/null && echo yes) +endif + # 'vm-help' target was historically named 'vm-test' vm-help vm-test: @echo "vm-help: Test QEMU in preconfigured virtual machines" @@ -56,7 +60,7 @@ endif @echo " QEMU_LOCAL=1 - Use QEMU binary local to this build." @echo " QEMU=/path/to/qemu - Change path to QEMU binary" @echo " QEMU_IMG=/path/to/qemu-img - Change path to qemu-img tool" -ifeq ($(PYTHON_YAML),yes) +ifeq ($(HAVE_PYTHON_YAML),yes) @echo " QEMU_CONFIG=/path/conf.yml - Change path to VM configuration .yml file." else @echo " (install python3-yaml to enable support for yaml file to configure a VM.)" |