mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-01-12 03:10:15 +00:00
CI: add testing and testimage
Add a testing task to the gitlab CI and run testimage in that job. Currently, it only runs against some of the qemu based machines. Using slirp, there is no need for a privileged container or tun/tap devices. Change-Id: Ia85a3d0089f7d4dc7595c3a45d328c79d8e675f1 Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -5,6 +5,7 @@ stages:
|
||||
- prep
|
||||
- bootstrap
|
||||
- build
|
||||
- test
|
||||
|
||||
# Common job fragment to get a worker ready
|
||||
.setup:
|
||||
@@ -16,6 +17,7 @@ stages:
|
||||
DL_DIR: $CI_BUILDS_DIR/persist/downloads
|
||||
BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
|
||||
TOOLCHAIN_DIR: $CI_BUILDS_DIR/persist/toolchains
|
||||
IMAGE_DIR: $CI_PROJECT_DIR/work/build/tmp/deploy/images
|
||||
before_script:
|
||||
- echo KAS_WORK_DIR = $KAS_WORK_DIR
|
||||
- echo SSTATE_DIR = $SSTATE_DIR
|
||||
@@ -27,10 +29,29 @@ stages:
|
||||
.build:
|
||||
extends: .setup
|
||||
script:
|
||||
- KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
|
||||
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
|
||||
- kas build $KASFILES
|
||||
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
|
||||
- KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
|
||||
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
|
||||
- kas build $KASFILES
|
||||
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
|
||||
|
||||
.build_artifacts:
|
||||
artifacts:
|
||||
paths:
|
||||
- $IMAGE_DIR/*
|
||||
expire_in: 1 day
|
||||
|
||||
.test:
|
||||
extends: .setup
|
||||
stage: test
|
||||
# Unique before_script here to avoid the rm from the one in .setup
|
||||
before_script:
|
||||
- mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR
|
||||
script:
|
||||
- KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
|
||||
# These are needed to avoid warnings about file permissions from the artifacts
|
||||
- sudo chown -R builder $KAS_WORK_DIR
|
||||
- sudo chgrp -R builder $KAS_WORK_DIR
|
||||
- kas build $KASFILES -c testimage
|
||||
|
||||
|
||||
#
|
||||
@@ -137,25 +158,39 @@ qemu-cortex-a53:
|
||||
extends: .build
|
||||
|
||||
qemuarm:
|
||||
extends: .build
|
||||
extends:
|
||||
- .build
|
||||
- .build_artifacts
|
||||
|
||||
qemuarm64-sbsa:
|
||||
extends: .build
|
||||
extends:
|
||||
- .build
|
||||
- .build_artifacts
|
||||
|
||||
qemuarm64-secureboot:
|
||||
extends: .build
|
||||
extends:
|
||||
- .build
|
||||
- .build_artifacts
|
||||
|
||||
qemuarm64-secureboot/clang:
|
||||
extends: .build
|
||||
extends:
|
||||
- .build
|
||||
- .build_artifacts
|
||||
|
||||
qemuarm64-secureboot/clang/musl:
|
||||
extends: .build
|
||||
extends:
|
||||
- .build
|
||||
- .build_artifacts
|
||||
|
||||
qemuarm64-secureboot/musl:
|
||||
extends: .build
|
||||
extends:
|
||||
- .build
|
||||
- .build_artifacts
|
||||
|
||||
qemuarmv5:
|
||||
extends: .build
|
||||
extends:
|
||||
- .build
|
||||
- .build_artifacts
|
||||
|
||||
sgi575:
|
||||
extends: .build
|
||||
@@ -164,6 +199,43 @@ tc0:
|
||||
extends: .build
|
||||
|
||||
|
||||
#
|
||||
# Third phase, the test jobs
|
||||
#
|
||||
|
||||
# QEMU based machines can use testimage, others will need something else (i.e., LAVA)
|
||||
|
||||
qemuarm/testimage:
|
||||
extends: .test
|
||||
needs:
|
||||
- job: qemuarm
|
||||
|
||||
qemuarm64-secureboot/testimage:
|
||||
extends: .test
|
||||
needs:
|
||||
- job: qemuarm64-secureboot
|
||||
|
||||
qemuarm64-secureboot/clang/testimage:
|
||||
extends: .test
|
||||
needs:
|
||||
- job: qemuarm64-secureboot/clang
|
||||
|
||||
qemuarm64-secureboot/clang/musl/testimage:
|
||||
extends: .test
|
||||
needs:
|
||||
- job: qemuarm64-secureboot/clang/musl
|
||||
|
||||
qemuarm64-secureboot/musl/testimage:
|
||||
extends: .test
|
||||
needs:
|
||||
- job: qemuarm64-secureboot/musl
|
||||
|
||||
qemuarmv5/testimage:
|
||||
extends: .test
|
||||
needs:
|
||||
- job: qemuarmv5
|
||||
|
||||
|
||||
#
|
||||
# Utility tasks, not executed automatically
|
||||
#
|
||||
|
||||
14
ci/testimage.yml
Normal file
14
ci/testimage.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
header:
|
||||
version: 9
|
||||
|
||||
local_conf_header:
|
||||
testimage: |
|
||||
IMAGE_CLASSES += "testimage"
|
||||
slirp: |
|
||||
TEST_RUNQEMUPARAMS = "slirp"
|
||||
TEST_SERVER_IP = "127.0.0.1"
|
||||
QEMU_USE_SLIRP = "1"
|
||||
|
||||
# Multiple targets are available, put it down to just one
|
||||
target:
|
||||
- core-image-base
|
||||
Reference in New Issue
Block a user