From 9cce855f472b871ef72f7a0bc053937b67097d0c Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 18 Aug 2016 19:55:53 +0300 Subject: bitbake: bitbake-selftest: introduce BB_TMPDIR_NOCLEAN Set this env variable to 'yes' to preserve temporary directories used by the fetcher tests. Useful for debugging tests. (Bitbake rev: 04132b261df9def3a0cff14c93c29b26ff906e8b) Signed-off-by: Markus Lehtonen Signed-off-by: Richard Purdie --- bitbake/lib/bb/tests/fetch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/tests/fetch.py') diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 272078f2b3..e8c416afd0 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py @@ -360,7 +360,10 @@ class FetcherTest(unittest.TestCase): def tearDown(self): os.chdir(self.origdir) - bb.utils.prunedir(self.tempdir) + if os.environ.get("BB_TMPDIR_NOCLEAN") == "yes": + print("Not cleaning up %s. Please remove manually." % self.tempdir) + else: + bb.utils.prunedir(self.tempdir) class MirrorUriTest(FetcherTest): -- cgit v1.2.3-54-g00ecf