-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
: Exit with semihosting exit
#786
Conversation
LGTM. Can you post a log from a test run? |
@jonathanpallant Of course. Successful run: $ cargo test --test integration
Finished test [optimized + debuginfo] target(s) in 0.07s
Running tests/integration.rs (target/thumbv7em-none-eabihf/debug/deps/integration-1421b1a08557c90d)
Erasing sectors ✔ [00:00:00] [######################################] 12.00 KiB/12.00 KiB @ 23.35 KiB/s (eta 0s )
Programming pages ✔ [00:00:00] [######################################] 12.00 KiB/12.00 KiB @ 26.45 KiB/s (eta 0s ) Finished in 0.993s
(1/4) running `it_works`...
(2/4) running `it_works2`...
(3/4) running `it_works3`...
(4/4) running `it_works4`...
all tests passed! Panic: $ cargo test --test integration
Compiling krate v0.1.0 (/home/urhengulas/Documents/github.com/knurling-rs/krate)
Finished test [optimized + debuginfo] target(s) in 0.17s
Running tests/integration.rs (target/thumbv7em-none-eabihf/debug/deps/integration-1421b1a08557c90d)
Erasing sectors ✔ [00:00:00] [######################################] 12.00 KiB/12.00 KiB @ 27.83 KiB/s (eta 0s )
Programming pages ✔ [00:00:00] [######################################] 12.00 KiB/12.00 KiB @ 30.35 KiB/s (eta 0s ) Finished in 0.852s
(1/4) running `it_works`...
(2/4) running `it_works2`...
(3/4) running `it_works3`...
ERROR panicked at 'assertion failed: false'
└─ integration::tests::it_works3 @ tests/integration.rs:24
Frame 0: exp_u128 @ 0x00001b70
Frame 1: __udf @ 0x00000afe inline
./asm/lib.rs:48:1
Frame 2: __udf @ 0x0000000000000afe
./asm/lib.rs:51:17
Frame 3: udf @ 0x000002ee inline
/home/urhengulas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-0.7.7/src/asm.rs:43:5
Frame 4: panic @ 0x00000000000002ea
/home/urhengulas/Documents/github.com/knurling-rs/krate/src/lib.rs:13:5
Frame 5: panic @ 0x000002c8 inline
/home/urhengulas/.cargo/git/checkouts/defmt-7f5b74b4e6ff55d4/e36e12a/defmt/src/export/mod.rs:133:14
Frame 6: it_works3 @ 0x00000000000002c4 inline
/home/urhengulas/Documents/github.com/knurling-rs/krate/tests/integration.rs:24:9
Frame 7: __defmt_test_entry @ 0x00000000000002a6
/home/urhengulas/Documents/github.com/knurling-rs/krate/tests/integration.rs:8:1
Frame 8: fmt @ 0x0000013c
Frame 9: fmt @ 0x0000013c
Error: CPU halted unexpectedly.
error: test failed, to rerun pass `--test integration`
Caused by:
process didn't exit successfully: `probe-rs run --chip nRF52840_xxAA /home/urhengulas/Documents/github.com/knurling-rs/krate/target/thumbv7em-none-eabihf/debug/deps/integration-1421b1a08557c90d` (exit status: 1)
|
|
@jonathanpallant Can I merge? |
I have to say that the probe-run:
probe-rs
|
I will just go ahead. |
This PR makes
probe-rs
detect exit as successfully. Basically the same as knurling-rs/app-template#71.