[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 02/44] tests/avocado/boot_xen.py: fetch kernel during test set
|
From: |
Thomas Huth |
|
Subject: |
[PATCH v5 02/44] tests/avocado/boot_xen.py: fetch kernel during test setUp() |
|
Date: |
Fri, 30 Aug 2024 15:37:56 +0200 |
From: Cleber Rosa <crosa@redhat.com>
The kernel is a common blob used in all tests. By moving it to the
setUp() method, the "fetch asset" plugin will recognize the kernel and
attempt to fetch it and cache it before the tests are started.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Message-ID: <20240806173119.582857-7-crosa@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/avocado/boot_xen.py | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tests/avocado/boot_xen.py b/tests/avocado/boot_xen.py
index f29bc58b9e..490a127a3e 100644
--- a/tests/avocado/boot_xen.py
+++ b/tests/avocado/boot_xen.py
@@ -30,23 +30,22 @@ class BootXen(LinuxKernelTest):
timeout = 90
XEN_COMMON_COMMAND_LINE = 'dom0_mem=128M loglvl=all guest_loglvl=all'
- def fetch_guest_kernel(self):
+ def setUp(self):
+ super(BootXen, self).setUp()
+
# Using my own built kernel - which works
kernel_url = ('https://fileserver.linaro.org/'
's/JSsewXGZ6mqxPr5/download?path=%2F&files='
'linux-5.9.9-arm64-ajb')
kernel_sha1 = '4f92bc4b9f88d5ab792fa7a43a68555d344e1b83'
- kernel_path = self.fetch_asset(kernel_url,
- asset_hash=kernel_sha1)
-
- return kernel_path
+ self.kernel_path = self.fetch_asset(kernel_url,
+ asset_hash=kernel_sha1)
def launch_xen(self, xen_path):
"""
Launch Xen with a dom0 guest kernel
"""
self.log.info("launch with xen_path: %s", xen_path)
- kernel_path = self.fetch_guest_kernel()
self.vm.set_console()
@@ -56,7 +55,7 @@ def launch_xen(self, xen_path):
'-append', self.XEN_COMMON_COMMAND_LINE,
'-device',
'guest-loader,addr=0x47000000,kernel=%s,bootargs=console=hvc0'
- % (kernel_path))
+ % (self.kernel_path))
self.vm.launch()
--
2.46.0
- [PATCH v5 00/44] Convert avocado tests to normal Python unittests, Thomas Huth, 2024/08/30
- [PATCH v5 01/44] tests/avocado: machine aarch64: standardize location and RO access, Thomas Huth, 2024/08/30
- [PATCH v5 02/44] tests/avocado/boot_xen.py: fetch kernel during test setUp(),
Thomas Huth <=
- [PATCH v5 03/44] tests/avocado/machine_aarch64_sbsaref.py: allow for rw usage of image, Thomas Huth, 2024/08/30
- [PATCH v5 04/44] Bump avocado to 103.0, Thomas Huth, 2024/08/30
- [PATCH v5 05/44] tests/avocado/avocado_qemu: Fix the "from" statements in linuxtest.py, Thomas Huth, 2024/08/30
- [PATCH v5 07/44] python: Install pycotap in our venv if necessary, Thomas Huth, 2024/08/30
- [PATCH v5 06/44] tests/avocado/boot_linux_console: Remove the s390x subtest, Thomas Huth, 2024/08/30
- [PATCH v5 08/44] tests/functional: Add base classes for the upcoming pytest-based tests, Thomas Huth, 2024/08/30
- [PATCH v5 09/44] tests/functional: Set up logging, Thomas Huth, 2024/08/30
- [PATCH v5 10/44] tests/Makefile.include: Increase the level of indentation in the help text, Thomas Huth, 2024/08/30
- [PATCH v5 11/44] tests/functional: Prepare the meson build system for the functional tests, Thomas Huth, 2024/08/30
- [PATCH v5 12/44] tests/functional: Convert simple avocado tests into standalone python tests, Thomas Huth, 2024/08/30