Rollup merge of #73142 - ehuss:std-benches, r=dtolnay

Ensure std benchmarks get tested.

This ensures that the std benchmarks don't break in the future. Currently they aren't compiled or tested on CI, so they can easily bitrot.  Testing a benchmark runs it with one iteration. Adding these should only add a few seconds to CI.

Closes #54176
Closes #61913
This commit is contained in:
Ralf Jung 2020-06-19 08:56:08 +02:00 committed by GitHub
commit 78f3e9c344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,7 @@ path = "../liballoc/tests/lib.rs"
[[bench]]
name = "collectionsbenches"
path = "../liballoc/benches/lib.rs"
test = true
[[bench]]
name = "vec_deque_append_bench"

View File

@ -19,6 +19,7 @@ path = "../libcore/tests/lib.rs"
[[bench]]
name = "corebenches"
path = "../libcore/benches/lib.rs"
test = true
[dev-dependencies]
rand = "0.7"

View File

@ -1,3 +1,5 @@
// wasm32 does not support benches (no time).
#![cfg(not(target_arch = "wasm32"))]
#![feature(flt2dec)]
#![feature(test)]

View File

@ -74,3 +74,8 @@ std_detect_dlsym_getauxval = []
threads = 125
# Maximum heap size
heap_size = 0x8000000
[[bench]]
name = "stdbenches"
path = "benches/lib.rs"
test = true