[PATCH v4 29/40] tests/acceptance: skip LinuxInitrd 2gib with v4.16 on GitLab

Alex Bennée posted 40 patches 5 years, 7 months ago
Maintainers: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, Cornelia Huck <cohuck@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Thomas Huth <thuth@redhat.com>
[PATCH v4 29/40] tests/acceptance: skip LinuxInitrd 2gib with v4.16 on GitLab
Posted by Alex Bennée 5 years, 7 months ago
This fails on GitLab but not when run locally on the same container
image. It's very confusing.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/acceptance/linux_initrd.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_initrd.py
index a3e54d3fc91..a249e2f14a2 100644
--- a/tests/acceptance/linux_initrd.py
+++ b/tests/acceptance/linux_initrd.py
@@ -8,10 +8,12 @@
 # This work is licensed under the terms of the GNU GPL, version 2 or
 # later.  See the COPYING file in the top-level directory.
 
+import os
 import logging
 import tempfile
 
 from avocado_qemu import Test
+from avocado import skipIf
 
 
 class LinuxInitrd(Test):
@@ -51,6 +53,7 @@ class LinuxInitrd(Test):
                 max_size + 1)
             self.assertRegex(self.vm.get_log(), expected_msg)
 
+    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
     def test_with_2gib_file_should_work_with_linux_v4_16(self):
         """
         QEMU has supported up to 4 GiB initrd for recent kernel
-- 
2.20.1


Re: [PATCH v4 29/40] tests/acceptance: skip LinuxInitrd 2gib with v4.16 on GitLab
Posted by Philippe Mathieu-Daudé 5 years, 7 months ago
On 7/1/20 3:56 PM, Alex Bennée wrote:
> This fails on GitLab but not when run locally on the same container
> image. It's very confusing.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/acceptance/linux_initrd.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_initrd.py
> index a3e54d3fc91..a249e2f14a2 100644
> --- a/tests/acceptance/linux_initrd.py
> +++ b/tests/acceptance/linux_initrd.py
> @@ -8,10 +8,12 @@
>  # This work is licensed under the terms of the GNU GPL, version 2 or
>  # later.  See the COPYING file in the top-level directory.
>  
> +import os
>  import logging
>  import tempfile
>  
>  from avocado_qemu import Test
> +from avocado import skipIf
>  
>  
>  class LinuxInitrd(Test):
> @@ -51,6 +53,7 @@ class LinuxInitrd(Test):
>                  max_size + 1)
>              self.assertRegex(self.vm.get_log(), expected_msg)
>  
> +    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
>      def test_with_2gib_file_should_work_with_linux_v4_16(self):
>          """
>          QEMU has supported up to 4 GiB initrd for recent kernel
> 

Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org>