[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.10 47/47] tests/vm: avoid re-building the VM images all the
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.10 47/47] tests/vm: avoid re-building the VM images all the time |
Date: |
Wed, 28 Feb 2024 23:35:15 +0300 |
From: Alex Bennée <alex.bennee@linaro.org>
The main problem is that "check-venv" is a .PHONY target will always
evaluate and trigger a full re-build of the VM images. While its
tempting to drop it from the dependencies that does introduce a
breakage on freshly configured builds.
Fortunately we do have the otherwise redundant --force flag for the
script which up until now was always on. If we make the usage of
--force conditional on dependencies other than check-venv triggering
the update we can avoid the costly rebuild and still run cleanly on a
fresh checkout.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2118
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240227144335.1196131-4-alex.bennee@linaro.org>
(cherry picked from commit 151b7dba391fab64cc008a1fdba6ddcf6f8c39c8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index 2cc2203d09..e332fd13c3 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -103,7 +103,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \
$(if $(LOG_CONSOLE),--log-console) \
--source-path $(SRC_PATH) \
--image "$@" \
- --force \
+ $(if $(filter-out check-venv, $?), --force) \
--build-image $@, \
" VM-IMAGE $*")
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 2276364c42..6a54d9d4e0 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -634,9 +634,9 @@ def main(vmcls, config=None):
vm = vmcls(args, config=config)
if args.build_image:
if os.path.exists(args.image) and not args.force:
- sys.stderr.writelines(["Image file exists: %s\n" % args.image,
+ sys.stderr.writelines(["Image file exists, skipping build:
%s\n" % args.image,
"Use --force option to overwrite\n"])
- return 1
+ return 0
return vm.build_image(args.image)
if args.build_qemu:
vm.add_source_dir(args.build_qemu)
--
2.39.2
- [Stable-7.2.10 37/47] .gitlab-ci.d/windows.yml: Drop msys2-32bit job, (continued)
- [Stable-7.2.10 37/47] .gitlab-ci.d/windows.yml: Drop msys2-32bit job, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 38/47] target/ppc: Fix lxv/stxv MSR facility check, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 39/47] hw/nvme: fix invalid endian conversion, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 40/47] pl031: Update last RTCLR value on write in case it's read back, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 41/47] target/i386: mask high bits of CR3 in 32-bit mode, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 44/47] target/i386: remove unnecessary/wrong application of the A20 mask, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 45/47] target/i386: leave the A20 bit set in the final NPT walk, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 42/47] target/i386: check validity of VMCB addresses, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 43/47] target/i386: Fix physical address truncation, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 46/47] tests/vm: update openbsd image to 7.4, Michael Tokarev, 2024/02/28
- [Stable-7.2.10 47/47] tests/vm: avoid re-building the VM images all the time,
Michael Tokarev <=