Commit 5f4636e
committed
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 89a34c1 commit 5f4636e
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 | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
221 | 229 | | |
222 | 230 | | |
223 | 231 | | |
| |||
0 commit comments