stop leaking tempdirs

test_wrappers built temp dirs for running tests, but never
cleaned them up. So your /tmp is very full of tempest code now.

Fix this with an add cleanup

Change-Id: I4c05ba16c524b844f3cf43cfe0969ddd20238486
This commit is contained in:
Sean Dague 2014-01-30 07:06:10 -05:00
parent fa8a26d8ad
commit 86d3c42ad3
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ class TestWrappers(base.TestCase):
super(TestWrappers, self).setUp()
# Setup test dirs
self.directory = tempfile.mkdtemp(prefix='tempest-unit')
self.addCleanup(shutil.rmtree, self.directory)
self.test_dir = os.path.join(self.directory, 'tests')
os.mkdir(self.test_dir)
# Setup Test files