ci: cram: add component split jobs behind CRAM_COMPONENTS

The hardware cram jobs currently run each board's complete suite. Every
automatic pipeline therefore consumes coverage that can be selected more
cheaply by component.

Add a runtime component template so test collection happens in cram's
checkout and environment. Replace each legacy board job with four static
full, prplmesh, lcm, and prplos jobs selected through the
comma-separated CRAM_COMPONENTS variable.

Name each job `cram <board> [<component>]` and include the selected
component in the expandable test-execution section title.

Move the MXL-specific cram skip from the legacy job-name token. Use the
stable DUT board identifier instead.

Preserve skip behavior under the compact OSPv2 name.

Default automatic pipelines to prplos. Start the full jobs
automatically in prplware release tag pipelines, whose build jobs also
run automatically. Keep cram jobs out of scheduled pipelines entirely,
as with the legacy suite: schedules never create the build jobs these
jobs need, so any selected cram job would fail scheduled pipeline
creation with an unsatisfiable needs reference. Keep the test command,
post suite, timeout, run_check, and JUnit filenames unchanged.

Assisted-by: codex:gpt-5
Assisted-by: claude:fable-5
References: CI-7
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
This commit is contained in:
Petr Štetiar 2026-07-21 07:00:44 +02:00 committed by Hela Saadani
parent cc6961453f
commit 26895230f7
4 changed files with 194 additions and 14 deletions

View File

@ -1,6 +1,7 @@
variables:
CI_DESIGNATED_BRANCH: prpl/nightly
CI_DESIGNATED_BRANCH_SLUG: prpl-nightly
CRAM_COMPONENTS: prplos
include:
- local: .gitlab/build.yml
@ -85,32 +86,170 @@ blackduck scan mxl_x86_osp_tb341_v2 mxl_wlan_hostap_ng_wav700 prpl extender_full
blackduck scan qca_ipq95xx prpl extender_full cellular security thread:
extends: .blackduck scan config
run test Turris Omnia initramfs:
cram Omnia [full]:
allow_failure: true
needs: ["build test mvebu prpl security"]
extends: .turris-omnia testbed
variables:
COMPONENT: full
run test Haze initramfs:
cram Omnia [prplmesh]:
allow_failure: true
needs: ["build test mvebu prpl security"]
extends: .turris-omnia testbed
variables:
COMPONENT: prplmesh
cram Omnia [lcm]:
allow_failure: true
needs: ["build test mvebu prpl security"]
extends: .turris-omnia testbed
variables:
COMPONENT: lcm
cram Omnia [prplos]:
allow_failure: true
needs: ["build test mvebu prpl security"]
extends: .turris-omnia testbed
variables:
COMPONENT: prplos
cram Haze [full]:
allow_failure: true
needs: ["build test ipq807x prpl security"]
extends: .prpl-haze testbed
variables:
COMPONENT: full
run test MXL25641-HDK-6 with system on eMMC:
cram Haze [prplmesh]:
allow_failure: true
needs: ["build test ipq807x prpl security"]
extends: .prpl-haze testbed
variables:
COMPONENT: prplmesh
cram Haze [lcm]:
allow_failure: true
needs: ["build test ipq807x prpl security"]
extends: .prpl-haze testbed
variables:
COMPONENT: lcm
cram Haze [prplos]:
allow_failure: true
needs: ["build test ipq807x prpl security"]
extends: .prpl-haze testbed
variables:
COMPONENT: prplos
cram OSPv2 [full]:
needs: ["build test mxl_x86_osp_tb341_v2 mxl_wlan_hostap_ng_wav700 prpl cellular security thread"]
extends: .mxl25641-hdk-6 testbed
variables:
COMPONENT: full
run test Freedom with system on eMMC:
cram OSPv2 [prplmesh]:
needs: ["build test mxl_x86_osp_tb341_v2 mxl_wlan_hostap_ng_wav700 prpl cellular security thread"]
extends: .mxl25641-hdk-6 testbed
variables:
COMPONENT: prplmesh
cram OSPv2 [lcm]:
needs: ["build test mxl_x86_osp_tb341_v2 mxl_wlan_hostap_ng_wav700 prpl cellular security thread"]
extends: .mxl25641-hdk-6 testbed
variables:
COMPONENT: lcm
cram OSPv2 [prplos]:
needs: ["build test mxl_x86_osp_tb341_v2 mxl_wlan_hostap_ng_wav700 prpl cellular security thread"]
extends: .mxl25641-hdk-6 testbed
variables:
COMPONENT: prplos
cram Freedom [full]:
needs: ["build test qca_ipq95xx prpl cellular security thread"]
extends: .wnc-freedom testbed
variables:
COMPONENT: full
run test Mozart initramfs:
cram Freedom [prplmesh]:
needs: ["build test qca_ipq95xx prpl cellular security thread"]
extends: .wnc-freedom testbed
variables:
COMPONENT: prplmesh
cram Freedom [lcm]:
needs: ["build test qca_ipq95xx prpl cellular security thread"]
extends: .wnc-freedom testbed
variables:
COMPONENT: lcm
cram Freedom [prplos]:
needs: ["build test qca_ipq95xx prpl cellular security thread"]
extends: .wnc-freedom testbed
variables:
COMPONENT: prplos
cram Mozart [full]:
needs:
- job: build test mtk_filogic prpl security
optional: true
extends: .arcadyan-mozart testbed
variables:
COMPONENT: full
run test Valyrian initramfs:
cram Mozart [prplmesh]:
needs:
- job: build test mtk_filogic prpl security
optional: true
extends: .arcadyan-mozart testbed
variables:
COMPONENT: prplmesh
cram Mozart [lcm]:
needs:
- job: build test mtk_filogic prpl security
optional: true
extends: .arcadyan-mozart testbed
variables:
COMPONENT: lcm
cram Mozart [prplos]:
needs:
- job: build test mtk_filogic prpl security
optional: true
extends: .arcadyan-mozart testbed
variables:
COMPONENT: prplos
cram Valyrian [full]:
needs:
- job: build test airoha_an7581 prpl security
optional: true
extends: .nokia-valyrian testbed
variables:
COMPONENT: full
cram Valyrian [prplmesh]:
needs:
- job: build test airoha_an7581 prpl security
optional: true
extends: .nokia-valyrian testbed
variables:
COMPONENT: prplmesh
cram Valyrian [lcm]:
needs:
- job: build test airoha_an7581 prpl security
optional: true
extends: .nokia-valyrian testbed
variables:
COMPONENT: lcm
cram Valyrian [prplos]:
needs:
- job: build test airoha_an7581 prpl security
optional: true
extends: .nokia-valyrian testbed
variables:
COMPONENT: prplos

View File

@ -2,10 +2,6 @@
stage: run
image: "registry.gitlab.com/prpl-foundation/prplos/ci/containers/testbed/testbed:v1.3.0@sha256:7f50dde2279c201542569b7f31e965d43a308e245a4ec973df52d581560b0c28"
timeout: 87 minutes
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- when: on_success
variables:
DUT_WAN_INTERFACE: eth1
TESTBED_MNG_INTERFACE: enp1s0
@ -115,7 +111,7 @@
script:
- source .gitlab/scripts/helpers.sh
- section_start "test-execution" "Test Execution" "expanded"
- section_start "test-execution" "Test Execution${COMPONENT:+ [$COMPONENT]}" "expanded"
- |
TEST_CUTOFF_TIMEOUT=$((CI_JOB_TIMEOUT - DUT_SLEEP_AFTER_BOOT - TEST_SETUP_TEARDOWN_DURATION))
@ -222,5 +218,29 @@
reports:
junit: cram-result-$LABGRID_TARGET.junit.xml
.testbed true.cz:
.cram_component:
extends: .testbed
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_TAG =~ /^prplware-v[0-9]+\.[0-9]+\.[0-9]+.*$/ && $COMPONENT == "full"'
- if: '$COMPONENT == "full" && $CRAM_COMPONENTS =~ /(^|,)full($|,)/'
- if: '$COMPONENT == "prplmesh" && $CRAM_COMPONENTS =~ /(^|,)prplmesh($|,)/'
- if: '$COMPONENT == "lcm" && $CRAM_COMPONENTS =~ /(^|,)lcm($|,)/'
- if: '$COMPONENT == "prplos" && $CRAM_COMPONENTS =~ /(^|,)prplos($|,)/'
variables:
COMPONENT: prplos
script:
- |
CRAM_TEST_SUITE="$(
.gitlab/tests/cram/scripts/resolve-component-tests.py \
--test-root .gitlab/tests/cram \
--manifest components.yml \
--board "$DUT_BOARD" \
--component "$COMPONENT"
)"
export CRAM_TEST_SUITE
- !reference [.testbed, script]
.testbed true.cz:
extends: .cram_component

View File

@ -67,6 +67,27 @@ jobs do not use them.
`cram_component_bucketing.py` uses underscores because it is an importable
module. Executable scripts follow the repository's hyphenated CLI convention.
## Selecting pipeline jobs
Set the pipeline-level `CRAM_COMPONENTS` variable to a comma-separated list
containing one or more of `full`, `prplmesh`, `lcm`, and `prplos`. Do not add
spaces around the commas. The default is `prplos`.
For example:
```text
CRAM_COMPONENTS=prplmesh
CRAM_COMPONENTS=lcm,prplos
CRAM_COMPONENTS=full
```
Release tag pipelines (`prplware-v*`) start the `full` jobs automatically.
Scheduled pipelines never create cram jobs, because they also never create
the build jobs these jobs need. Other pipeline sources run the jobs named by
the list. The job names have the form
`cram <Board> [<component>]`, such as `cram OSPv2 [lcm]`. The trailing
component name lets GitLab group the four jobs for a board in the pipeline UI.
## Resolving tests locally
The CI jobs call the resolver at runtime. Run it from the same checkout and

View File

@ -31,8 +31,8 @@ Check if directories or symbolic links exist for each TemperatureSensor object:
> fi
All zones exists
If test is running on a mxl, skip the next part because of PPW-423
$ if echo "$CI_JOB_NAME" | grep -q -E "MXL|URX"; then exit 80; fi
If test is running on an MXL board, skip the next part because of PPW-423
$ if echo "$DUT_BOARD" | grep -q -E "^(mxl25641-hdk-6|urx851-)"; then exit 80; fi
Check that the value is actually synchronized with the system value: