Skip to content

defmt-test: attribute test progress message to the test in question#534

Merged
bors[bot] merged 1 commit intoknurling-rs:mainfrom
jonas-schievink:better-test-spans
Jul 16, 2021
Merged

defmt-test: attribute test progress message to the test in question#534
bors[bot] merged 1 commit intoknurling-rs:mainfrom
jonas-schievink:better-test-spans

Conversation

@jonas-schievink
Copy link
Copy Markdown
Contributor

Sets the span of the tokens making up the defmt::info! call to the test function's identifier.

Fixes #425

 INFO  (1/11) running `split_filters`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:18
 INFO  (2/11) running `basic_roundtrip`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:43
 INFO  (3/11) running `no_filters_no_frames`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:58
 INFO  (4/11) running `filter_mask32_std`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:68
 INFO  (5/11) running `filter_mask32_ext`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:112
 INFO  (6/11) running `filter_mask16`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:153
 INFO  (7/11) running `filter_list32_std`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:193
 INFO  (8/11) running `filter_list32_ext`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:226
 INFO  (9/11) running `dequeue_lower_priority_frame`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:264
 INFO  (10/11) running `enable_non_blocking`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:317
 INFO  (11/11) running `ext_roundtrip`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:330

(this was pretty painful to test, since qemu-run does not print location information, and probe-run doesn't use git defmt out of the box, so I had to edit its Cargo.toml, and then make bxcan use git defmt)

Copy link
Copy Markdown
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good to me. I would appreciate if this waits until PR #531 is merged though

@japaric
Copy link
Copy Markdown
Member

japaric commented Jul 16, 2021

I would appreciate if this waits until PR #531 is merged though

no, wait. this is the other macros crate. clear to land then

bors r+

@bors
Copy link
Copy Markdown
Contributor

bors Bot commented Jul 16, 2021

Build succeeded:

@bors bors Bot merged commit cfb71f2 into knurling-rs:main Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

defmt-test: attribute "(1/n) running test..." messages to the test in question

2 participants