[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/4] tests/vm: Add a dependency to qemu-img
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH 2/4] tests/vm: Add a dependency to qemu-img |
Date: |
Thu, 28 Jun 2018 12:47:23 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/28/2018 12:35 PM, Philippe Mathieu-Daudé wrote:
> Before the first use, the VM image are resized with qemu-img.
>
> Add a dependency to the qemu-img tool to fix:
>
> $ make vm-build-ubuntu.i386
> Traceback (most recent call last):
> File "source/qemu/tests/vm/basevm.py", line 236, in main
> return vm.build_image(args.image)
> File "tests/vm/ubuntu.i386", line 67, in build_image
> subprocess.check_call(["qemu-img", "resize", img_tmp, "50G"])
> OSError: [Errno 2] No such file or directory
> tests/vm/Makefile.include:23: recipe for target 'tests/vm/ubuntu.i386.img'
> failed
> make: *** [tests/vm/ubuntu.i386.img] Error 2
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> tests/vm/Makefile.include | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
> index 5daa2a3b73..e5e8146267 100644
> --- a/tests/vm/Makefile.include
> +++ b/tests/vm/Makefile.include
> @@ -17,10 +17,13 @@ vm-test:
>
> vm-build-all: $(addprefix vm-build-, $(IMAGES))
>
> +$(IMAGE_FILES): qemu-img$(EXESUF)
> +
> tests/vm/%.img: $(SRC_PATH)/tests/vm/% \
> $(SRC_PATH)/tests/vm/basevm.py \
> $(SRC_PATH)/tests/vm/Makefile.include
> $(call quiet-command, \
> + PATH=$(PATH):. \
Oh since we want to use the shell PATH and not a make variable, it could
be cleaner to rather use:
+ PATH=$$PATH:. \
> $< \
> $(if $(V)$(DEBUG), --debug) \
> --image "$@" \
>