mirror of https://github.com/rust-lang/rust.git
rewrite test-benches to rmake
This commit is contained in:
parent
3811f40d27
commit
7b19389d58
|
@ -100,7 +100,6 @@ run-make/staticlib-dylib-linkage/Makefile
|
|||
run-make/symbol-mangling-hashed/Makefile
|
||||
run-make/symbol-visibility/Makefile
|
||||
run-make/sysroot-crates-are-unstable/Makefile
|
||||
run-make/test-benches/Makefile
|
||||
run-make/thumb-none-cortex-m/Makefile
|
||||
run-make/thumb-none-qemu/Makefile
|
||||
run-make/translation/Makefile
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
include ../tools.mk
|
||||
|
||||
# ignore-cross-compile
|
||||
# needs-unwind #[bench] and -Zpanic-abort-tests can't be combined
|
||||
|
||||
all:
|
||||
# Smoke-test that `#[bench]` isn't entirely broken.
|
||||
$(RUSTC) --test smokebench.rs -O
|
||||
$(call RUN,smokebench --bench)
|
||||
$(call RUN,smokebench --bench noiter)
|
||||
$(call RUN,smokebench --bench yesiter)
|
||||
$(call RUN,smokebench)
|
|
@ -0,0 +1,21 @@
|
|||
// #[bench] is a Rust feature to run benchmarks on performance-critical
|
||||
// code, which previously experienced a runtime panic bug in #103794.
|
||||
// In order to ensure future breakages of this feature are detected, this
|
||||
// smoke test was created, using the benchmarking feature with various
|
||||
// runtime flags.
|
||||
// See https://github.com/rust-lang/rust/issues/103794
|
||||
|
||||
//@ ignore-cross-compile
|
||||
// Reason: the compiled binary is executed
|
||||
//@ needs-unwind
|
||||
// Reason: #[bench] and -Zpanic-abort-tests can't be combined
|
||||
|
||||
use run_make_support::{run, run_with_args, rustc};
|
||||
|
||||
fn main() {
|
||||
rustc().arg("--test").input("smokebench.rs").opt().run();
|
||||
run_with_args("smokebench", &["--bench"]);
|
||||
run_with_args("smokebench", &["--bench", "noiter"]);
|
||||
run_with_args("smokebench", &["--bench", "yesiter"]);
|
||||
run("smokebench");
|
||||
}
|
Loading…
Reference in New Issue