diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2025-08-29 15:26:14 +0100 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2025-09-09 09:57:51 +0200 |
| commit | 9f80f3695d305015f5271d946304e5cffee607c2 (patch) | |
| tree | dd8eeac2d4844b9156979dc2270f766c12afd2d0 /tests/functional/qemu_test/asset.py | |
| parent | 5f81033e5b3e55eda2a1d06f959c05b61e719d68 (diff) | |
| download | focaccia-qemu-9f80f3695d305015f5271d946304e5cffee607c2.tar.gz focaccia-qemu-9f80f3695d305015f5271d946304e5cffee607c2.zip | |
tests/functional: enable force refresh of cached assets
If the 'QEMU_TEST_REFRESH_CACHE' environment variable is set, then ignore any existing cached asset and download a fresh copy. This can be used to selectively refresh assets if set before running a single test script. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250829142616.2633254-2-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/functional/qemu_test/asset.py')
| -rw-r--r-- | tests/functional/qemu_test/asset.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py index 704b84d0ea..b5a6136d36 100644 --- a/tests/functional/qemu_test/asset.py +++ b/tests/functional/qemu_test/asset.py @@ -72,6 +72,10 @@ class Asset: return self.hash == hl.hexdigest() def valid(self): + if os.getenv("QEMU_TEST_REFRESH_CACHE", None) is not None: + self.log.info("Force refresh of asset %s", self.url) + return False + return self.cache_file.exists() and self._check(self.cache_file) def fetchable(self): |