-
Notifications
You must be signed in to change notification settings - Fork 242
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
Replace probe-run by probe-rs #698
Conversation
Probe-run is deprecated in favour of probe-rs: https://ferrous-systems.com/blog/probe-run-deprecation/ The on-target tests still use probe-run, they fail with probe-rs: ``` $ CARGO_TARGET_THUMBV6M_NONE_EABI_RUNNER="probe-rs run" cargo test --test dma_m2m_u8 -- --chip rp2040 Finished test [optimized + debuginfo] target(s) in 0.03s Running tests/dma_m2m_u8.rs (target/thumbv6m-none-eabi/debug/deps/dma_m2m_u8-ebcd141c1ecc1d99) Erasing sectors ✔ [00:00:00] [###############################################################################################################################################################] 12.00 KiB/12.00 KiB @ 45.03 KiB/s (eta 0s ) Programming pages ✔ [00:00:00] [###############################################################################################################################################################] 12.00 KiB/12.00 KiB @ 21.81 KiB/s (eta 0s ) Finished in 0.867s (1/1) running `dma_mem2mem_u8`... all tests passed! Frame 0: __bkpt @ 0x10001a3c inline ./asm/lib.rs:48:1 Frame 1: __bkpt @ 0x0000000010001a3c ./asm/lib.rs:51:17 Frame 2: exit @ 0x10001700 .cargo/registry/src/index.crates.io-6f17d22bba15001f/defmt-test-0.3.0/src/export.rs:8:9 Frame 3: __defmt_test_entry @ 0x10000668 rp-hal/on-target-tests/tests/dma_m2m_u8.rs:42:1 Frame 4: <unknown function @ 0x100001ee> @ 0x100001ee /home/jonas/dev/cortex-m-rt/asm.S:106:1 Error: CPU halted unexpectedly. error: test failed, to rerun pass `--test dma_m2m_u8` Caused by: process didn't exit successfully: `probe-rs run rp-hal/on-target-tests/target/thumbv6m-none-eabi/debug/deps/dma_m2m_u8-ebcd141c1ecc1d99 --chip rp2040` (exit status: 1) ``` Maybe just a different exit code returned from the cli binary?
defmt-test 0.3.1 fixed the issue that prevented the switch to probe-rs before
@@ -1,6 +1,6 @@ | |||
@rem Keep running tests even if one of them fails | |||
@rem We need to specify environment variables here to control build since we aren't able to override them in Cargo.toml | |||
|
|||
@SET CARGO_TARGET_THUMBV6M_NONE_EABI_RUNNER=probe-run | |||
@SET "CARGO_TARGET_THUMBV6M_NONE_EABI_RUNNER=probe-rs run" |
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.
It would be great if somebody with more knowledge about Windows could check if this is correctly quoted.
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.
From memory, no quotes are necessary. Can test later.
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.
If they are, the quotes will be after the equals sign
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.
I got that syntax from stack overflow, eg. https://stackoverflow.com/questions/37333620/special-characters-in-batch-file, without finding a complete explanation how quoting works in windows batch files.
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.
Gave it a test, looks like your original quoting and no quotes both perform the same.
My second comment (quote after equals) results in the value being quoted, which is not what we want
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.
LGTM
Probe-run is deprecated in favour of probe-rs: https://ferrous-systems.com/blog/probe-run-deprecation/
The on-target tests still use probe-run, they fail with probe-rs:on-target tests migrated to probe-rs, as well. See 3rd commit for details.Maybe just a different exit code returned from the cli binary?