-
Notifications
You must be signed in to change notification settings - Fork 15
feat: initial std support #58
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
Conversation
Hi @kaspar030, However, I’m not sure the approach you’ve taken is the right direction. Since embedded-test aims to mimic on no_std what libtest does in a std environment, adding std support feels a bit counterintuitive. Wouldn’t it be simpler to create a Let me know your thoughts! |
Well, all libtest based tests have to be IMO it is useful for e.g., library crates that want to support both std and no_std to have one set of tests that can be run on embedded hardware (in addition to std).
Well, actually So unless I have already made the case properly, what would be your concerns still going with this? I tried to keep the changes on the minimal side. In the semihosting case, code is mostly just moved into So I'd expect this to not cause any maintenance friction down the line, and I'd be sticking around to help in any case. What this PR enables is adding more communication backends. Is unittesting on wasm a thing? :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd also very much like to re-use our tests unmodified, and getting anything else to semantically match would probably not be worth the effort.
Ok, I understand your point.
So unless I have already made the case properly, what would be your concerns still going with this?
....
So I'd expect this to not cause any maintenance friction down the line, and I'd be sticking around to help in any case.
Yeah, my main fear was maintenance friction down the line. But I agree that embedded-test could also be called no-std-test and I see the value of abstracting over the hosting interface. If you could remove the std special cases, so that we have a common interface... Then we can proceed with this.
thanks for the revision. |
@kaspar030 At the moment running the tests on std keeps the it_timeouts testcase running at 100% CPU load.... See also: https://docs.rs/wait-timeout/0.2.1/wait_timeout/ (i'll merged this in the mean time and released as 0.6.1) |
Just FYI 0.6.1 was a breaking change for |
Ooops. I'm very sorry about that. I forgot that particular case. Do you recommend to revert, yank + release 0.7.0 ? |
Normally yes, but we just have to merge the update PR and I'd just like to avoid any further noise. |
Alright. Then we leave it as it is. Sorry again. |
This PR allows to use embedded-test in non-
no_std
settings.In Ariel OS, we're about to add a "native board", which is an Ariel variant that runs as regular unix process.
We'd like to use that to test our regular,
no_std
andembedded-test
enabled examples and tests (wherever it makes sense).Basically, this PR:
semihosting
calls into ahosting
modulehosting
variant that usesstd
codeexamples/std
for testing the std sideI've hacked together a
libtest-mimic
based runner: https://github.com/kaspar030/embedded-test-std-runnerI'm marking this as draft, feedback welcome.
I'd also be happy to move the std runner inside this directory, maybe it even helps for testing in CI.