summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-08-29 17:18:03 +0300
committerGuido Günther <agx@sigxcpu.org>2013-09-04 22:24:43 +0200
commit6c478a6208a9f91271b5cbcd8ff4e22a75b2b7ea (patch)
tree567450557ba596f45b036e4d3a0bb9e8eb88aa46 /tests
parent54099f5ef7269a0b2d964a56cdfcf19af98473da (diff)
downloadgit-buildpackage-6c478a6208a9f91271b5cbcd8ff4e22a75b2b7ea.tar.gz
git-buildpackage-6c478a6208a9f91271b5cbcd8ff4e22a75b2b7ea.tar.bz2
git-buildpackage-6c478a6208a9f91271b5cbcd8ff4e22a75b2b7ea.zip
ComponentTestBase: keep tmpdir if GBP_TESTS_NOCLEAN is in env
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/component/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/component/__init__.py b/tests/component/__init__.py
index a6334cba..e99525d8 100644
--- a/tests/component/__init__.py
+++ b/tests/component/__init__.py
@@ -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)