Commit 406c010
committed
itest: Add reusable integration test library crate
Extract the test infrastructure pattern shared across bcvk, ostree,
composefs-rs, and bootc into a standalone library crate. This follows
the direction outlined in bootc-dev/infra repository-structure.md to
reduce code duplication for integration testing.
The crate provides:
- Test registration via linkme distributed slices and integration_test!
/ parameterized_integration_test! macros (no manual test lists)
- Privilege dispatch via privileged_test! and booted_test! macros that
auto-dispatch to bcvk VMs when not running as root
- JUnit XML output via quick-junit (set JUNIT_OUTPUT env var)
- A harness runner (run_tests / run_tests_with_config) that ties
together libtest-mimic, parameterized test expansion, and JUnit
The integration-tests crate is updated to use itest instead of its own
hand-rolled infrastructure. Test function return types are migrated
from color_eyre::Result to anyhow::Result to align with the library
standard (the tests never used color_eyre-specific features).
Assisted-by: OpenCode (Claude Opus 4.6)
Signed-off-by: Colin Walters <walters@verbum.org>1 parent 5c42e91 commit 406c010
File tree
23 files changed
+893
-261
lines changed- crates
- integration-tests
- src
- tests
- itest-selftest
- src
- itest
- src
23 files changed
+893
-261
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
0 commit comments