qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Acceptance tests: drop usage of ":avocado: enable"
@ 2019-02-18 17:37 Cleber Rosa
  2019-02-18 18:24 ` Caio Carrara
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Cleber Rosa @ 2019-02-18 17:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé, Caio Carrara, Cleber Rosa

The Avocado test runner attemps to find its INSTRUMENTED (that is,
Python based tests) in a manner that is as safe as possible to the
user.  Different from plain Python unittest, it won't load or
execute test code on an operation such as:

 $ avocado list tests/acceptance/

Before version 68.0, the logic implemented to identify INSTRUMENTED
tests would require either the ":avocado: enable" or ":avocado:
recursive" statement as a flag for tests that would not inherit
directly from "avocado.Test".  This is not necessary anymore,
and because of that the boiler plate statements can now be removed.

Reference: https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writers
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 docs/devel/testing.rst                 | 1 -
 tests/acceptance/boot_linux_console.py | 1 -
 tests/acceptance/linux_initrd.py       | 1 -
 tests/acceptance/version.py            | 1 -
 tests/acceptance/virtio_version.py     | 1 -
 tests/acceptance/vnc.py                | 1 -
 tests/requirements.txt                 | 2 +-
 7 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 135743a2bf..3ce171829d 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -600,7 +600,6 @@ the ``avocado_qemu.Test`` class.  Here's a simple usage example:
 
   class Version(Test):
       """
-      :avocado: enable
       :avocado: tags=quick
       """
       def test_qmp_human_info_version(self):
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index 98324f7591..beeb1e59e8 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -18,7 +18,6 @@ class BootLinuxConsole(Test):
     Boots a x86_64 Linux kernel and checks that the console is operational
     and the kernel command line is properly passed from QEMU to the kernel
 
-    :avocado: enable
     :avocado: tags=x86_64
     """
 
diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_initrd.py
index 737355c2ef..5a15fc4347 100644
--- a/tests/acceptance/linux_initrd.py
+++ b/tests/acceptance/linux_initrd.py
@@ -18,7 +18,6 @@ class LinuxInitrd(Test):
     """
     Checks QEMU evaluates correctly the initrd file passed as -initrd option.
 
-    :avocado: enable
     :avocado: tags=x86_64
     """
 
diff --git a/tests/acceptance/version.py b/tests/acceptance/version.py
index 13b0a7440d..67c2192c93 100644
--- a/tests/acceptance/version.py
+++ b/tests/acceptance/version.py
@@ -14,7 +14,6 @@ from avocado_qemu import Test
 
 class Version(Test):
     """
-    :avocado: enable
     :avocado: tags=quick
     """
     def test_qmp_human_info_version(self):
diff --git a/tests/acceptance/virtio_version.py b/tests/acceptance/virtio_version.py
index ce990250d8..464d75aa4e 100644
--- a/tests/acceptance/virtio_version.py
+++ b/tests/acceptance/virtio_version.py
@@ -61,7 +61,6 @@ class VirtioVersionCheck(Test):
     same device tree created by `disable-modern` and
     `disable-legacy`.
 
-    :avocado: enable
     :avocado: tags=x86_64
     """
 
diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py
index b1ef9d71b1..064ceabcc1 100644
--- a/tests/acceptance/vnc.py
+++ b/tests/acceptance/vnc.py
@@ -13,7 +13,6 @@ from avocado_qemu import Test
 
 class Vnc(Test):
     """
-    :avocado: enable
     :avocado: tags=vnc,quick
     """
     def test_no_vnc(self):
diff --git a/tests/requirements.txt b/tests/requirements.txt
index 64c6e27a94..002ded6a22 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -1,4 +1,4 @@
 # Add Python module requirements, one per line, to be installed
 # in the tests/venv Python virtual environment. For more info,
 # refer to: https://pip.pypa.io/en/stable/user_guide/#id1
-avocado-framework==65.0
+avocado-framework==68.0
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Acceptance tests: drop usage of ":avocado: enable"
  2019-02-18 17:37 [Qemu-devel] [PATCH] Acceptance tests: drop usage of ":avocado: enable" Cleber Rosa
@ 2019-02-18 18:24 ` Caio Carrara
  2019-02-18 21:27 ` Philippe Mathieu-Daudé
  2019-02-19 13:27 ` Wainer dos Santos Moschetta
  2 siblings, 0 replies; 4+ messages in thread
From: Caio Carrara @ 2019-02-18 18:24 UTC (permalink / raw)
  To: Cleber Rosa
  Cc: qemu-devel, Eduardo Habkost, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé

Hi, Cleber.

On Mon, Feb 18, 2019 at 12:37:23PM -0500, Cleber Rosa wrote:
> The Avocado test runner attemps to find its INSTRUMENTED (that is,
> Python based tests) in a manner that is as safe as possible to the
> user.  Different from plain Python unittest, it won't load or
> execute test code on an operation such as:
> 
>  $ avocado list tests/acceptance/
> 
> Before version 68.0, the logic implemented to identify INSTRUMENTED
> tests would require either the ":avocado: enable" or ":avocado:
> recursive" statement as a flag for tests that would not inherit
> directly from "avocado.Test".  This is not necessary anymore,
> and because of that the boiler plate statements can now be removed.
> 
> Reference: https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writers
> Signed-off-by: Cleber Rosa <crosa@redhat.com>

Reviewed-by: Caio Carrara <ccarrara@redhat.com>

> ---
>  docs/devel/testing.rst                 | 1 -
>  tests/acceptance/boot_linux_console.py | 1 -
>  tests/acceptance/linux_initrd.py       | 1 -
>  tests/acceptance/version.py            | 1 -
>  tests/acceptance/virtio_version.py     | 1 -
>  tests/acceptance/vnc.py                | 1 -
>  tests/requirements.txt                 | 2 +-
>  7 files changed, 1 insertion(+), 7 deletions(-)
> 
{...}
> 2.20.1
> 

Thanks,
-- 
Caio Carrara
Software Engineer, Virt Team - Red Hat
ccarrara@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Acceptance tests: drop usage of ":avocado: enable"
  2019-02-18 17:37 [Qemu-devel] [PATCH] Acceptance tests: drop usage of ":avocado: enable" Cleber Rosa
  2019-02-18 18:24 ` Caio Carrara
@ 2019-02-18 21:27 ` Philippe Mathieu-Daudé
  2019-02-19 13:27 ` Wainer dos Santos Moschetta
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-02-18 21:27 UTC (permalink / raw)
  To: Cleber Rosa, qemu-devel
  Cc: Eduardo Habkost, Wainer dos Santos Moschetta, Caio Carrara

On 2/18/19 6:37 PM, Cleber Rosa wrote:
> The Avocado test runner attemps to find its INSTRUMENTED (that is,
> Python based tests) in a manner that is as safe as possible to the
> user.  Different from plain Python unittest, it won't load or
> execute test code on an operation such as:
> 
>  $ avocado list tests/acceptance/
> 
> Before version 68.0, the logic implemented to identify INSTRUMENTED
> tests would require either the ":avocado: enable" or ":avocado:
> recursive" statement as a flag for tests that would not inherit
> directly from "avocado.Test".  This is not necessary anymore,
> and because of that the boiler plate statements can now be removed.

Yay \o/

> 
> Reference: https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writers
> Signed-off-by: Cleber Rosa <crosa@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  docs/devel/testing.rst                 | 1 -
>  tests/acceptance/boot_linux_console.py | 1 -
>  tests/acceptance/linux_initrd.py       | 1 -
>  tests/acceptance/version.py            | 1 -
>  tests/acceptance/virtio_version.py     | 1 -
>  tests/acceptance/vnc.py                | 1 -
>  tests/requirements.txt                 | 2 +-
>  7 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
> index 135743a2bf..3ce171829d 100644
> --- a/docs/devel/testing.rst
> +++ b/docs/devel/testing.rst
> @@ -600,7 +600,6 @@ the ``avocado_qemu.Test`` class.  Here's a simple usage example:
>  
>    class Version(Test):
>        """
> -      :avocado: enable
>        :avocado: tags=quick
>        """
>        def test_qmp_human_info_version(self):
> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> index 98324f7591..beeb1e59e8 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -18,7 +18,6 @@ class BootLinuxConsole(Test):
>      Boots a x86_64 Linux kernel and checks that the console is operational
>      and the kernel command line is properly passed from QEMU to the kernel
>  
> -    :avocado: enable
>      :avocado: tags=x86_64
>      """
>  
> diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_initrd.py
> index 737355c2ef..5a15fc4347 100644
> --- a/tests/acceptance/linux_initrd.py
> +++ b/tests/acceptance/linux_initrd.py
> @@ -18,7 +18,6 @@ class LinuxInitrd(Test):
>      """
>      Checks QEMU evaluates correctly the initrd file passed as -initrd option.
>  
> -    :avocado: enable
>      :avocado: tags=x86_64
>      """
>  
> diff --git a/tests/acceptance/version.py b/tests/acceptance/version.py
> index 13b0a7440d..67c2192c93 100644
> --- a/tests/acceptance/version.py
> +++ b/tests/acceptance/version.py
> @@ -14,7 +14,6 @@ from avocado_qemu import Test
>  
>  class Version(Test):
>      """
> -    :avocado: enable
>      :avocado: tags=quick
>      """
>      def test_qmp_human_info_version(self):
> diff --git a/tests/acceptance/virtio_version.py b/tests/acceptance/virtio_version.py
> index ce990250d8..464d75aa4e 100644
> --- a/tests/acceptance/virtio_version.py
> +++ b/tests/acceptance/virtio_version.py
> @@ -61,7 +61,6 @@ class VirtioVersionCheck(Test):
>      same device tree created by `disable-modern` and
>      `disable-legacy`.
>  
> -    :avocado: enable
>      :avocado: tags=x86_64
>      """
>  
> diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py
> index b1ef9d71b1..064ceabcc1 100644
> --- a/tests/acceptance/vnc.py
> +++ b/tests/acceptance/vnc.py
> @@ -13,7 +13,6 @@ from avocado_qemu import Test
>  
>  class Vnc(Test):
>      """
> -    :avocado: enable
>      :avocado: tags=vnc,quick
>      """
>      def test_no_vnc(self):
> diff --git a/tests/requirements.txt b/tests/requirements.txt
> index 64c6e27a94..002ded6a22 100644
> --- a/tests/requirements.txt
> +++ b/tests/requirements.txt
> @@ -1,4 +1,4 @@
>  # Add Python module requirements, one per line, to be installed
>  # in the tests/venv Python virtual environment. For more info,
>  # refer to: https://pip.pypa.io/en/stable/user_guide/#id1
> -avocado-framework==65.0
> +avocado-framework==68.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Acceptance tests: drop usage of ":avocado: enable"
  2019-02-18 17:37 [Qemu-devel] [PATCH] Acceptance tests: drop usage of ":avocado: enable" Cleber Rosa
  2019-02-18 18:24 ` Caio Carrara
  2019-02-18 21:27 ` Philippe Mathieu-Daudé
@ 2019-02-19 13:27 ` Wainer dos Santos Moschetta
  2 siblings, 0 replies; 4+ messages in thread
From: Wainer dos Santos Moschetta @ 2019-02-19 13:27 UTC (permalink / raw)
  To: Cleber Rosa, qemu-devel
  Cc: Philippe Mathieu-Daudé, Eduardo Habkost, Caio Carrara


On 02/18/2019 02:37 PM, Cleber Rosa wrote:
> The Avocado test runner attemps to find its INSTRUMENTED (that is,
> Python based tests) in a manner that is as safe as possible to the
> user.  Different from plain Python unittest, it won't load or
> execute test code on an operation such as:
>
>   $ avocado list tests/acceptance/
>
> Before version 68.0, the logic implemented to identify INSTRUMENTED
> tests would require either the ":avocado: enable" or ":avocado:
> recursive" statement as a flag for tests that would not inherit
> directly from "avocado.Test".  This is not necessary anymore,
> and because of that the boiler plate statements can now be removed.
>
> Reference: https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writers
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>   docs/devel/testing.rst                 | 1 -
>   tests/acceptance/boot_linux_console.py | 1 -
>   tests/acceptance/linux_initrd.py       | 1 -
>   tests/acceptance/version.py            | 1 -
>   tests/acceptance/virtio_version.py     | 1 -
>   tests/acceptance/vnc.py                | 1 -
>   tests/requirements.txt                 | 2 +-
>   7 files changed, 1 insertion(+), 7 deletions(-)

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>


>
> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
> index 135743a2bf..3ce171829d 100644
> --- a/docs/devel/testing.rst
> +++ b/docs/devel/testing.rst
> @@ -600,7 +600,6 @@ the ``avocado_qemu.Test`` class.  Here's a simple usage example:
>   
>     class Version(Test):
>         """
> -      :avocado: enable
>         :avocado: tags=quick
>         """
>         def test_qmp_human_info_version(self):
> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> index 98324f7591..beeb1e59e8 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -18,7 +18,6 @@ class BootLinuxConsole(Test):
>       Boots a x86_64 Linux kernel and checks that the console is operational
>       and the kernel command line is properly passed from QEMU to the kernel
>   
> -    :avocado: enable
>       :avocado: tags=x86_64
>       """
>   
> diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_initrd.py
> index 737355c2ef..5a15fc4347 100644
> --- a/tests/acceptance/linux_initrd.py
> +++ b/tests/acceptance/linux_initrd.py
> @@ -18,7 +18,6 @@ class LinuxInitrd(Test):
>       """
>       Checks QEMU evaluates correctly the initrd file passed as -initrd option.
>   
> -    :avocado: enable
>       :avocado: tags=x86_64
>       """
>   
> diff --git a/tests/acceptance/version.py b/tests/acceptance/version.py
> index 13b0a7440d..67c2192c93 100644
> --- a/tests/acceptance/version.py
> +++ b/tests/acceptance/version.py
> @@ -14,7 +14,6 @@ from avocado_qemu import Test
>   
>   class Version(Test):
>       """
> -    :avocado: enable
>       :avocado: tags=quick
>       """
>       def test_qmp_human_info_version(self):
> diff --git a/tests/acceptance/virtio_version.py b/tests/acceptance/virtio_version.py
> index ce990250d8..464d75aa4e 100644
> --- a/tests/acceptance/virtio_version.py
> +++ b/tests/acceptance/virtio_version.py
> @@ -61,7 +61,6 @@ class VirtioVersionCheck(Test):
>       same device tree created by `disable-modern` and
>       `disable-legacy`.
>   
> -    :avocado: enable
>       :avocado: tags=x86_64
>       """
>   
> diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py
> index b1ef9d71b1..064ceabcc1 100644
> --- a/tests/acceptance/vnc.py
> +++ b/tests/acceptance/vnc.py
> @@ -13,7 +13,6 @@ from avocado_qemu import Test
>   
>   class Vnc(Test):
>       """
> -    :avocado: enable
>       :avocado: tags=vnc,quick
>       """
>       def test_no_vnc(self):
> diff --git a/tests/requirements.txt b/tests/requirements.txt
> index 64c6e27a94..002ded6a22 100644
> --- a/tests/requirements.txt
> +++ b/tests/requirements.txt
> @@ -1,4 +1,4 @@
>   # Add Python module requirements, one per line, to be installed
>   # in the tests/venv Python virtual environment. For more info,
>   # refer to: https://pip.pypa.io/en/stable/user_guide/#id1
> -avocado-framework==65.0
> +avocado-framework==68.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-19 13:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-18 17:37 [Qemu-devel] [PATCH] Acceptance tests: drop usage of ":avocado: enable" Cleber Rosa
2019-02-18 18:24 ` Caio Carrara
2019-02-18 21:27 ` Philippe Mathieu-Daudé
2019-02-19 13:27 ` Wainer dos Santos Moschetta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).