From 98193f3b6167e07cbb794e96b80d78ca1779ea4f Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Fri, 8 Oct 2021 12:32:06 -0400 Subject: [PATCH] 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. Signed-off-by: Jon Mason --- .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 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 44f3cd1e..04e65ffe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/ci/microbit-v1.yml b/ci/microbit-v1.yml index d5e74531..4c0f4e19 100644 --- a/ci/microbit-v1.yml +++ b/ci/microbit-v1.yml @@ -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 diff --git a/ci/qemu-cortex-a53.yml b/ci/qemu-cortex-a53.yml index 296d8d52..fcecfc8b 100644 --- a/ci/qemu-cortex-a53.yml +++ b/ci/qemu-cortex-a53.yml @@ -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 diff --git a/ci/qemu-cortex-m3.yml b/ci/qemu-cortex-m3.yml new file mode 100644 index 00000000..9333db2e --- /dev/null +++ b/ci/qemu-cortex-m3.yml @@ -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 diff --git a/ci/testimage-zephyr.yml b/ci/testimage-zephyr.yml new file mode 100644 index 00000000..242320c8 --- /dev/null +++ b/ci/testimage-zephyr.yml @@ -0,0 +1,8 @@ +header: + version: 9 + +local_conf_header: + testimage: | + IMAGE_CLASSES += "testimage" + TEST_TARGET = "QemuTargetZephyr" + TEST_SUITES = "zephyr"