diff options
-rwxr-xr-x | bitbake/bin/bitbake-selftest | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 5 |
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 = """\ 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/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): |