summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-08-18 19:55:53 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-20 16:08:59 +0100
commit9cce855f472b871ef72f7a0bc053937b67097d0c (patch)
tree5a64015522226aca8ba328b62094f478b69b45b9
parent81697a8661a5d620960306fe12825cd13a1ba4c6 (diff)
downloadpoky-9cce855f472b871ef72f7a0bc053937b67097d0c.tar.gz
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 <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/bin/bitbake-selftest1
-rw-r--r--bitbake/lib/bb/tests/fetch.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-selftest b/bitbake/bin/bitbake-selftest
index 25905d7c10..1e00e33271 100755
--- a/bitbake/bin/bitbake-selftest
+++ b/bitbake/bin/bitbake-selftest
@@ -41,6 +41,7 @@ ENV_HELP = """\
41Environment variables: 41Environment variables:
42 BB_SKIP_NETTESTS set to 'yes' in order to skip tests using network 42 BB_SKIP_NETTESTS set to 'yes' in order to skip tests using network
43 connection 43 connection
44 BB_TMPDIR_NOCLEAN set to 'yes' to preserve test tmp directories
44""" 45"""
45 46
46class main(unittest.main): 47class main(unittest.main):
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):
360 360
361 def tearDown(self): 361 def tearDown(self):
362 os.chdir(self.origdir) 362 os.chdir(self.origdir)
363 bb.utils.prunedir(self.tempdir) 363 if os.environ.get("BB_TMPDIR_NOCLEAN") == "yes":
364 print("Not cleaning up %s. Please remove manually." % self.tempdir)
365 else:
366 bb.utils.prunedir(self.tempdir)
364 367
365class MirrorUriTest(FetcherTest): 368class MirrorUriTest(FetcherTest):
366 369