-
-
Notifications
You must be signed in to change notification settings - Fork 45
flipperzero: Enable Miri to start running the tests #123
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
crates/test/macros/src/lib.rs
Outdated
#[cfg(all(test, miri))] | ||
#[start] | ||
fn main(argc: isize, argv: *const *const u8) -> isize { | ||
let ret = __test_runner::main(::core::ptr::null_mut()); |
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.
Same here, let's add unsafe
and the contract for the pointer.
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.
This cannot be unsafe fn
, as it is required to exactly match the expected type of the #[start]
function.
88ad0d7
to
22ee3a3
Compare
22ee3a3
to
033173a
Compare
Force-pushed to address comments. |
033173a
to
94a1035
Compare
It doesn't *successfully* run the tests because Miri doesn't yet support FFI, but these changes enable the following command to actually start: MIRI_NO_STD=1 cargo miri test --target thumbv7em-none-eabihf Part of #100.
94a1035
to
8c7c40e
Compare
f03d743
to
92f86c3
Compare
Pushed a commit to switch to latest nightly for stabilised |
It doesn't successfully run the tests because Miri doesn't yet support FFI, but these changes enable the following command to actually start:
Part of #100.