[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 1/4] avocado_qemu: Fix KNOWN_DISTROS map into the LinuxDis

From: Cleber Rosa
Subject: Re: [PATCH v5 1/4] avocado_qemu: Fix KNOWN_DISTROS map into the LinuxDistro class
Date: Thu, 8 Jul 2021 13:34:05 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/8/21 4:56 AM, Eric Auger wrote:

I am not sufficiently expert on the test infra and python to be really
efficient fixing that. Can anyone help quickly to target the soft
freeze? Otherwise, today I will drop that patch and restore the code I
had in v4, just based on Cleber series. I think the refactoring can
happen later...

Hi Eric,

The following diff works for me:

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index af93cd63ea..b3bed00062 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -310,6 +310,8 @@ class LinuxDistro:
             '31': {
                 {'checksum': 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c5c27a0'},
+                'aarch64':
+                {'checksum': '1e18d9c0cf734940c4b5d5ec592facaed2af0ad0329383d5639c997fdf16fe49'},
                 {'checksum': '7c3528b85a3df4b2306e892199a9e1e43f991c506f2cc390dc4efa2026ad2f58'},
@@ -323,10 +325,11 @@ def __init__(self, name, version, arch):
         self.version = version
         self.arch = arch
-            self._info = self.KNOWN_DISTROS.get(name).get(version).get(arch)
+            info = self.KNOWN_DISTROS.get(name).get(version).get(arch)
         except AttributeError:
             # Unknown distro
-            self._info = {}
+            info = None
+        self._info = info or {}

     def checksum(self):

I've tested it with both existing and the newly introduced tests.


- Cleber.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]