diff options
Diffstat (limited to 'bitbake/lib/bb/tests/setup.py')
| -rw-r--r-- | bitbake/lib/bb/tests/setup.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/bitbake/lib/bb/tests/setup.py b/bitbake/lib/bb/tests/setup.py index 2076613d9b..747a9b733f 100644 --- a/bitbake/lib/bb/tests/setup.py +++ b/bitbake/lib/bb/tests/setup.py | |||
| @@ -130,6 +130,12 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 130 | "description": "Gizmo notemplate build configuration", | 130 | "description": "Gizmo notemplate build configuration", |
| 131 | "bb-layers": ["layerC","layerD/meta-layer"], | 131 | "bb-layers": ["layerC","layerD/meta-layer"], |
| 132 | "oe-fragments": ["test-fragment-2"] | 132 | "oe-fragments": ["test-fragment-2"] |
| 133 | }, | ||
| 134 | { | ||
| 135 | "name": "gizmo-notemplate-with-thisdir", | ||
| 136 | "description": "Gizmo notemplate build configuration using THISDIR", | ||
| 137 | "bb-layers": ["layerC","layerD/meta-layer","{THISDIR}/layerE/meta-layer"], | ||
| 138 | "oe-fragments": ["test-fragment-2"] | ||
| 133 | } | 139 | } |
| 134 | ] | 140 | ] |
| 135 | }, | 141 | }, |
| @@ -174,7 +180,14 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 174 | with open(os.path.join(bb_conf_path, 'bblayers.conf')) as f: | 180 | with open(os.path.join(bb_conf_path, 'bblayers.conf')) as f: |
| 175 | bblayers = f.read() | 181 | bblayers = f.read() |
| 176 | for l in bitbake_config["bb-layers"]: | 182 | for l in bitbake_config["bb-layers"]: |
| 177 | self.assertIn(os.path.join(buildpath, 'layers', l), bblayers) | 183 | if l.startswith('{THISDIR}/'): |
| 184 | thisdir_layer = os.path.join( | ||
| 185 | os.path.dirname(json_config["path"]), | ||
| 186 | l.removeprefix("{THISDIR}/"), | ||
| 187 | ) | ||
| 188 | self.assertIn(thisdir_layer, bblayers) | ||
| 189 | else: | ||
| 190 | self.assertIn(os.path.join(buildpath, "layers", l), bblayers) | ||
| 178 | 191 | ||
| 179 | for f in bitbake_config["oe-fragments"]: | 192 | for f in bitbake_config["oe-fragments"]: |
| 180 | self.assertTrue(os.path.exists(os.path.join(bb_conf_path, f))) | 193 | self.assertTrue(os.path.exists(os.path.join(bb_conf_path, f))) |
| @@ -235,7 +248,7 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 235 | 248 | ||
| 236 | # test-config-1 is tested as a registry config, test-config-2 as a local file | 249 | # test-config-1 is tested as a registry config, test-config-2 as a local file |
| 237 | test_configurations = {'test-config-1': {'cmdline': 'test-config-1', 'buildconfigs':('gadget','gizmo','gadget-notemplate','gizmo-notemplate')}, | 250 | test_configurations = {'test-config-1': {'cmdline': 'test-config-1', 'buildconfigs':('gadget','gizmo','gadget-notemplate','gizmo-notemplate')}, |
| 238 | 'test-config-2': {'cmdline': os.path.join(self.registrypath,'config-2/test-config-2.conf.json'), 'buildconfigs': ('gadget','gizmo','gadget-notemplate','gizmo-notemplate') } } | 251 | 'test-config-2': {'cmdline': os.path.join(self.registrypath,'config-2/test-config-2.conf.json'), 'buildconfigs': ('gadget','gizmo','gadget-notemplate','gizmo-notemplate', 'gizmo-notemplate-with-thisdir') } } |
| 239 | for cf, v in test_configurations.items(): | 252 | for cf, v in test_configurations.items(): |
| 240 | for c in v['buildconfigs']: | 253 | for c in v['buildconfigs']: |
| 241 | out = self.runbbsetup("init --non-interactive {} {}".format(v['cmdline'], c)) | 254 | out = self.runbbsetup("init --non-interactive {} {}".format(v['cmdline'], c)) |
