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 = """\ | |||
41 | Environment variables: | 41 | Environment 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 | ||
46 | class main(unittest.main): | 47 | 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): | |||
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 | ||
365 | class MirrorUriTest(FetcherTest): | 368 | class MirrorUriTest(FetcherTest): |
366 | 369 | ||