Message ID | 20210803193447.3946219-2-crosa@redhat.com |
---|---|
State | New |
Headers | show |
Series | Acceptance Tests: clean up of temporary dirs and MAINTAINERS entry | expand |
On Tue, Aug 3, 2021 at 4:35 PM Cleber Rosa <crosa@redhat.com> wrote: > > 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> > --- > tests/acceptance/avocado_qemu/__init__.py | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Hi, On 8/3/21 4:34 PM, Cleber Rosa wrote: > 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. Good catch Peter! > > 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> > --- > 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..1e807e2e55 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(Test, self).tearDown() Could you use the new form of super [1] to make the pylint happier? [1] https://www.python.org/dev/peps/pep-3135/ Thanks! - Wainer > > def fetch_asset(self, name, > asset_hash=None, algorithm=None,
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index 2c4fef3e14..1e807e2e55 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(Test, self).tearDown() def fetch_asset(self, name, asset_hash=None, algorithm=None,
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> --- tests/acceptance/avocado_qemu/__init__.py | 1 + 1 file changed, 1 insertion(+)