Skip to content
Snippets Groups Projects
Commit b0793e7d authored by Chase Qi's avatar Chase Qi
Browse files

ci: enable LAVA boot and smoke tests on qemu devices for new MRs


Given test scope for new MRs is not defined yet and we only have one
rpi4, b68 and c61 in the warsaw lab which are occupied mostly by daily
scheduled pipeline, starting with boot and smoke tests on qemu devices
should be a good starting point for per MR testing.

Jobs that extend `.lava-test` will be added to MR's pipeline and
schedueld pipeline.

`.lava-test-scheduled` extends `.lava-test` with new scheduled pipeline
only rule. Long run jobs like ltp should extends the job so that they
wouldn't prevent MRs from merging.

Solves #486.

Signed-off-by: default avatarChase Qi <chase.qi@linaro.org>
parent 8aa75e80
No related branches found
No related tags found
1 merge request!148ci: enable LAVA boot and smoke tests on qemu devices for new MRs
...@@ -198,20 +198,14 @@ publish-seco-intel-b68: ...@@ -198,20 +198,14 @@ publish-seco-intel-b68:
# Run the build for scheduled pipelines. # Run the build for scheduled pipelines.
- if: '$CI_PIPELINE_SOURCE == "schedule"' - if: '$CI_PIPELINE_SOURCE == "schedule"'
# Mimic the updated rules for lava-test from the bitbake-workspace. .lava-test-scheduled:
.lava-test: extends: .lava-test
rules: variables:
- if: '$CI_LAVA_TOKEN == null' CI_SQUAD_PROJECT_NAME: "oniro"
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
# Mimic the updated rules for lava-report from the bitbake-workspace.
.lava-report:
rules: rules:
- if: '$CI_LAVA_TOKEN == null' - if: '$CI_SQUAD_TOKEN == null'
when: never when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"' - if: '$CI_PIPELINE_SOURCE == "schedule"'
when: manual
## ##
## Submit jobs to LAVA ## Submit jobs to LAVA
...@@ -239,7 +233,7 @@ lava-qemu-x86_64: ...@@ -239,7 +233,7 @@ lava-qemu-x86_64:
lava-raspberrypi4-64: lava-raspberrypi4-64:
needs: [linux-raspberrypi4-64-gcc] needs: [linux-raspberrypi4-64-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: raspberrypi4-64 MACHINE: raspberrypi4-64
CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc
...@@ -249,7 +243,7 @@ lava-raspberrypi4-64: ...@@ -249,7 +243,7 @@ lava-raspberrypi4-64:
lava-seco-intel-b68: lava-seco-intel-b68:
needs: [linux-seco-intel-b68-gcc] needs: [linux-seco-intel-b68-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: seco-intel-b68 MACHINE: seco-intel-b68
CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc
...@@ -259,7 +253,7 @@ lava-seco-intel-b68: ...@@ -259,7 +253,7 @@ lava-seco-intel-b68:
lava-seco-c61: lava-seco-c61:
needs: [linux-seco-imx8mm-c61-4gb-gcc] needs: [linux-seco-imx8mm-c61-4gb-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: seco-imx8mm-c61-4gb MACHINE: seco-imx8mm-c61-4gb
CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc
...@@ -269,7 +263,7 @@ lava-seco-c61: ...@@ -269,7 +263,7 @@ lava-seco-c61:
lava-qemu-x86-ltp: lava-qemu-x86-ltp:
needs: [linux-qemu-x86-gcc] needs: [linux-qemu-x86-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: qemux86 MACHINE: qemux86
CI_BUILD_JOB_NAME: linux-qemu-x86-gcc CI_BUILD_JOB_NAME: linux-qemu-x86-gcc
...@@ -279,7 +273,7 @@ lava-qemu-x86-ltp: ...@@ -279,7 +273,7 @@ lava-qemu-x86-ltp:
lava-qemu-x86_64-ltp: lava-qemu-x86_64-ltp:
needs: [linux-qemu-x86_64-gcc] needs: [linux-qemu-x86_64-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: qemux86-64 MACHINE: qemux86-64
CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc
...@@ -289,7 +283,7 @@ lava-qemu-x86_64-ltp: ...@@ -289,7 +283,7 @@ lava-qemu-x86_64-ltp:
lava-raspberrypi4-64-ltp: lava-raspberrypi4-64-ltp:
needs: [linux-raspberrypi4-64-gcc] needs: [linux-raspberrypi4-64-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: raspberrypi4-64 MACHINE: raspberrypi4-64
CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc
...@@ -299,7 +293,7 @@ lava-raspberrypi4-64-ltp: ...@@ -299,7 +293,7 @@ lava-raspberrypi4-64-ltp:
lava-seco-intel-b68-ltp: lava-seco-intel-b68-ltp:
needs: [linux-seco-intel-b68-gcc] needs: [linux-seco-intel-b68-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: seco-intel-b68 MACHINE: seco-intel-b68
CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc
...@@ -309,7 +303,7 @@ lava-seco-intel-b68-ltp: ...@@ -309,7 +303,7 @@ lava-seco-intel-b68-ltp:
lava-seco-c61-ltp: lava-seco-c61-ltp:
needs: [linux-seco-imx8mm-c61-4gb-gcc] needs: [linux-seco-imx8mm-c61-4gb-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: seco-imx8mm-c61-4gb MACHINE: seco-imx8mm-c61-4gb
CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc
...@@ -319,7 +313,7 @@ lava-seco-c61-ltp: ...@@ -319,7 +313,7 @@ lava-seco-c61-ltp:
lava-qemu-x86_64-kselftest: lava-qemu-x86_64-kselftest:
needs: [linux-qemu-x86_64-gcc] needs: [linux-qemu-x86_64-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: qemux86-64 MACHINE: qemux86-64
CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc
...@@ -329,7 +323,7 @@ lava-qemu-x86_64-kselftest: ...@@ -329,7 +323,7 @@ lava-qemu-x86_64-kselftest:
lava-raspberrypi4-64-kselftest: lava-raspberrypi4-64-kselftest:
needs: [linux-raspberrypi4-64-gcc] needs: [linux-raspberrypi4-64-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: raspberrypi4-64 MACHINE: raspberrypi4-64
CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc
...@@ -339,7 +333,7 @@ lava-raspberrypi4-64-kselftest: ...@@ -339,7 +333,7 @@ lava-raspberrypi4-64-kselftest:
lava-seco-c61-kselftest: lava-seco-c61-kselftest:
needs: [linux-seco-imx8mm-c61-4gb-gcc] needs: [linux-seco-imx8mm-c61-4gb-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: seco-imx8mm-c61-4gb MACHINE: seco-imx8mm-c61-4gb
CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc
...@@ -349,7 +343,7 @@ lava-seco-c61-kselftest: ...@@ -349,7 +343,7 @@ lava-seco-c61-kselftest:
lava-zephyr-96b-nitrogen-twister: lava-zephyr-96b-nitrogen-twister:
needs: [zephyr-96b-nitrogen-twister-gcc] needs: [zephyr-96b-nitrogen-twister-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: 96b-nitrogen MACHINE: 96b-nitrogen
CI_BUILD_JOB_NAME: zephyr-96b-nitrogen-twister-gcc CI_BUILD_JOB_NAME: zephyr-96b-nitrogen-twister-gcc
...@@ -359,7 +353,7 @@ lava-zephyr-96b-nitrogen-twister: ...@@ -359,7 +353,7 @@ lava-zephyr-96b-nitrogen-twister:
lava-qemu-x86-perf: lava-qemu-x86-perf:
needs: [linux-qemu-x86-gcc] needs: [linux-qemu-x86-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: qemux86 MACHINE: qemux86
CI_BUILD_JOB_NAME: linux-qemu-x86-gcc CI_BUILD_JOB_NAME: linux-qemu-x86-gcc
...@@ -369,7 +363,7 @@ lava-qemu-x86-perf: ...@@ -369,7 +363,7 @@ lava-qemu-x86-perf:
lava-qemu-x86_64-perf: lava-qemu-x86_64-perf:
needs: [linux-qemu-x86_64-gcc] needs: [linux-qemu-x86_64-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: qemux86-64 MACHINE: qemux86-64
CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc
...@@ -379,7 +373,7 @@ lava-qemu-x86_64-perf: ...@@ -379,7 +373,7 @@ lava-qemu-x86_64-perf:
lava-raspberrypi4-64-perf: lava-raspberrypi4-64-perf:
needs: [linux-raspberrypi4-64-gcc] needs: [linux-raspberrypi4-64-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: raspberrypi4-64 MACHINE: raspberrypi4-64
CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc
...@@ -389,7 +383,7 @@ lava-raspberrypi4-64-perf: ...@@ -389,7 +383,7 @@ lava-raspberrypi4-64-perf:
lava-seco-intel-b68-perf: lava-seco-intel-b68-perf:
needs: [linux-seco-intel-b68-gcc] needs: [linux-seco-intel-b68-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: seco-intel-b68 MACHINE: seco-intel-b68
CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc
...@@ -399,7 +393,7 @@ lava-seco-intel-b68-perf: ...@@ -399,7 +393,7 @@ lava-seco-intel-b68-perf:
lava-seco-c61-perf: lava-seco-c61-perf:
needs: [linux-seco-imx8mm-c61-4gb-gcc] needs: [linux-seco-imx8mm-c61-4gb-gcc]
stage: test stage: test
extends: .lava-test extends: .lava-test-scheduled
variables: variables:
MACHINE: seco-imx8mm-c61-4gb MACHINE: seco-imx8mm-c61-4gb
CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc
...@@ -427,29 +421,12 @@ lava-zephyr-qemu-x86: ...@@ -427,29 +421,12 @@ lava-zephyr-qemu-x86:
CI_REPORT_JOB_NAME: lava-report CI_REPORT_JOB_NAME: lava-report
lava-report: lava-report:
extends: .lava-report
needs: needs:
- lava-qemu-x86 - lava-qemu-x86
- lava-qemu-x86_64 - lava-qemu-x86_64
- lava-raspberrypi4-64
- lava-seco-intel-b68
- lava-seco-c61
- lava-qemu-x86-ltp
- lava-qemu-x86_64-ltp
- lava-raspberrypi4-64-ltp
- lava-seco-intel-b68-ltp
- lava-seco-c61-ltp
- lava-qemu-x86-perf
- lava-qemu-x86_64-perf
- lava-raspberrypi4-64-perf
- lava-seco-intel-b68-perf
- lava-seco-c61-perf
- lava-zephyr-96b-nitrogen-twister
- lava-zephyr-qemu-cortex-m3 - lava-zephyr-qemu-cortex-m3
- lava-zephyr-qemu-x86 - lava-zephyr-qemu-x86
- lava-qemu-x86_64-kselftest
- lava-raspberrypi4-64-kselftest
- lava-seco-c61-kselftest
extends: .lava-report
lava-badge: lava-badge:
needs: [lava-report] needs: [lava-report]
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
GIT_STRATEGY: none GIT_STRATEGY: none
CI_LAVA_INSTANCE: "https://lava.ostc-eu.org/" CI_LAVA_INSTANCE: "https://lava.ostc-eu.org/"
CI_SQUAD_INSTANCE: "https://squadp.svc.ostc-eu.dev" CI_SQUAD_INSTANCE: "https://squadp.svc.ostc-eu.dev"
CI_SQUAD_PROJECT_NAME: "oniro-test-mr"
# Run the same ltp test suites that using by LKFT project. # Run the same ltp test suites that using by LKFT project.
# Reference: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.98-75-g9f5cb871ceb9/testjobs/ # Reference: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.98-75-g9f5cb871ceb9/testjobs/
LTP_TST_CMDFILES: "cap_bounds cpuhotplug crypto nptl pty securebits fs controllers hugetlb mm tracing containers io dio syscalls math commands ipc fcntl-locktests filecaps fs_bind fs_perms_simple fsx sched cve" LTP_TST_CMDFILES: "cap_bounds cpuhotplug crypto nptl pty securebits fs controllers hugetlb mm tracing containers io dio syscalls math commands ipc fcntl-locktests filecaps fs_bind fs_perms_simple fsx sched cve"
...@@ -71,8 +72,8 @@ ...@@ -71,8 +72,8 @@
# Submit the jobs to SQUAD. # Submit the jobs to SQUAD.
- | - |
for job_def in $(find lava_jobs/ -name "*.yaml"); do for job_def in $(find lava_jobs/ -name "*.yaml"); do
echo $CI_SQUAD_INSTANCE/api/submitjob/oniro-core/$CI_PROJECT_NAME/$CI_PIPELINE_ID/$MACHINE --header "Auth-Token: $CI_SQUAD_TOKEN" --form "backend=oniro_lava" --form "definition=@${job_def}" echo $CI_SQUAD_INSTANCE/api/submitjob/oniro-core/$CI_SQUAD_PROJECT_NAME/$CI_PIPELINE_ID/$MACHINE --header "Auth-Token: $CI_SQUAD_TOKEN" --form "backend=oniro_lava" --form "definition=@${job_def}"
curl $CI_SQUAD_INSTANCE/api/submitjob/oniro-core/$CI_PROJECT_NAME/$CI_PIPELINE_ID/$MACHINE --header "Auth-Token: $CI_SQUAD_TOKEN" --form "backend=oniro_lava" --form "definition=@${job_def}" curl $CI_SQUAD_INSTANCE/api/submitjob/oniro-core/$CI_SQUAD_PROJECT_NAME/$CI_PIPELINE_ID/$MACHINE --header "Auth-Token: $CI_SQUAD_TOKEN" --form "backend=oniro_lava" --form "definition=@${job_def}"
done done
# Attach a callback to this build to trigger the lava-report job # Attach a callback to this build to trigger the lava-report job
squad_build_id="$(curl --silent "$CI_SQUAD_INSTANCE/api/builds/?version=$CI_PIPELINE_ID" | jq -r '.results[0].id')" squad_build_id="$(curl --silent "$CI_SQUAD_INSTANCE/api/builds/?version=$CI_PIPELINE_ID" | jq -r '.results[0].id')"
...@@ -81,6 +82,8 @@ ...@@ -81,6 +82,8 @@
paths: paths:
- lava_jobs/*.yaml - lava_jobs/*.yaml
rules: rules:
- if: '$CI_SQUAD_TOKEN == null'
when: never
# Run the build when it is scheduled. # Run the build when it is scheduled.
- if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_PIPELINE_SOURCE == "schedule"
# Do not run pipelines for draft merge requests unless manually triggered. # Do not run pipelines for draft merge requests unless manually triggered.
...@@ -113,6 +116,8 @@ ...@@ -113,6 +116,8 @@
fi fi
rules: rules:
- if: '$CI_SQUAD_TOKEN == null'
when: never
# Run the build when it is scheduled. # Run the build when it is scheduled.
- if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_PIPELINE_SOURCE == "schedule"
when: manual when: manual
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment