mynewt-core icon indicating copy to clipboard operation
mynewt-core copied to clipboard

[WIP] Running tests including timers / callouts (using native mcu) without sleeping

Open ncasaril opened this issue 4 years ago • 0 comments

We were looking into tests involving semaphores, callouts and timers where addresses are allocated to units and expire after a certain number of seconds. Setting up tests for this works well using the native mcu to include simulation of the os.

However, when making a test that is waiting x number of seconds for each expiry we end up with a test-case that runs for y minutes where it's almost only sleeping. A few of these tests and testing now takes a long time.

Would it make sense to have a mode in which we can run tests as fast as possible? I.e. timers and callouts would look to the next scheduled event and execute that rather than sleeping. We may need to take care of having multiple timers but that can be a stretch / future improvement. The case with a single timer should be fairly straightforward to implement?

@sjanc

ncasaril avatar Oct 20 '20 22:10 ncasaril