[oe-commits] [bitbake] 03/09: bitbake-selftest: introduce BB_TMPDIR_NOCLEAN
git at git.openembedded.org
git at git.openembedded.org
Fri Aug 19 15:51:55 UTC 2016
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 04132b261df9def3a0cff14c93c29b26ff906e8b
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Thu Aug 18 19:55:53 2016 +0300
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.
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
bin/bitbake-selftest | 1 +
lib/bb/tests/fetch.py | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/bin/bitbake-selftest b/bin/bitbake-selftest
index 25905d7..1e00e33 100755
--- a/bin/bitbake-selftest
+++ b/bin/bitbake-selftest
@@ -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):
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index 272078f..e8c416a 100644
--- a/lib/bb/tests/fetch.py
+++ b/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):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list