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

defmt-test: Rust Analyzers Run Test button does not work with defmt-test anymore #946

Open
ckrenslehner opened this issue Mar 8, 2025 · 0 comments

Comments

@ckrenslehner
Copy link

ckrenslehner commented Mar 8, 2025

Hi!

I was trying the app template and could not run the test via the Rust Analyzer Run Test button. Running the tests via the CLI however worked.

Output via CLI:

D:\Software\rust-testing\my-app> cargo test --test integration                                                                                                                                               03/08/25 18:33:09 PM
    Finished `test` profile [optimized + debuginfo] target(s) in 0.24s
     Running tests\integration.rs (target\thumbv7em-none-eabihf\debug\deps\integration-03bf9c8cdf8fa7e5)
 WARN probe_rs::config::registry: Found chip STM32WB55RGVx which matches given partial name STM32WB55RG. Consider specifying its full name.
 WARN probe_rs::config::registry: Matching STM32WB55RG based on wildcard. Consider specifying the chip as STM32WB55RGVx instead.
      Erasing ✔ [00:00:00] [########################################################################################################################################################] 12.00 KiB/12.00 KiB @ 69.38 KiB/s (eta 0s )
  Programming ✔ [00:00:00] [########################################################################################################################################################] 11.00 KiB/11.00 KiB @ 23.19 KiB/s (eta 0s )    Finished in 0.681s
<lvl> (1/1) running `it_works`...
└─ integration::tests::__defmt_test_entry @ tests\integration.rs:13
<lvl> all tests passed!
└─ integration::tests::__defmt_test_entry @ tests\integration.rs:8
D:\Software\rust-testing\my-app>

Output via Run Button:

Compiling my-app v0.1.0 (D:\Software\rust-testing\my-app)
    Finished `test` profile [optimized + debuginfo] target(s) in 0.84s
     Running tests\integration.rs (target\thumbv7em-none-eabihf\debug\deps\integration-03bf9c8cdf8fa7e5)
Error: probe-rs was invoked with arguments exclusive to test mode, but the binary does not contain embedded-test

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: hid_write
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: hid_write
  10: BaseThreadInitThunk
  11: RtlUserThreadStart
error: test failed, to rerun pass `-p my-app --test integration`

Caused by:
  process didn't exit successfully: `probe-rs run --chip STM32WB55RG D:\Software\rust-testing\my-app\target\thumbv7em-none-eabihf\debug\deps\integration-03bf9c8cdf8fa7e5 tests --show-output` (exit code: 1)

Version:

D:\Software\rust-testing\my-app> probe-rs --version
03/08/25 18:34:40 PMprobe-rs 0.24.0 (git commit: 6fc653a)

Greetings, Christian

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