@@ -146,6 +146,25 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"]))
"bb-layers": ["layerC","layerD/meta-layer"],
"bb-layers-file-relative": ["layerE/meta-layer"],
"oe-fragments": ["test-fragment-2"]
+ },
+ {
+ "name": "gizmo-fragments-one-of",
+ "description": "Gizmo configuration using oe-fragments-one-of, both formats",
+ "oe-template": "test-configuration-gizmo",
+ "oe-fragments-one-of": {
+ "fragment-desc": {
+ "description": "Test fragments (with description)",
+ "options" : [
+ { "name": "fragment-desc-1", "description": "fragment 1 desc" }
+ ]
+ },
+ "fragment-nodesc": {
+ "description": "Test fragments (no description)",
+ "options" : [
+ "fragment-nodesc-1"
+ ]
+ }
+ }
}
]
},
@@ -258,7 +277,7 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"]))
def get_setup_path(self, cf, c):
if c == 'gizmo':
return os.path.join(self.tempdir, 'bitbake-builds', 'this-is-a-custom-gizmo-build')
- return os.path.join(self.tempdir, 'bitbake-builds', '{}-{}'.format(cf, c))
+ return os.path.join(self.tempdir, 'bitbake-builds', '{}-{}'.format(cf, "-".join(c.split())))
def test_setup(self):
# unset BBPATH to ensure tests run in isolation from the existing bitbake environment
@@ -328,7 +347,9 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"]))
'buildconfigs':('gadget','gizmo',
'gizmo-env-passthrough',
'gizmo-no-fragment',
- 'gadget-notemplate','gizmo-notemplate')},
+ 'gadget-notemplate',
+ 'gizmo-notemplate',
+ 'gizmo-fragments-one-of fragment-desc-1 fragment-nodesc-1')},
'test-config-2': {'cmdline': os.path.join(self.registrypath,'config-2/test-config-2.conf.json'),
'buildconfigs': ('gadget','gizmo',
'gizmo-env-passthrough',
There were no tests of oe-fragments-one-of so add a new configuration for it, and test both formats for the options (with or without a description). Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- lib/bb/tests/setup.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-)