diff mbox series

[1/2] Acceptance test: cancel test if m68k kernel packages goes missing

Message ID 20191029232320.12419-2-crosa@redhat.com (mailing list archive)
State New, archived
Headers show
Series Acceptance test: update kernel used on m68k/q800 test | expand

Commit Message

Cleber Rosa Oct. 29, 2019, 11:23 p.m. UTC
The Linux kernel that is extracted from a Debian package for the q800
machine test is hosted on a "pool" location.  AFAICT, it gets updated
without too much ceremony, and I don't see any archival location that
is stable enough.

For now, to avoid test errors, let's cancel the test if fetching the
package fails.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 tests/acceptance/boot_linux_console.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Alex Bennée Oct. 31, 2019, 8:06 a.m. UTC | #1
Cleber Rosa <crosa@redhat.com> writes:

> The Linux kernel that is extracted from a Debian package for the q800
> machine test is hosted on a "pool" location.  AFAICT, it gets updated
> without too much ceremony, and I don't see any archival location that
> is stable enough.
>
> For now, to avoid test errors, let's cancel the test if fetching the
> package fails.
>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  tests/acceptance/boot_linux_console.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> index df27813c78..c439fd90fc 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -387,7 +387,10 @@ class BootLinuxConsole(Test):
>          deb_url = ('http://ftp.ports.debian.org/debian-ports/pool-m68k/main'
>                     '/l/linux/kernel-image-5.2.0-2-m68k-di_5.2.9-2_m68k.udeb')
>          deb_hash = '0797e05129595f22f3c0142db5e199769a723bf9'
> -        deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> +        try:
> +            deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> +        except OSError as exp:
> +            self.cancel(exp)
>          kernel_path = self.extract_from_deb(deb_path,
>                                              '/boot/vmlinux-5.2.0-2-m68k')


--
Alex Bennée
diff mbox series

Patch

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index df27813c78..c439fd90fc 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -387,7 +387,10 @@  class BootLinuxConsole(Test):
         deb_url = ('http://ftp.ports.debian.org/debian-ports/pool-m68k/main'
                    '/l/linux/kernel-image-5.2.0-2-m68k-di_5.2.9-2_m68k.udeb')
         deb_hash = '0797e05129595f22f3c0142db5e199769a723bf9'
-        deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
+        try:
+            deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
+        except OSError as exp:
+            self.cancel(exp)
         kernel_path = self.extract_from_deb(deb_path,
                                             '/boot/vmlinux-5.2.0-2-m68k')