summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/bblayers.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py
index c753a7b795..18007764b3 100644
--- a/meta/lib/oeqa/selftest/cases/bblayers.py
+++ b/meta/lib/oeqa/selftest/cases/bblayers.py
@@ -142,3 +142,25 @@ class BitbakeLayers(OESelftestTestCase):
142 def test_validate_examplelayersjson(self): 142 def test_validate_examplelayersjson(self):
143 json = os.path.join(get_bb_var('COREBASE'), "meta/files/layers.example.json") 143 json = os.path.join(get_bb_var('COREBASE'), "meta/files/layers.example.json")
144 self.validate_layersjson(json) 144 self.validate_layersjson(json)
145
146 def test_bitbakelayers_setup(self):
147 result = runCmd('bitbake-layers create-layers-setup {}'.format(self.testlayer_path))
148 jsonfile = os.path.join(self.testlayer_path, "setup-layers.json")
149 self.validate_layersjson(jsonfile)
150
151 # The revision-under-test may not necessarily be available on the remote server,
152 # so replace it with a stable release tag.
153 import json
154 with open(jsonfile) as f:
155 data = json.load(f)
156 for s in data['sources']:
157 data['sources'][s]['git-remote']['rev'] = 'yocto-4.0'
158 with open(jsonfile, 'w') as f:
159 json.dump(data, f)
160
161 testcheckoutdir = os.path.join(self.builddir, 'test-layer-checkout')
162 result = runCmd('{}/setup-layers --destdir {}'.format(self.testlayer_path, testcheckoutdir))
163 # May not necessarily be named 'poky' or 'openembedded-core'
164 oecoredir = os.listdir(testcheckoutdir)[0]
165 testcheckoutfile = os.path.join(testcheckoutdir, oecoredir, "oe-init-build-env")
166 self.assertTrue(os.path.exists(testcheckoutfile), "File {} not found in test layer checkout".format(testcheckoutfile))