Skip to contentSkip to conversation

CI: update for meta-zephyr changes

PATCH Applied Ross Burton 4 participants 5 messages Jan 24, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 CI: update for meta-zephyr changes

As of meta-zephyr dde88ba the layer is structured different, split into meta-zephyr-core and meta-zephyr-bsp.

As we define our own machines for use with Zephyr, we can just use meta-zephyr-core.

---
 ci/meta-zephyr.yml    | 3 ++-
 ci/qemu-cortex-m3.yml | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
ci/meta-zephyr.yml +2 -1
index 2f23f2bc..20d54649 100644
@@ -6,4 +6,5 @@ header:
 repos:
   meta-zephyr:
     url: https://git.yoctoproject.org/git/meta-zephyr
-    refspec: master
+    layers:
+      meta-zephyr-core:
ci/qemu-cortex-m3.yml +5 -0
index ab6d5c73..d9b197cb 100644
@@ -4,6 +4,11 @@ header:
     - ci/base.yml
     - ci/meta-zephyr.yml
 
+repos:
+  meta-zephyr:
+    layers:
+      meta-zephyr-bsp:
+
 local_conf_header:
   tclibc: |
     TCLIBC = "newlib"
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 CI: fix check-layer indeterminism

yocto-check-layers is very greedy when searching for layers, and will find the test layers in Bitbake if given the chance, for example:

bitbake/lib/layerindexlib/tests/testdata/layer4

This layer has the collection name openembedded-layer and is only compatible with Sumo. The selection of layer from collection name is not deterministic, so it's possible that this layer is selected which then fails the check as it isn't compatible.

Solve this by restricting the dependency layers in meta-arm to just meta-arm/meta-*, so it doesn't recurse into meta-arm/work/poky/bitbake.

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
index 9a60f672..4c5d74e9 100644
@@ -79,7 +79,7 @@ check-layers:
   extends: .setup
   script:
     - kas shell --update --force-checkout ci/base.yml:ci/meta-openembedded.yml --command \
-      "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
+      "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
   parallel:
     matrix:
       - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5]
Signature · 1 line
2.25.1
#2 lore raw

Re: [meta-arm] [PATCH 2/2] CI: fix check-layer indeterminism

Quoted 5 lines · Ross Burton

yocto-check-layers is very greedy when searching for layers, and will find the test layers in Bitbake if given the chance, for example:

bitbake/lib/layerindexlib/tests/testdata/layer4

Quoted 7 lines

This layer has the collection name openembedded-layer and is only compatible with Sumo. The selection of layer from collection name is not deterministic, so it's possible that this layer is selected which then fails the check as it isn't compatible.

Solve this by restricting the dependency layers in meta-arm to just meta-arm/meta-*, so it doesn't recurse into meta-arm/work/poky/bitbake.

FWIW, I've fallen into this trap before - should this Sumo remnant be removed from Bitbake then?

Quoted 21 lines
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
index 9a60f672..4c5d74e9 100644
@@ -79,7 +79,7 @@ check-layers:
   extends: .setup
   script:
     - kas shell --update --force-checkout ci/base.yml:ci/meta-openembedded.yml --command \
-      "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
+      "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
   parallel:
     matrix:
       - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5]
Signature · 1 line
2.25.1
Signature · 4 lines
Regards,
Denys Dmytriyenko <[email protected]>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964
#3 lore raw

Re: [meta-arm] [PATCH 2/2] CI: fix check-layer indeterminism

Quoted 2 lines · Denys Dmytriyenko

FWIW, I've fallen into this trap before - should this Sumo remnant be removed from Bitbake then?

No, the layer shouldn't be found in the first place. I'm adding a check to the tool so that if the layer searching goes a bit haywire and finds these it aborts early instead of giving weird failures.

Ross

Applied
#4 lore raw
In reply to Ross Burton
Quoted 5 lines · Ross Burton

As of meta-zephyr dde88ba the layer is structured different, split into meta-zephyr-core and meta-zephyr-bsp.

As we define our own machines for use with Zephyr, we can just use meta-zephyr-core.

Applied, thanks!

[1/2] CI: update for meta-zephyr changes

      commit: 710cf290b572ff75d577e587e9b6cfaa0917269f
[2/2] CI: fix check-layer indeterminism
      commit: d2c5a5d289bf89eb58fa565a0836d899df2bf8bc

Best regards,

Signature · 1 line
Jon Mason <[email protected]>