diff --git a/earthly/rust/scripts/std_build.py b/earthly/rust/scripts/std_build.py index e8d3e38ba..070a22a1d 100755 --- a/earthly/rust/scripts/std_build.py +++ b/earthly/rust/scripts/std_build.py @@ -87,7 +87,7 @@ def cargo_llvm_cov( def cargo_bench(flags: str, verbose: bool = False) -> exec_manager.Result: return exec_manager.cli_run( - "cargo bench " + f"{flags} ", + "cargo bench --all-targets --no-fail-fast" + f"{flags} ", name="Benchmarks all run to completion check", verbose=verbose, ) diff --git a/earthly/rust/stdcfgs/cargo_config.toml b/earthly/rust/stdcfgs/cargo_config.toml index 02c231407..6641db1fa 100644 --- a/earthly/rust/stdcfgs/cargo_config.toml +++ b/earthly/rust/stdcfgs/cargo_config.toml @@ -77,8 +77,8 @@ lint-vscode = "clippy --message-format=json-diagnostic-rendered-ansi --all-targe docs = "doc --release --no-deps --document-private-items --bins --lib --examples" # nightly docs build broken... when they are'nt we can enable these docs... --unit-graph --timings=html,json -Z unstable-options" -testunit = "nextest run --release --bins --lib --tests --benches --no-fail-fast -P ci" -testcov = "llvm-cov nextest --release --bins --lib --tests --benches --no-fail-fast -P ci" +testunit = "nextest run --release --bins --lib --tests --no-fail-fast -P ci" +testcov = "llvm-cov nextest --release --bins --lib --tests --no-fail-fast -P ci" testdocs = "test --doc --release" # Rust formatting, MUST be run with +nightly diff --git a/examples/rust/.cargo/config.toml b/examples/rust/.cargo/config.toml index 02c231407..6641db1fa 100644 --- a/examples/rust/.cargo/config.toml +++ b/examples/rust/.cargo/config.toml @@ -77,8 +77,8 @@ lint-vscode = "clippy --message-format=json-diagnostic-rendered-ansi --all-targe docs = "doc --release --no-deps --document-private-items --bins --lib --examples" # nightly docs build broken... when they are'nt we can enable these docs... --unit-graph --timings=html,json -Z unstable-options" -testunit = "nextest run --release --bins --lib --tests --benches --no-fail-fast -P ci" -testcov = "llvm-cov nextest --release --bins --lib --tests --benches --no-fail-fast -P ci" +testunit = "nextest run --release --bins --lib --tests --no-fail-fast -P ci" +testcov = "llvm-cov nextest --release --bins --lib --tests --no-fail-fast -P ci" testdocs = "test --doc --release" # Rust formatting, MUST be run with +nightly diff --git a/examples/rust/crates/foo/benches/benchmark.rs b/examples/rust/crates/foo/benches/benchmark.rs index a38955b36..44f2086a9 100644 --- a/examples/rust/crates/foo/benches/benchmark.rs +++ b/examples/rust/crates/foo/benches/benchmark.rs @@ -1,11 +1,6 @@ //! Simple benchmark example use criterion::{black_box, criterion_group, criterion_main, Criterion}; -#[test] -fn test_fibonacci() { - assert_eq!(fibonacci(20), 6765); -} - /// fibonacci calculates the nth fibonacci number fn fibonacci(n: u64) -> u64 { match n {