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>
This commit is contained in:
Markus Lehtonen authored and Richard Purdie committed 2016-08-20 16:08:59 +01:00
1 parent 81697a8661
commit 9cce855f47
2 files changed
+5 -1

No files matched your search

+1
View File
@@ -41,6 +41,7 @@ ENV_HELP = """\
Environment variables:
BB_SKIP_NETTESTS set to 'yes' in order to skip tests using network
connection
BB_TMPDIR_NOCLEAN set to 'yes' to preserve test tmp directories
"""
class main(unittest.main):
+4 -1
View File
@@ -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):