docs.rs failed to build embedded-test-0.2.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
embedded-test-0.7.0
Embedded Test
The embedded-test library provides a test hardness for embedded systems (riscv and arm). It is based on the idea of defmt-test.
probe-rs test provides a (libtest compatible) test runner, which will:
- Flash all the tests to the device in one go (via probe-rs)
- Request information about all tests from the device (via semihosting SYS_GET_CMDLINE)
- In turn for each testcase:
- Reset the device
- Signal to the device (via semihosting SYS_GET_CMDLINE) which test to run
- Wait for the device to signal that the test completed successfully or with error (via semihosting SYS_EXIT)
- Report the results
Since the test runner (probe-rs test) is libtest compatible (using libtest-mimic), you can use intellij or vscode to run individual tests with the click of a button.

WARNING
This project is in development state. Don't rely on it for anything important yet.
Features
- Runs each test case individually, and resets the device between each test case
- Supports an init function which will be called before each test case and can pass state to the test cases
- Supports async test and init functions (needs feature
embassy) - Support
#[should_panic],#[ignore]and#[timeout(<seconds>)]attributes for each test case
Usage
Add the following to your Cargo.toml:
[[]]
= "example_test"
= false
[]
= {="0.2.0", = ["log"]} # enable log or defmt to see some debug output
= { = "https://github.com/t-moe/defmt"} # the upstream create does not support riscv yet
Install the runner on your system:
Add the following to your .cargo/config.toml:
[]
# Syntax is: probe-rs test <flash settings> -- <elf> <libtest args>
= "probe-rs test --chip esp32c6 -- "
Then you can run your tests with cargo test or use the button in vscode/intellij.
Example Test
Example for tests/example_test.rs