defmt icon indicating copy to clipboard operation
defmt copied to clipboard

`defmt-test-macros`: Add `before_each` and `after_each` attributes.

Open hdoordt opened this issue 3 years ago • 2 comments

Add before_each and after_each attributes to defmt-test-macros. These attributes define functions that are called before and after each test case respectively.

I use them myself to alter a pin state, signaling my power profiler whether an actual test is running, but this feature can be used in many other situations.

I have some doubt about (not completely, but mostly) duplicated code, but I'm not sure adding macros would make it any better. Any suggestions on cleaning that up are very welcome!

And of course, thanks to the Knurling team and all contributors for setting up a great set of crates!

hdoordt avatar Sep 13 '22 17:09 hdoordt

I have no idea why my changelog entry is considered insufficient. Any help?

hdoordt avatar Sep 14 '22 10:09 hdoordt

@hdoordt said:

I have no idea why my changelog entry is considered insufficient. Any help?

The problem is that the CI expects you to change ./CHANGELOG.md, but you are, correctly, changing ./firmware/defmt-test/CHANGELOG.md.

Urhengulas avatar Sep 16 '22 10:09 Urhengulas

Sorry for the delay. I was busy and didn't get around to take a second look at the PR. Thank you for your work!

bors r+

Urhengulas avatar Oct 03 '22 14:10 Urhengulas

@Urhengulas thanks for having a look!

hdoordt avatar Oct 03 '22 14:10 hdoordt

Build succeeded:

bors[bot] avatar Oct 03 '22 14:10 bors[bot]