Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-12 Thread Thomas Huth
On 12/07/2024 11.09, Daniel P. Berrangé wrote: On Thu, Jul 11, 2024 at 01:55:43PM +0200, Thomas Huth wrote: In the pytests, we cannot use the fetch_asset() function from Avocado anymore, so we have to provide our own implementation now instead. Thus add such a function based on the _download_wit

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-12 Thread Daniel P . Berrangé
On Thu, Jul 11, 2024 at 01:55:43PM +0200, Thomas Huth wrote: > In the pytests, we cannot use the fetch_asset() function from Avocado > anymore, so we have to provide our own implementation now instead. > Thus add such a function based on the _download_with_cache() function > from tests/vm/basevm.py

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Thomas Huth
On 11/07/2024 23.35, Richard Henderson wrote: On 7/11/24 12:23, Alex Bennée wrote: Richard Henderson writes: On 7/11/24 09:45, Richard Henderson wrote: On 7/11/24 04:55, Thomas Huth wrote: +    def fetch_asset(self, url, asset_hash): +    cache_dir = os.path.expanduser("~/.cache/qemu/do

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Thomas Huth
On 11/07/2024 20.49, Richard Henderson wrote: On 7/11/24 09:45, Richard Henderson wrote: On 7/11/24 04:55, Thomas Huth wrote: +    def fetch_asset(self, url, asset_hash): +    cache_dir = os.path.expanduser("~/.cache/qemu/download") +    if not os.path.exists(cache_dir): +    os

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Thomas Huth
On 11/07/2024 18.45, Richard Henderson wrote: On 7/11/24 04:55, Thomas Huth wrote: +    def fetch_asset(self, url, asset_hash): +    cache_dir = os.path.expanduser("~/.cache/qemu/download") +    if not os.path.exists(cache_dir): +    os.makedirs(cache_dir) +    fname = os.pat

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Richard Henderson
On 7/11/24 12:23, Alex Bennée wrote: Richard Henderson writes: On 7/11/24 09:45, Richard Henderson wrote: On 7/11/24 04:55, Thomas Huth wrote: +    def fetch_asset(self, url, asset_hash): +    cache_dir = os.path.expanduser("~/.cache/qemu/download") +    if not os.path.exists(cache_d

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Alex Bennée
Richard Henderson writes: > On 7/11/24 09:45, Richard Henderson wrote: >> On 7/11/24 04:55, Thomas Huth wrote: >>> +    def fetch_asset(self, url, asset_hash): >>> +    cache_dir = os.path.expanduser("~/.cache/qemu/download") >>> +    if not os.path.exists(cache_dir): >>> +    os.

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Richard Henderson
On 7/11/24 09:45, Richard Henderson wrote: On 7/11/24 04:55, Thomas Huth wrote: +    def fetch_asset(self, url, asset_hash): +    cache_dir = os.path.expanduser("~/.cache/qemu/download") +    if not os.path.exists(cache_dir): +    os.makedirs(cache_dir) +    fname = os.path.j

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Richard Henderson
On 7/11/24 04:55, Thomas Huth wrote: +def fetch_asset(self, url, asset_hash): +cache_dir = os.path.expanduser("~/.cache/qemu/download") +if not os.path.exists(cache_dir): +os.makedirs(cache_dir) +fname = os.path.join(cache_dir, +

[RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Thomas Huth
In the pytests, we cannot use the fetch_asset() function from Avocado anymore, so we have to provide our own implementation now instead. Thus add such a function based on the _download_with_cache() function from tests/vm/basevm.py for this purpose. Signed-off-by: Thomas Huth --- tests/pytest/qem