about summary refs log tree commit diff
path: root/tests/run-make/libtest-padding
diff options
context:
space:
mode:
authorMartin Nordholts <martin.nordholts@codetale.se>2023-12-02 18:24:37 +0100
committerMartin Nordholts <martin.nordholts@codetale.se>2023-12-07 19:24:58 +0100
commit12e6bcfcabee7bfa9130bb5fcd4b8ab23172b1ee (patch)
tree784c1bbc4943eb14b86db9189c96e6b5e66925b7 /tests/run-make/libtest-padding
parent4db40579baa1d69116e3ce7863951e36d1ddf425 (diff)
downloadrust-12e6bcfcabee7bfa9130bb5fcd4b8ab23172b1ee.tar.gz
rust-12e6bcfcabee7bfa9130bb5fcd4b8ab23172b1ee.zip
libtest: Fix padding of benchmarks run as tests
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.)
Diffstat (limited to 'tests/run-make/libtest-padding')
-rw-r--r--tests/run-make/libtest-padding/Makefile2
-rw-r--r--tests/run-make/libtest-padding/test.stdout2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/run-make/libtest-padding/Makefile b/tests/run-make/libtest-padding/Makefile
index 063d0dc0a6c..42bc1192925 100644
--- a/tests/run-make/libtest-padding/Makefile
+++ b/tests/run-make/libtest-padding/Makefile
@@ -2,7 +2,7 @@
 # needs-unwind because #[bench] and -Cpanic=abort requires -Zpanic-abort-tests
 include ../tools.mk
 
-NORMALIZE=sed 's%[0-9,]\+ ns/iter (+/- [0-9,]\+)%?? ns/iter (+/- ??)%' | sed 's%finished in [0-9\.]\+%finished in ??%'
+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
diff --git a/tests/run-make/libtest-padding/test.stdout b/tests/run-make/libtest-padding/test.stdout
index c655f034756..8ffc810f6cd 100644
--- a/tests/run-make/libtest-padding/test.stdout
+++ b/tests/run-make/libtest-padding/test.stdout
@@ -1,6 +1,6 @@
 
 running 4 tests
-test short_bench_name                 ... ok
+test short_bench_name ... ok
 test short_test_name ... ok
 test this_is_a_really_long_bench_name ... ok
 test this_is_a_really_long_test_name ... ok