| e2e9fd25 | 30-Aug-2024 |
Thomas Huth <thuth@redhat.com> |
tests/functional: Convert the s390x avocado tests into standalone tests
These tests use archive.lzma_uncompress() from the Avocado utils, so provide a small helper function for this, based on the st
tests/functional: Convert the s390x avocado tests into standalone tests
These tests use archive.lzma_uncompress() from the Avocado utils, so provide a small helper function for this, based on the standard lzma module from Python instead.
And while we're at it, replace the MD5 hashes in the topology test with proper SHA256 hashes, since MD5 should not be used anymore nowadays.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-21-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
| 850a1951 | 30-Aug-2024 |
Thomas Huth <thuth@redhat.com> |
tests/functional: Add a function for extracting files from an archive
Some Avocado-based tests use the "archive" module from avocado.utils to extract files from an archive. To be able to use these t
tests/functional: Add a function for extracting files from an archive
Some Avocado-based tests use the "archive" module from avocado.utils to extract files from an archive. To be able to use these tests without Avocado, we have to provide our own function for extracting files. Fortunately, there is already the tarfile module that will provide us with this functionality, so let's just add a nice wrapper function around that.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240830133841.142644-19-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
| 34b17c0a | 30-Aug-2024 |
Thomas Huth <thuth@redhat.com> |
tests/functional: Allow asset downloading with concurrent threads
When running "make -j$(nproc) check-functional", tests that use the same asset might be running in parallel. Improve the downloading
tests/functional: Allow asset downloading with concurrent threads
When running "make -j$(nproc) check-functional", tests that use the same asset might be running in parallel. Improve the downloading to detect this situation and wait for the other thread to finish the download.
Message-ID: <20240830133841.142644-17-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
| f57213f8 | 30-Aug-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
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 ri
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>
show more ...
|
| 9903217a | 30-Aug-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
tests/functional: add a module for handling asset download & caching
The 'Asset' class is a simple module that declares a downloadable asset that can be cached locally. Downloads are stored in the u
tests/functional: add a module for handling asset download & caching
The 'Asset' class is a simple module that declares a downloadable asset that can be cached locally. Downloads are stored in the user's home dir at ~/.cache/qemu/download, using a sha256 sum of the URL.
[thuth: Drop sha1 support, use hash on file content for naming instead of URL, add the possibility to specify the cache dir via environment variable]
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-15-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
| 84e4a27f | 30-Aug-2024 |
Thomas Huth <thuth@redhat.com> |
tests/functional: Set up logging
Create log files for each test separately, one file that contains the basic logging and one that contains the console output.
Reviewed-by: Daniel P. Berrangé <berra
tests/functional: Set up logging
Create log files for each test separately, one file that contains the basic logging and one that contains the console output.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240830133841.142644-10-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|