qemu/tests
Daniel P. Berrangé f57213f85b tests/functional: enable pre-emptive caching of assets
Many tests need to access assets stored on remote sites. We don't want
to download these during test execution when run by meson, since this
risks hitting test timeouts when data transfers are slow.

Add support for pre-emptive caching of assets by setting the env var
QEMU_TEST_PRECACHE to point to a timestamp file. When this is set,
instead of running the test, the assets will be downloaded and saved
to the cache, then the timestamp file created.

A meson custom target is created as a dependency of each test suite
to trigger the pre-emptive caching logic before the test runs.

When run in caching mode, it will locate assets by looking for class
level variables with a name prefix "ASSET_", and type "Asset".

At the ninja level

   ninja test --suite functional

will speculatively download any assets that are not already cached,
so it is advisable to set a timeout multiplier.

   QEMU_TEST_NO_DOWNLOAD=1 ninja test --suite functional

will fail the test if a required asset is not already cached

   ninja precache-functional

will download and cache all assets required by the functional
tests

At the make level, precaching is always done by

   make check-functional

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
[thuth: Remove the duplicated "path = os.path.basename(...)" line]
Message-ID: <20240830133841.142644-16-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04 10:52:29 +02:00
..
avocado tests/functional: Convert avocado tests that just need a small adjustment 2024-09-04 10:52:29 +02:00
bench tests/bench: Add bufferiszero-bench 2024-05-03 08:03:35 -07:00
data tests/acpi: Add expected ACPI AML files for RISC-V 2024-07-22 20:15:42 -04:00
decode tests/: spelling fixes 2023-09-08 13:08:52 +03:00
docker ci: refresh package lists with lcitool 2024-08-16 09:16:03 +02:00
fp tests/fp: Bump fp-test-mulAdd test timeout to 3 minutes 2024-01-12 13:23:48 +00:00
functional tests/functional: enable pre-emptive caching of assets 2024-09-04 10:52:29 +02:00
guest-debug tests: Gently exit from GDB when tests complete 2024-05-17 16:49:04 +02:00
image-fuzzer
include
keys
lcitool ci: add gtk-vnc to the deps 2024-08-16 09:16:03 +02:00
migration tests/qtest/migration-test: Use custom asm bios for ppc64 2024-06-14 14:01:23 -03:00
multiboot
perf/block/qcow2
qapi-schema qapi: remove "Example" doc section 2024-07-17 10:20:54 +02:00
qemu-iotests iotests/024: exclude 'backing file format' field from the output 2024-08-06 20:12:40 +02:00
qtest tests/qtest: Delete previous boot file 2024-08-26 10:58:11 +02:00
rocker
tcg target/i386: Fix carry flag for BLSI 2024-08-21 09:11:26 +10:00
tsan block: remove AioContext locking 2023-12-21 22:49:27 +01:00
uefi-test-tools tests/data/uefi-boot-images: Add RISC-V ISO image 2024-07-03 18:14:06 -04:00
unit hw/core/ptimer: fix timer zero period condition for freq > 1GHz 2024-08-12 11:40:16 +01:00
vm ci: refresh package lists with lcitool 2024-08-16 09:16:03 +02:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include tests/functional: enable pre-emptive caching of assets 2024-09-04 10:52:29 +02:00
meson.build tests/functional: Prepare the meson build system for the functional tests 2024-09-04 10:52:29 +02:00
test-qht-par.c
vhost-user-bridge.c error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00