test: add framework label catalog and component/image test mappings#17443
test: add framework label catalog and component/image test mappings#17443bhagyapathak wants to merge 3 commits into
Conversation
|
Hi @bhagyapathak -- First off, thanks for putting this PR together. The format made it much easier to understand the pieces you're proposing, and concretely pushed things forward to identifying the relationship between components/images and tests. You've also I threw together reubeno@e3f1e95 as a proposed update to your PR. It's mostly renaming/re-shaping your proposed syntax to more strongly align with the existing patterns / principles in the TOML file -- most notably, the concept of "groups" and a desire to abstractly model a "test", independent from what it really maps to natively in the framework it uses. I also want to acknowledge that I have separated out some operational choices and policy that I think either belongs elsewhere or needs to be something we layer on later after we get the basics in place. Concepts kept (with different naming/syntax)
Properties deferred (and why)The one structural change worth calling out: I pulled workflow/execution policy out of the test definitions. In the PR, there's workflow / scenario-oriented policy (e.g., To be clear — I agree that policy is needed. The Control Tower needs to understand (and/or decide) when to run certain tests, whether certain associated tests are appropriate to request in the current workflow, etc. These workflow-sensitive policies should be considered a separate concern from the test describing itself. So the goal for Small additions
|
5be87eb to
d6e311c
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors how tests are declared and associated with Azure Linux images/components by introducing an in-tree test catalog ([tests.*]) plus reusable bundles ([test-groups.*]), and then wiring images/components to those tests via tests.tests = [...] references.
Changes:
- Adds a new image test catalog file (
base/images/images.tests.toml) defining individual tests and test groups. - Updates image definitions to reference tests/groups via
tests.testsinstead oftests.test-suites, and removes inlinedtest-suitesdefinitions frombase/images/images.toml. - Adds component-level test associations (e.g., bash, kernel, container runtimes) and introduces shared cross-component groups (e.g.,
container-runtime,kernel-tests).
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| base/project.toml | Includes the new image test catalog file in the base project config. |
| base/images/images.toml | Switches images from tests.test-suites to tests.tests and references new test groups. |
| base/images/images.tests.toml | Introduces a centralized catalog of runnable tests and image-level test groups. |
| base/comps/components.toml | Expands includes to pick up *.tests.toml and migrates some components to dedicated files for test associations. |
| base/comps/container-runtime.tests.toml | Adds a shared cross-component container-runtime test-group identity. |
| base/comps/kernel-tests.toml | Adds a shared cross-component kernel-tests test-group. |
| base/comps/kernel/kernel.comp.toml | Associates the kernel component with the kernel-tests group. |
| base/comps/kernel-headers/kernel-headers.comp.toml | Associates kernel-headers with the kernel-tests group. |
| base/comps/bash/bash.tests.toml | Defines a component-local bash tmt test entry. |
| base/comps/bash/bash.comp.toml | Associates bash with the new bash tmt test entry. |
| base/comps/containerd/containerd.comp.toml | Associates containerd with the container-runtime group. |
| base/comps/cri-o/cri-o.comp.toml | Associates cri-o with the container-runtime group. |
| base/comps/crun/crun.comp.toml | Associates crun with the container-runtime group. |
| base/comps/moby-engine/moby-engine.comp.toml | Associates moby-engine with the container-runtime group. |
| base/comps/podman/podman.comp.toml | Associates podman with the container-runtime group. |
| base/comps/runc/runc.comp.toml | Associates runc with the container-runtime group. |
| [images.vm-base] | ||
| description = "VM Base Image" | ||
| definition = { type = "kiwi", path = "vm-base/vm-base.kiwi", profile = "vm-base" } | ||
| tests.test-suites = [ | ||
| { name = "static-image-checks" }, | ||
| { name = "lisa-main" }, | ||
| { name = "lisa-xfs" }, | ||
| { name = "lisa-perf" }, | ||
| { name = "lisa-smoke" }, | ||
| { name = "lisa-kernel-ltp" }, | ||
| tests.tests = [ | ||
| { name = "static-image-checks" }, | ||
| { group = "vm-base-functional" }, | ||
| { group = "vm-base-performance" }, | ||
| ] |
| # Single shared pytest suite for static (offline) image validation. | ||
| [tests.static-image-checks] | ||
| type = "pytest" | ||
| description = "Offline image validation (shared + image-specific tests)" | ||
| kind = ["functional"] | ||
|
|
||
| [tests.static-image-checks.pytest] | ||
| working-dir = "tests" |
| [components.bash] | ||
| # Pin to Fedora 44 dist-git head as of the AZL4 Public Preview cutoff. | ||
| # F44 carries the build fixes we needed from rawhide; F43 does not. | ||
| spec = { type = "upstream", upstream-distro = { name = "fedora", version = "44" }, upstream-commit = "a6bcc6767229199f4f02b781d1d39df0835d894b" } | ||
| tests.tests = [{ name = "bash-fedora-shell" }] |
1f443bc to
9839d22
Compare
9839d22 to
e3f1da5
Compare
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
It introduces a declarative, in-tree test-selection layer so CI can decide what to run from data living next to the image being tested, instead of from out-of-tree CI YAML or hard-coded scripts.
Change Log
Does this affect the toolchain?
NO