From 9f820ce0f4f5dbe059c95240d62ed3a72dfa0071 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 2 Oct 2025 12:09:26 +0200 Subject: [PATCH] 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: e974d42eb5229f755e14b46a00ad06b23b53e143) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- bitbake/lib/bb/tests/setup.py | 5 +++++ 1 file changed, 5 insertions(+) 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"])) def test_setup(self): + # unset BBPATH to ensure tests run in isolation from the existing bitbake environment + import os + if 'BBPATH' in os.environ: + del os.environ['BBPATH'] + # check that no arguments works self.runbbsetup("")