@@ -140,3 +140,15 @@ class BitbakeLayers(OESelftestTestCase):
def test_validate_examplelayersjson(self):
json = os.path.join(get_bb_var('COREBASE'), "meta/files/layers.example.json")
self.validate_layersjson(json)
+
+ def test_bitbakelayers_setup(self):
+ result = runCmd('bitbake-layers create-layers-setup {}'.format(self.testlayer_path))
+ jsonfile = os.path.join(self.testlayer_path, "setup-layers.json")
+ self.validate_layersjson(jsonfile)
+
+ testcheckoutdir = os.path.join(self.builddir, 'test-layer-checkout')
+ result = runCmd('{}/setup-layers --destdir {}'.format(self.testlayer_path, testcheckoutdir))
+ # May not necessarily be named 'poky'
+ pokydir = os.listdir(testcheckoutdir)[0]
+ testcheckoutfile = os.path.join(testcheckoutdir, pokydir, "oe-init-build-env")
+ self.assertTrue(os.path.exists(testcheckoutfile), "File {} not found in test layer checkout".format(testcheckoutfile))
This does a basic run-through of the bitbake-layers plugin, and the resulting json layer config and the layer setup script that uses it. Only poky is actually fetched by the script. Signed-off-by: Alexander Kanavin <alex@linutronix.de> --- meta/lib/oeqa/selftest/cases/bblayers.py | 12 ++++++++++++ 1 file changed, 12 insertions(+)