Skip to content
Snippets Groups Projects
Commit 6ce14799 authored by Sjoerd Simons's avatar Sjoerd Simons Committed by Sebastian Reichel
Browse files

[NOUPSTREAM] Add minimal lava tests


After each kernel build run a basic lava boot tests as well

Signed-off-by: default avatarSjoerd Simons <sjoerd@collabora.com>
parent 82a5a197
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,9 @@ default:
stages:
- build
- test
- generate
- lava
.build debian package:
stage: build
......@@ -41,7 +44,6 @@ stages:
- ccache -s
script:
- make $DEFCONFIG
- make -j$(nproc) $ADDITIONAL_BUILD_CMD bindeb-pkg
- mkdir artifacts && dcmd mv ../*.changes artifacts/
artifacts:
......@@ -54,3 +56,43 @@ build arm64 debian package:
ARCH: arm64
CROSS_COMPILE: aarch64-linux-gnu-
ADDITIONAL_BUILD_CMD: KBUILD_IMAGE=arch/arm64/boot/Image
generate tests:
image: debian:bookworm-slim
stage: generate
tags:
- lightweight
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "1"
needs:
- "build arm64 debian package"
script:
- mkdir deb
- "for x in artifacts/linux-image*.deb ; do dpkg -x ${x} deb ; done"
- cp deb/boot/vmlinuz* vmlinuz
- tar -f modules.tar.gz -C deb -c -z -v lib/modules
- mkdir dtbs
- cp -r deb/usr/lib/linux-image*/* dtbs
- sed -i s,%%KERNEL_BUILD_JOB%%,${CI_JOB_ID},g lava/testjob.yaml
artifacts:
paths:
- vmlinuz*
- modules.tar.gz
- dtbs
- lava/testjob.yaml
lava test:
stage: lava
tags:
- lava-runner
script:
- submit lava/testjob.yaml
needs:
- "generate tests"
artifacts:
when: always
paths:
- "*"
reports:
junit: "*.xml"
device_type: rk3588-rock-5b
job_name: Hardware enablement tests {{job.CI_JOB_ID}}
timeouts:
job:
minutes: 15
action:
minutes: 5
priority: high
visibility: public
actions:
- deploy:
timeout:
minutes: 2
to: tftp
kernel:
url: "{{job.CI_PROJECT_URL}}/-/jobs/%%KERNEL_BUILD_JOB%%/artifacts/raw/vmlinuz"
type: image
modules:
url: "{{job.CI_PROJECT_URL}}/-/jobs/%%KERNEL_BUILD_JOB%%/artifacts/raw/modules.tar.gz"
compression: gz
dtb:
url: "{{job.CI_PROJECT_URL}}/-/jobs/%%KERNEL_BUILD_JOB%%/artifacts/raw/dtbs/rockchip/rk3588-rock-5b.dtb"
ramdisk:
url: https://gitlab.collabora.com/lava/health-check-images/-/jobs/artifacts/main/raw/bullseye/bullseye-rootfs-arm64-initramfs.gz?job=build+bullseye+image:+%5Barm64,+rootfs%5D
compression: gz
nfsrootfs:
url: https://gitlab.collabora.com/lava/health-check-images/-/jobs/artifacts/main/raw/bullseye/bullseye-rootfs-arm64.tar.gz?job=build+bullseye+image:+%5Barm64,+rootfs%5D
compression: gz
- boot:
method: u-boot
commands: nfs
timeout:
minutes: 10
auto_login:
login_prompt: 'login:'
username: user
password_prompt: 'Password:'
password: user
login_commands:
- sudo su
- env
- systemctl --failed
prompts:
- 'user@health(.*)$'
- 'root@health(.*)#'
- test:
timeout:
minutes: 1
definitions:
- repository:
metadata:
format: Lava-Test Test Definition 1.0
name: health
description: "health check"
os:
- apertis
scope:
- functional
environment:
- lava-test-shell
run:
steps:
- ip a s
from: inline
name: network
path: inline/health.yaml
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