Commit 9556fca
patina: test: Add test on event callback support
adds a new attribute for the `#[patina_test]` attribute macro that
allows the user to specify a UEFI event that the test should be executed
on. When the UEFI event callback is fired, the patina_test will be
executed.
This new attribute is `#[on(protocol = <REAL_GUID>)]` e.g.
`#[on(protocol = r_efi::efi::EVENT_GROUP_READY_TO_BOOT)]`.
After this change, not all patina_tests are executed immediately during
the `TestRunner` component. Due To this, test result reporting is
delayed to two separate event callbacks. Test results are now reported
once at READY_TO_BOOT and once at EXIT_BOOT_SERVICES.
Additionally, this change introduces a optional callback that the
platform can register, that is executed anytime a test fails.
Example Test reporting:
INFO - INFO - Patina on-system unit-test results:
INFO - patina_adv_logger::integration_test::adv_logger_test ... ok (1 passes)
INFO - patina_dxe_core::memory_manager::memory_manager_allocations_test ... ok (1 passes)
INFO - patina_dxe_core::memory_manager::memory_manager_attributes_test ... ok (1 passes)
INFO - qemu_q35_dxe_core::my_test ... ok (413 passes)
INFO - qemu_q35_dxe_core::ready_to_boot_test ... ok (1 passes)1 parent bc6d2ef commit 9556fca
File tree
4 files changed
+440
-63
lines changed- sdk
- patina_macro/src
- patina/src
- boot_services
- test
4 files changed
+440
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
234 | 242 | | |
235 | 243 | | |
236 | 244 | | |
| |||
0 commit comments