diff options
| author | Alexander Kanavin <alex@linutronix.de> | 2025-10-02 12:09:26 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-04 15:16:03 +0100 |
| commit | f7e90d293ce3c5c6f7f859ec3299fdb86d1abb4f (patch) | |
| tree | 2bd8171e702ae23553673132963ba9e1cca9f86a | |
| parent | 043da6bc1c39527d46c91cf15c6e8026a4a799c7 (diff) | |
| download | poky-f7e90d293ce3c5c6f7f859ec3299fdb86d1abb4f.tar.gz | |
bitbake: lib/bb/tests/setup.py: unset BBPATH to ensure isolation from the existing bitbake environment
bitbake-setup deduces top directory from BBPATH, which, if set, interferes with
the tests' own setup.
(Bitbake rev: ca21545bb847138d75d985d6d7eb0dc9b14550be)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | bitbake/lib/bb/tests/setup.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/setup.py b/bitbake/lib/bb/tests/setup.py index c77e750db7..2076613d9b 100644 --- a/bitbake/lib/bb/tests/setup.py +++ b/bitbake/lib/bb/tests/setup.py | |||
| @@ -181,6 +181,11 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 181 | 181 | ||
| 182 | 182 | ||
| 183 | def test_setup(self): | 183 | def test_setup(self): |
| 184 | # unset BBPATH to ensure tests run in isolation from the existing bitbake environment | ||
| 185 | import os | ||
| 186 | if 'BBPATH' in os.environ: | ||
| 187 | del os.environ['BBPATH'] | ||
| 188 | |||
| 184 | # check that no arguments works | 189 | # check that no arguments works |
| 185 | self.runbbsetup("") | 190 | self.runbbsetup("") |
| 186 | 191 | ||
