ComponentTestBase: keep tmpdir if GBP_TESTS_NOCLEAN is in env
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 29 Aug 2013 14:18:03 +0000 (17:18 +0300)
committerGuido Günther <agx@sigxcpu.org>
Wed, 4 Sep 2013 20:24:43 +0000 (22:24 +0200)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests/component/__init__.py

index a6334cb..e99525d 100644 (file)
@@ -112,7 +112,8 @@ class ComponentTestBase(object):
         """Test case teardown"""
         # Restore original working dir
         os.chdir(self._orig_dir)
-        shutil.rmtree(self._tmpdir)
+        if not os.getenv("GBP_TESTS_NOCLEAN"):
+            shutil.rmtree(self._tmpdir)
 
         self._capture_log(False)