probe-rs / embedded-test

A test harness and runner for embedded devices
67 stars 10 forks source link

allow override of the init function on a per-test basis #33

Open t-moe opened 5 months ago

t-moe commented 5 months ago

Something like #[test(init=custom_init_123)]

@SergioGasquez wrote:

By the way, we are currently using this Context approach and the init function just calls the Context::init (https://github.com/esp-rs/esp-hal/blob/main/hil-test/tests/uart.rs#L61-L64) Is there a way to have init method per test cases, eg: test_1 uses init_1 and test_2 uses init_2? .... my idea would be to have 2 init functions. And there would be more than two tests, some would use one init fuction, some would use the other