Skip to content

Commit

Permalink
address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
keks committed Oct 16, 2024
1 parent 2185158 commit e11f0a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions libcrux-iot-testutil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ This crate provides utils for testing and benchmarking on embedded hardware.
Utilities that are implemented right now:

- Test and Benchmark Runner

To receive output from test/benchmark binary `$bin` be sure to set `DEFMT_LOG=info`,
e.g. by running the test/benchmark as `DEFMT_LOG=info cargo rb $bin`.
10 changes: 7 additions & 3 deletions libcrux-iot-testutil/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
//! run tests and benchmarks on microcontrollers, where we don't have the
//! standard rust test runner available.
//!
//! The crate will support both tests and benchmarks, but so far only tests are
//! implemented.
//!
//! The core types in this crate are the [`TestConfig`] and the [`TestSuite`].
//! The test config contains information on the system and configures how the
//! tests are run. The test suite contains all the tests that can be run.
Expand Down Expand Up @@ -250,9 +247,16 @@ impl<'a, L: EventLogger, E: Display, S> TestSuite<'a, L, E, S> {
/// The test config contains information on the system and settings that control
/// how the tests are run.
pub struct TestConfig<'a> {
/// The core frequency used when benchmarking, so we can reconstruct the actual time passed
/// of running the benchmark.
pub core_freq: u32,
/// The number of runs used for each benchmark.
pub benchmark_runs: u32,
/// Only run benchmarks that are in the provided list.
pub only_names: Vec<&'a str>,
/// If true, the runner aborts on first error. If not, it runs all the tests or benchmarks and
/// either returns `Ok(())` (in case of no errors) or `Err(ErrorReport::Combined(_))` which
/// contains all the errors that were encountered.
pub early_abort: bool,
}

Expand Down

0 comments on commit e11f0a7

Please sign in to comment.