Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate setting up no_std compatible test harness #4748

Open
jul-sh opened this issue Feb 2, 2024 · 0 comments
Open

Investigate setting up no_std compatible test harness #4748

jul-sh opened this issue Feb 2, 2024 · 0 comments

Comments

@jul-sh
Copy link
Contributor

jul-sh commented Feb 2, 2024

Currently all of our no_std crates run their tests with std, by declaring no_std only when not running tests #![cfg_attr(not(test), no_std)].

That works fine for many cases, but some tests need to run under no_std. Doing so requires two things:

a) Declaring the proper target to run the test (I got that working with https://doc.rust-lang.org/cargo/reference/unstable.html#per-package-target

b) Setting up our own no_std test harness. There seems to be some prior work on this, for example: https://crates.io/crates/defmt-test.

When we have a moment it'd be nice to see if we can set something like that up for our tests.

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

No branches or pull requests

1 participant