From: Philippe Mathieu-Daudé Date: Wed, 15 Nov 2023 20:51:49 +0000 (+0100) Subject: tests/avocado: Make fetch_asset() unconditionally require a crypto hash X-Git-Tag: qemu-xen-4.20.0~414^2~4 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9d72dd100ced090f7708b2189a8ef4e855ac3314;p=qemu-xen.git tests/avocado: Make fetch_asset() unconditionally require a crypto hash In a perfect world we'd have reproducible tests, but then we'd be sure we run the same binaries. If a binary artifact isn't hashed, we have no idea what we are running. Therefore enforce hashing for all our artifacts. With this change, unhashed artifacts produce: $ avocado run tests/avocado/multiprocess.py (1/2) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64: ERROR: QemuBaseTest.fetch_asset() missing 1 required positional argument: 'asset_hash' (0.19 s) Inspired-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Message-ID: <20231115205149.90765-1-philmd@linaro.org> Signed-off-by: Thomas Huth --- diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py index d71e989db6..304c428168 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -254,7 +254,7 @@ class QemuBaseTest(avocado.Test): self.cancel("No QEMU binary defined or found in the build tree") def fetch_asset(self, name, - asset_hash=None, algorithm=None, + asset_hash, algorithm=None, locations=None, expire=None, find_only=False, cancel_on_missing=True): return super().fetch_asset(name,