From cf110c74e21fa7f4826f4074b26455c4f6661f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 3 Nov 2015 02:40:53 +0100 Subject: [PATCH] tests: fix cleanup in dom0 updates tests The only directory to cleanup is cls.tmpdir. So make it simple, without class property cleanup_paths, which for some reason didn't wasn't emptied in tearDownClass. --- tests/dom0_update.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/dom0_update.py b/tests/dom0_update.py index 41328a85..cb294224 100644 --- a/tests/dom0_update.py +++ b/tests/dom0_update.py @@ -38,7 +38,6 @@ class TC_00_Dom0UpgradeMixin(qubes.tests.SystemTestsMixin): """ Tests for downloading dom0 updates using VMs based on different templates """ - cleanup_paths = [] pkg_name = 'qubes-test-pkg' dom0_update_common_opts = ['--disablerepo=*', '--enablerepo=test', '--setopt=test.copy_local=1'] @@ -76,7 +75,6 @@ Expire-Date: 0 super(TC_00_Dom0UpgradeMixin, cls).setUpClass() cls.tmpdir = tempfile.mkdtemp() - cls.cleanup_paths += [cls.tmpdir] cls.keyid = cls.generate_key(cls.tmpdir) @@ -98,9 +96,7 @@ enabled = 1 subprocess.check_call(['sudo', 'rm', '-f', '/etc/yum.repos.d/test.repo']) - for dir in cls.cleanup_paths: - shutil.rmtree(dir) - cls.cleanup_paths = [] + shutil.rmtree(cls.tmpdir) def setUp(self): super(TC_00_Dom0UpgradeMixin, self).setUp()