Skip to content

Commit dce4d12

Browse files
authored
feat(rust): Update disable running benchmarks with nextest and llvm-cov (#339)
* update cargo config.toml file * wip
1 parent 6f05e44 commit dce4d12

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

earthly/rust/scripts/std_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def cargo_llvm_cov(
8787

8888
def cargo_bench(flags: str, verbose: bool = False) -> exec_manager.Result:
8989
return exec_manager.cli_run(
90-
"cargo bench " + f"{flags} ",
90+
"cargo bench --all-targets --no-fail-fast" + f"{flags} ",
9191
name="Benchmarks all run to completion check",
9292
verbose=verbose,
9393
)

earthly/rust/stdcfgs/cargo_config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ lint-vscode = "clippy --message-format=json-diagnostic-rendered-ansi --all-targe
7777

7878
docs = "doc --release --no-deps --document-private-items --bins --lib --examples"
7979
# nightly docs build broken... when they are'nt we can enable these docs... --unit-graph --timings=html,json -Z unstable-options"
80-
testunit = "nextest run --release --bins --lib --tests --benches --no-fail-fast -P ci"
81-
testcov = "llvm-cov nextest --release --bins --lib --tests --benches --no-fail-fast -P ci"
80+
testunit = "nextest run --release --bins --lib --tests --no-fail-fast -P ci"
81+
testcov = "llvm-cov nextest --release --bins --lib --tests --no-fail-fast -P ci"
8282
testdocs = "test --doc --release"
8383

8484
# Rust formatting, MUST be run with +nightly

examples/rust/.cargo/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ lint-vscode = "clippy --message-format=json-diagnostic-rendered-ansi --all-targe
7777

7878
docs = "doc --release --no-deps --document-private-items --bins --lib --examples"
7979
# nightly docs build broken... when they are'nt we can enable these docs... --unit-graph --timings=html,json -Z unstable-options"
80-
testunit = "nextest run --release --bins --lib --tests --benches --no-fail-fast -P ci"
81-
testcov = "llvm-cov nextest --release --bins --lib --tests --benches --no-fail-fast -P ci"
80+
testunit = "nextest run --release --bins --lib --tests --no-fail-fast -P ci"
81+
testcov = "llvm-cov nextest --release --bins --lib --tests --no-fail-fast -P ci"
8282
testdocs = "test --doc --release"
8383

8484
# Rust formatting, MUST be run with +nightly

examples/rust/crates/foo/benches/benchmark.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
//! Simple benchmark example
22
use criterion::{black_box, criterion_group, criterion_main, Criterion};
33

4-
#[test]
5-
fn test_fibonacci() {
6-
assert_eq!(fibonacci(20), 6765);
7-
}
8-
94
/// fibonacci calculates the nth fibonacci number
105
fn fibonacci(n: u64) -> u64 {
116
match n {

0 commit comments

Comments
 (0)