Acceptance tests: drop usage of ":avocado: enable"
authorCleber Rosa <crosa@redhat.com>
Mon, 18 Feb 2019 17:37:23 +0000 (12:37 -0500)
committerCleber Rosa <crosa@redhat.com>
Fri, 22 Feb 2019 19:07:01 +0000 (14:07 -0500)
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>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20190218173723.26120-1-crosa@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
docs/devel/testing.rst
tests/acceptance/boot_linux_console.py
tests/acceptance/linux_initrd.py
tests/acceptance/version.py
tests/acceptance/virtio_version.py
tests/acceptance/vnc.py
tests/requirements.txt

index 135743a2bf218401d66cba534d303d174aabe5cd..3ce171829d4bb48182e02a92fa3e15fbf18dc890 100644 (file)
@@ -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):
index 98324f7591299b439f7a5a931305a2c4d4228232..beeb1e59e8e20441e262d66c916686f4c6f68cbd 100644 (file)
@@ -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
     """
 
index 737355c2ef028350fb7d7926c569446cb633b637..5a15fc4347756cc94ccc78449b795b8aa94fa0d5 100644 (file)
@@ -18,7 +18,6 @@ class LinuxInitrd(Test):
     """
     Checks QEMU evaluates correctly the initrd file passed as -initrd option.
 
-    :avocado: enable
     :avocado: tags=x86_64
     """
 
index 13b0a7440dfb70c467601b90639b63d6854bc91c..67c2192c9320aba1f0b4001436b24e1cb47c9c1e 100644 (file)
@@ -14,7 +14,6 @@ from avocado_qemu import Test
 
 class Version(Test):
     """
-    :avocado: enable
     :avocado: tags=quick
     """
     def test_qmp_human_info_version(self):
index ce990250d828e0851d8af841bac6813d15f99fc1..464d75aa4e5a5c1e41df01740d8aad8fb830c297 100644 (file)
@@ -61,7 +61,6 @@ class VirtioVersionCheck(Test):
     same device tree created by `disable-modern` and
     `disable-legacy`.
 
-    :avocado: enable
     :avocado: tags=x86_64
     """
 
index b1ef9d71b17ed3f18579e589d727464d4a4cffcd..064ceabcc1e2ba84bd7d1f83e6c28b72a99273cd 100644 (file)
@@ -13,7 +13,6 @@ from avocado_qemu import Test
 
 class Vnc(Test):
     """
-    :avocado: enable
     :avocado: tags=vnc,quick
     """
     def test_no_vnc(self):
index 64c6e27a9408a3d3d77daacafb686d92b5fc0cbd..002ded6a22571d249c660d63d8f971cec8dbb251 100644 (file)
@@ -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