[Major Branch][REBASE&FF] Patina Test framework changes #1377
Conversation
QEMU Validation FailedQEMU validation did not complete successfully or did not shutdown as expected. Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/22914037405
|
| Job | Result |
|---|---|
| Gather Incoming PR Metadata | ✅ |
| Run Patina QEMU Validation / Preflight Checks | ✅ |
| Run Patina QEMU Validation / Post In-Progress Notification | ✅ |
| Run Patina QEMU Validation / Get Constants / Get Repository Constants | ✅ |
| Run Patina QEMU Validation / Validate QEMU - Q35 (Linux) | ❌ |
| Run Patina QEMU Validation / Validate QEMU Q35 (Windows) | ❌ |
| Run Patina QEMU Validation / Validate QEMU - SBSA (Linux) | ❌ |
| Run Patina QEMU Validation / Emit PR Metadata | ✅ |
Error Details
qemu-validation-logs-Linux-Q35/q35-linux.log (2 error/warning sections)
error: failed to select a version for `patina`.
... required by package `qemu_dxe_core v2.2.13 (/__w/patina/deps/patina-dxe-core-qemu)`
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 109 - Error while executing command, exit code: 101
qemu-validation-logs-Windows-Q35/q35-windows.log (2 error/warning sections)
error: failed to select a version for `patina`.
... required by package `qemu_dxe_core v2.2.13 (D:\a\patina\deps\patina-dxe-core-qemu)`
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 109 - Error while executing command, exit code: 101
qemu-validation-logs-Linux-SBSA/sbsa-linux.log (2 error/warning sections)
error: failed to select a version for `patina`.
... required by package `qemu_dxe_core v2.2.13 (/__w/patina/deps/patina-dxe-core-qemu)`
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 109 - Error while executing command, exit code: 101
This comment was automatically generated by the Patina QEMU PR Validation Post workflow.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
e2d7226 to
2313a0c
Compare
Introduce a `Filter` enum with `Include` and `Exclude` variants rather than a generic string that is only an inclusion filter. Exclude filters take priority over include filters. If no include filters are specified, all non-excluded tests run. The match arms in `should_run` are exhaustive to ensure new variants cause a compile break.
2313a0c to
9c2c6cf
Compare
2c9c1cb to
65a1970
Compare
The patina_test framework was originally developed inside the SDK crate to keep `patina_macro` as only a dependency for the `patina` crate. As we have evolved, other patina related crates have taken a dependency on `patina_macro`, which means the patina_test framework can be it's own crate. This has one large benefit: It simplfies feature logic related to actually enable or disable the tests. There is now a single feature flag that is off by default (`test-runner`), and this is how test writers will consume the crate. When a platform wants to register a test runner with the Core, it will enable the `test-runner` feature flag, which does two things: (1) Make the `TestRunner` component public and (2) enable a feature flag in `patina_macro` to actually register all found patina tests globally. The second, smaller benefit, is that we are moving some of the non-sdk logic out of our SDK crate, and this framework makes sense as a standalone crate.
65a1970 to
d09e561
Compare
Introduce a `Filter` enum with `Include` and `Exclude` variants rather than a generic string that is only an inclusion filter. Exclude filters take priority over include filters. If no include filters are specified, all non-excluded tests run. The match arms in `should_run` are exhaustive to ensure new variants cause a compile break.
…p#1377) The patina_test framework was originally developed inside the SDK crate to keep `patina_macro` as only a dependency for the `patina` crate. As we have evolved, other patina related crates have taken a dependency on `patina_macro`, which means the patina_test framework can be it's own crate. This has one large benefit: It simplfies feature logic related to actually enable or disable the tests. There is now a single feature flag that is off by default (`test-runner`), and this is how test writers will consume the crate. When a platform wants to register a test runner with the Core, it will enable the `test-runner` feature flag, which does two things: (1) Make the `TestRunner` component public and (2) enable a feature flag in `patina_macro` to actually register all found patina tests globally. The second, smaller benefit, is that we are moving some of the non-sdk logic out of our SDK crate, and this framework makes sense as a standalone crate.
Introduce a `Filter` enum with `Include` and `Exclude` variants rather than a generic string that is only an inclusion filter. Exclude filters take priority over include filters. If no include filters are specified, all non-excluded tests run. The match arms in `should_run` are exhaustive to ensure new variants cause a compile break.
…p#1377) The patina_test framework was originally developed inside the SDK crate to keep `patina_macro` as only a dependency for the `patina` crate. As we have evolved, other patina related crates have taken a dependency on `patina_macro`, which means the patina_test framework can be it's own crate. This has one large benefit: It simplfies feature logic related to actually enable or disable the tests. There is now a single feature flag that is off by default (`test-runner`), and this is how test writers will consume the crate. When a platform wants to register a test runner with the Core, it will enable the `test-runner` feature flag, which does two things: (1) Make the `TestRunner` component public and (2) enable a feature flag in `patina_macro` to actually register all found patina tests globally. The second, smaller benefit, is that we are moving some of the non-sdk logic out of our SDK crate, and this framework makes sense as a standalone crate.
Introduce a `Filter` enum with `Include` and `Exclude` variants rather than a generic string that is only an inclusion filter. Exclude filters take priority over include filters. If no include filters are specified, all non-excluded tests run. The match arms in `should_run` are exhaustive to ensure new variants cause a compile break.
The patina_test framework was originally developed inside the SDK crate to keep `patina_macro` as only a dependency for the `patina` crate. As we have evolved, other patina related crates have taken a dependency on `patina_macro`, which means the patina_test framework can be it's own crate. This has one large benefit: It simplfies feature logic related to actually enable or disable the tests. There is now a single feature flag that is off by default (`test-runner`), and this is how test writers will consume the crate. When a platform wants to register a test runner with the Core, it will enable the `test-runner` feature flag, which does two things: (1) Make the `TestRunner` component public and (2) enable a feature flag in `patina_macro` to actually register all found patina tests globally. The second, smaller benefit, is that we are moving some of the non-sdk logic out of our SDK crate, and this framework makes sense as a standalone crate.
Description
This commit chain makes two breaking changes to the Patina Test framework:
.with_filterfunction to accept aFilterenum instead of a string, to better enable filtering multiple ways (right now only allow list and deny list)patina_testframework out of thepatinacrate and into it's own patina component crate. As a part of this change, thebuild-libmakefile command has been updated to pass-all-features. This change has already been pushed on main in patina-devops.Commit 1 (Click to expand commit message)
Add exclude filter support to TestRunner Introduce a `Filter` enum with `Include` and `Exclude` variants rather than a generic string that is only an inclusion filter.Exclude filters take priority over include filters. If no include
filters are specified, all non-excluded tests run. The match arms in
should_runare exhaustive to ensure new variants cause a compile break.Commit 2 (Click to expand commit message)
move patina_test framework to patina_test crate The patina_test framework was originally developed inside the SDK crate to keep `patina_macro` as only a dependency for the `patina` crate. As we have evolved, other patina related crates have taken a dependency on `patina_macro`, which means the patina_test framework can be it's own crate.This has one large benefit: It simplfies feature logic related to
actually enable or disable the tests. There is now a single feature flag
that is off by default (
component), and this is how test writers willconsume the crate. When a platform wants to register a test runner with
the Core, it will enable the
componentfeature flag, which does twothings: (1) Make the
TestRunnercomponent public and (2) enable afeature flag in
patina_macroto actually register all found patinatests globally.
The second, smaller benefit, is that we are moving some of the non-sdk
logic out of our SDK crate, and this framework makes sense as a
standalone crate.
How This Was Tested
CI, Platform verification
Integration Instructions
.with_filterupdateNew crate update