qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Acceptance Tests: add standard clean up at test tearDown()
@ 2021-09-20 15:18 Willian Rampazzo
  2021-09-20 18:25 ` Wainer dos Santos Moschetta
  0 siblings, 1 reply; 2+ messages in thread
From: Willian Rampazzo @ 2021-09-20 15:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Peter Maydell, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Cleber Rosa

From: Cleber Rosa <crosa@redhat.com>

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>

---
v2
  - adjust super call to conform with PEP3135
---
 tests/acceptance/avocado_qemu/__init__.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index 2c4fef3e14..d9e1b32aa1 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -276,6 +276,7 @@ def tearDown(self):
         for vm in self._vms.values():
             vm.shutdown()
         self._sd = None
+        super().tearDown()
 
     def fetch_asset(self, name,
                     asset_hash=None, algorithm=None,
-- 
2.31.1



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

* Re: [PATCH v2] Acceptance Tests: add standard clean up at test tearDown()
  2021-09-20 15:18 [PATCH v2] Acceptance Tests: add standard clean up at test tearDown() Willian Rampazzo
@ 2021-09-20 18:25 ` Wainer dos Santos Moschetta
  0 siblings, 0 replies; 2+ messages in thread
From: Wainer dos Santos Moschetta @ 2021-09-20 18:25 UTC (permalink / raw)
  To: Willian Rampazzo, qemu-devel
  Cc: Alex Bennée, Peter Maydell, Philippe Mathieu-Daudé,
	Cleber Rosa


On 9/20/21 12:18 PM, Willian Rampazzo wrote:
> From: Cleber Rosa <crosa@redhat.com>
>
> 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>
>
> ---
> v2
>    - adjust super call to conform with PEP3135
> ---
>   tests/acceptance/avocado_qemu/__init__.py | 1 +
>   1 file changed, 1 insertion(+)


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


>
> diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
> index 2c4fef3e14..d9e1b32aa1 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -276,6 +276,7 @@ def tearDown(self):
>           for vm in self._vms.values():
>               vm.shutdown()
>           self._sd = None
> +        super().tearDown()
>   
>       def fetch_asset(self, name,
>                       asset_hash=None, algorithm=None,



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

end of thread, other threads:[~2021-09-20 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-20 15:18 [PATCH v2] Acceptance Tests: add standard clean up at test tearDown() Willian Rampazzo
2021-09-20 18:25 ` 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).