diff mbox series

[4/9] tests/setup: fix dead check_setupdir_files guards

Message ID 20260322193440.870120-5-adrian.freihofer@siemens.com
State New
Headers show
Series bitbake-setup: improvements, VSCode workspace generation | expand

Commit Message

AdrianF March 22, 2026, 7:34 p.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

Two conditions in check_setupdir_files used wrong key names and
so never triggered:

- 'oe-fragment' -> 'oe-fragments' (plural): fragment-existence
  assertions were never reached for any variant that has fragments.

- 'bb-environment-passthrough' -> 'bb-env-passthrough-additions':
  BB_ENV_PASSTHROUGH_ADDITIONS assertions were never reached for
  the gizmo-env-passthrough variant.

Also drop the redundant .keys() call on both guards.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 lib/bb/tests/setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/tests/setup.py b/lib/bb/tests/setup.py
index d52a81395..1af3d8b50 100644
--- a/lib/bb/tests/setup.py
+++ b/lib/bb/tests/setup.py
@@ -260,11 +260,11 @@  print("BBPATH is {{}}".format(os.environ["BBPATH"]))
                         )
                     self.assertIn(filerelative_layer, bblayers)
 
-        if 'oe-fragment' in bitbake_config.keys():
+        if 'oe-fragments' in bitbake_config:
             for f in bitbake_config["oe-fragments"]:
                 self.assertTrue(os.path.exists(os.path.join(bb_conf_path, f)))
 
-        if 'bb-environment-passthrough' in bitbake_config.keys():
+        if 'bb-env-passthrough-additions' in bitbake_config:
             with open(os.path.join(bb_build_path, 'init-build-env'), 'r') as f:
                 init_build_env = f.read()
             self.assertTrue('BB_ENV_PASSTHROUGH_ADDITIONS' in init_build_env)