]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Acceptance Tests: add standard clean up at test tearDown()
authorCleber Rosa <crosa@redhat.com>
Mon, 20 Sep 2021 20:49:27 +0000 (17:49 -0300)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Mon, 27 Sep 2021 17:06:15 +0000 (19:06 +0200)
The avocado.Test class, used as the basis of the avocado_qemu.Test
class, performs a clean of temporary directories up as part of its own
tearDown() implementation.

But the avocado_qemu.Test class is currently missing the same clean
up, as it implemented its own tearDown() method without resorting to
the upper class behavior.

This brings avocado_qemu.Test behavior in sync with the standard
avocado.Test behavior and prevents temporary directories from
cluttering the test results directory (unless instructed to do so with
Avocado's "--keep-tmp" option).

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
[willianr: respin to new Python super format]
Signed-off-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210920204932.94132-2-willianr@redhat.com>

tests/acceptance/avocado_qemu/__init__.py

index 2c4fef3e1494e6c4cfced43c34a336e14152574b..d9e1b32aa164f0301862d3af910ecc75d0320a08 100644 (file)
@@ -276,6 +276,7 @@ class Test(avocado.Test):
         for vm in self._vms.values():
             vm.shutdown()
         self._sd = None
+        super().tearDown()
 
     def fetch_asset(self, name,
                     asset_hash=None, algorithm=None,