mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
12e6bcfcab
Before this fix we applied padding before manually doing what `convert_benchmarks_to_tests()` does. Instead use `convert_benchmarks_to_tests()` if applicable and then apply padding afterwards so it becomes correct. (Benches should only be padded when run as benches to make it easy to compare the benchmark numbers.)
15 lines
594 B
Makefile
15 lines
594 B
Makefile
# ignore-cross-compile because we run the compiled code
|
|
# needs-unwind because #[bench] and -Cpanic=abort requires -Zpanic-abort-tests
|
|
include ../tools.mk
|
|
|
|
NORMALIZE=sed 's%[0-9,]\{1,\} ns/iter (+/- [0-9,]\{1,\})%?? ns/iter (+/- ??)%' | sed 's%finished in [0-9\.]\{1,\}%finished in ??%'
|
|
|
|
all:
|
|
$(RUSTC) --test tests.rs
|
|
|
|
$(call RUN,tests) --test-threads=1 | $(NORMALIZE) > "$(TMPDIR)"/test.stdout
|
|
$(RUSTC_TEST_OP) "$(TMPDIR)"/test.stdout test.stdout
|
|
|
|
$(call RUN,tests) --test-threads=1 --bench | $(NORMALIZE) > "$(TMPDIR)"/bench.stdout
|
|
$(RUSTC_TEST_OP) "$(TMPDIR)"/bench.stdout bench.stdout
|