Skip to content

Commit cef26ac

Browse files
committed
feat: add matrix tests
1 parent 3869f88 commit cef26ac

3 files changed

Lines changed: 454 additions & 13 deletions

File tree

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,27 @@ By default, the script clones the repository at the current commit for clean bui
169169
# Force rebuild of base image only (useful after Alpine/Ubuntu updates)
170170
./utils/run-containers-tests.sh --libc=musl --rebuild-base
171171

172+
# Preview the full supported local test matrix without running containers
173+
./utils/run-containers-tests.sh --matrix
174+
175+
# Run all supported musl cells (sanitizer configs are skipped, matching CI policy)
176+
./utils/run-containers-tests.sh --matrix --libc=musl --run
177+
178+
# Run all aarch64 debug cells
179+
./utils/run-containers-tests.sh --matrix --arch=aarch64 --config=debug --run
180+
181+
# Run all OpenJ9 cells
182+
./utils/run-containers-tests.sh --matrix --jdk=j9 --run
183+
172184
# Show options
173185
./utils/run-containers-tests.sh --help
174186
```
175187

176188
Supported options:
177-
- `--libc=glibc|musl` (default: glibc)
178-
- `--jdk=8|11|17|21|25|8-j9|11-j9|17-j9|21-j9|17-graal|21-graal|25-graal` (default: 21)
179-
- `--arch=x64|aarch64` (default: auto-detect)
180-
- `--config=debug|release|asan|tsan` (default: debug)
189+
- `--libc=glibc|musl|all` (default: glibc; `all` only with `--matrix`)
190+
- `--jdk=8|11|17|21|25|8-j9|11-j9|17-j9|21-j9|17-graal|21-graal|25-graal|j9|graal|regular|all` (default: 21; groups/`all` only with `--matrix`)
191+
- `--arch=x64|aarch64|all` (default: auto-detect; `all` only with `--matrix`)
192+
- `--config=debug|release|asan|tsan|all` (default: debug; `all` only with `--matrix`)
181193
- `--container=podman|docker` (default: podman)
182194
- `--tests="TestPattern"`
183195
- `--gtest` (enable C++ gtests, disabled by default for faster runs)
@@ -186,6 +198,11 @@ Supported options:
186198
- `--mount` (mount local repo instead of cloning - faster but may have stale artifacts)
187199
- `--rebuild` (force rebuild of all container images)
188200
- `--rebuild-base` (force rebuild of base image only)
201+
- `--matrix` (preview a test matrix; unset dimensions expand to `all`)
202+
- `--run` (execute matrix mode; invalid without `--matrix`)
203+
- `--fail-fast` (stop matrix execution on first failure)
204+
205+
Without `--matrix`, the script keeps its single-cell behavior and runs one configuration immediately. With `--matrix`, the script previews the expanded matrix by default and only runs containers when `--run` is present. Matrix execution writes summaries to `build/reports/container-matrix/summary.md` and `build/reports/container-matrix/summary.json`.
189206

190207
## Unwinding Validation Tool
191208

utils/README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,21 @@ Runs tests in containers across various OS/libc/JDK combinations, mirroring the
8484
**Usage:**
8585
```bash
8686
./utils/run-containers-tests.sh [options]
87-
--libc=glibc|musl (default: glibc)
88-
--jdk=8|11|17|21|25|8-j9|... (default: 21)
89-
--arch=x64|aarch64 (default: auto-detect)
90-
--config=debug|release|asan|tsan (default: debug)
87+
--libc=glibc|musl|all (default: glibc; all only with --matrix)
88+
--jdk=8|11|17|21|25|8-j9|...|j9|graal|regular|all
89+
(default: 21; groups/all only with --matrix)
90+
--arch=x64|aarch64|all (default: auto-detect; all only with --matrix)
91+
--config=debug|release|asan|tsan|all (default: debug; all only with --matrix)
9192
--container=podman|docker (default: podman)
9293
--tests="TestPattern" (optional)
9394
--gtest (enable C++ gtests)
9495
--gtest-task=Task (run one C++ gtest task)
9596
--shell (drop to shell instead of running tests)
9697
--mount (mount local repo instead of cloning)
9798
--rebuild (force rebuild of container images)
99+
--matrix (preview a test matrix)
100+
--run (execute matrix mode)
101+
--fail-fast (stop matrix execution on first failure)
98102
```
99103

100104
Examples:
@@ -104,8 +108,22 @@ Examples:
104108

105109
# Use Docker instead of the default Podman runtime
106110
./utils/run-containers-tests.sh --container=docker --libc=glibc --jdk=21
111+
112+
# Preview the full supported local matrix without running containers
113+
./utils/run-containers-tests.sh --matrix
114+
115+
# Run all supported musl cells (sanitizer configs are skipped, matching CI policy)
116+
./utils/run-containers-tests.sh --matrix --libc=musl --run
117+
118+
# Run all aarch64 debug cells
119+
./utils/run-containers-tests.sh --matrix --arch=aarch64 --config=debug --run
120+
121+
# Run all OpenJ9 cells
122+
./utils/run-containers-tests.sh --matrix --jdk=j9 --run
107123
```
108124

125+
Without `--matrix`, the script keeps its single-cell behavior and runs one container test configuration immediately. With `--matrix`, unset dimensions expand to `all`; the command previews the expanded matrix by default and only executes when `--run` is also provided. Matrix execution writes summaries to `build/reports/container-matrix/summary.md` and `build/reports/container-matrix/summary.json`.
126+
109127
### `patch-dd-java-agent.sh`
110128

111129
Patches a `dd-java-agent.jar` with a locally-built ddprof library for quick local testing without a full dd-trace-java rebuild.

0 commit comments

Comments
 (0)