Skip to contentSkip to conversation

CI: Add zephyr testimage

PATCH New Jon Mason 1 participant 1 message Oct 8, 2021

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/1 CI: Add zephyr testimage

Add the ability to run testimage against zephyr machines. Unfortunately, this exposes a bug in meta-zephyr with TESTIMAGE_AUTO not working correctly. So, work around this until it can be fixed upstream. Also, qemu-cortex-a53 does not successfully pass any of the tests it successfully builds. So, don't run testimage until that can be addressed.

---
 .gitlab-ci.yml          | 18 ++++++++++++++++--
 ci/microbit-v1.yml      |  8 +++++++-
 ci/qemu-cortex-a53.yml  |  6 +++++-
 ci/qemu-cortex-m3.yml   | 16 ++++++++++++++++
 ci/testimage-zephyr.yml |  8 ++++++++
 5 files changed, 52 insertions(+), 4 deletions(-)
 create mode 100644 ci/qemu-cortex-m3.yml
 create mode 100644 ci/testimage-zephyr.yml
.gitlab-ci.yml +16 -2
index 44f3cd1..04e65ff 100644
@@ -37,6 +37,17 @@ stages:
     - kas build $KASFILES
     - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
 
+# Workaround for Zephyr not currectly handling TESTIMAGE_AUTO
+.build_and_test:
+  extends: .setup
+  script:
+    - KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
+    - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
+    - kas build $KASFILES
+    - kas build $KASFILES -c testimage
+    - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
+
+
 #
 # Prep stage, update repositories once
 #
@@ -130,8 +141,8 @@ juno:
 juno/clang:
   extends: .build
 
-microbit-v1:
-  extends: .build
+microbit-v1/testimage-zephyr:
+  extends: .build_and_test
 
 musca-b1:
   extends: .build
@@ -148,6 +159,9 @@ n1sdp/armgcc:
 qemu-cortex-a53:
   extends: .build
 
+qemu-cortex-m3/testimage-zephyr:
+  extends: .build_and_test
+
 qemu-cortex-r5:
   extends: .build
 
ci/microbit-v1.yml +7 -1
index d5e7453..4c0f4e1 100644
@@ -4,7 +4,13 @@ header:
     - base.yml
     - meta-zephyr.yml
 
+local_conf_header:
+  nonbuilding_tests: |
+    ZEPHYRTESTS:remove = "common"
+  failing_tests: |
+    ZEPHYRTESTS:remove = "context early_sleep sleep"
+
 machine: microbit-v1
 
 target:
-  - zephyr-philosophers
+  - zephyr-kernel-test-all
ci/qemu-cortex-a53.yml +5 -1
index 296d8d5..fcecfc8 100644
@@ -4,7 +4,11 @@ header:
     - base.yml
     - meta-zephyr.yml
 
+local_conf_header:
+  nonbuilding_tests: |
+    ZEPHYRTESTS:remove += "common device poll queue sleep"
+
 machine: qemu-cortex-a53
 
 target:
-  - zephyr-philosophers
+  - zephyr-kernel-test-all
ci/qemu-cortex-m3.yml new file +16 -0
new file mode 100644
index 0000000..9333db2
@@ -0,0 +1,16 @@
+header:
+  version: 9
+  includes:
+    - base.yml
+    - meta-zephyr.yml
+
+local_conf_header:
+  tclibc: |
+    TCLIBC = "newlib"
+  nonbuilding_tests: |
+    ZEPHYRTESTS:remove = "common context pending poll sleep"
+
+machine: qemu-cortex-m3
+
+target:
+  - zephyr-kernel-test-all
ci/testimage-zephyr.yml new file +8 -0
new file mode 100644
index 0000000..242320c
@@ -0,0 +1,8 @@
+header:
+  version: 9
+
+local_conf_header:
+  testimage: |
+    IMAGE_CLASSES += "testimage"
+    TEST_TARGET = "QemuTargetZephyr"
+    TEST_SUITES = "zephyr"
Signature · 1 line
2.17.1