From 540f2411e6f9f039b5e4cd4369bfddf0a0479731 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 31 Mar 2024 10:32:29 +0200 Subject: [PATCH] show the time that the main CI steps take --- src/tools/miri/ci/ci.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/miri/ci/ci.sh b/src/tools/miri/ci/ci.sh index 4e94ca41b7ff..2cd918fc2b15 100755 --- a/src/tools/miri/ci/ci.sh +++ b/src/tools/miri/ci/ci.sh @@ -60,9 +60,9 @@ function run_tests { ## ui test suite if [ -n "${GC_STRESS-}" ]; then - MIRIFLAGS="${MIRIFLAGS-} -Zmiri-provenance-gc=1" ./miri test + time MIRIFLAGS="${MIRIFLAGS-} -Zmiri-provenance-gc=1" ./miri test else - ./miri test + time ./miri test fi ## advanced tests @@ -73,18 +73,18 @@ function run_tests { # them. Also error locations change so we don't run the failing tests. # We explicitly enable debug-assertions here, they are disabled by -O but we have tests # which exist to check that we panic on debug assertion failures. - MIRIFLAGS="${MIRIFLAGS-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test -- tests/{pass,panic} + time MIRIFLAGS="${MIRIFLAGS-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test -- tests/{pass,panic} fi if [ -n "${MANY_SEEDS-}" ]; then # Also run some many-seeds tests. 64 seeds means this takes around a minute per test. # (Need to invoke via explicit `bash -c` for Windows.) - for FILE in tests/many-seeds/*.rs; do + time for FILE in tests/many-seeds/*.rs; do MIRI_SEEDS=$MANY_SEEDS ./miri many-seeds "$BASH" -c "./miri run '$FILE'" done fi if [ -n "${TEST_BENCH-}" ]; then # Check that the benchmarks build and run, but without actually benchmarking. - HYPERFINE="'$BASH' -c" ./miri bench + time HYPERFINE="'$BASH' -c" ./miri bench fi ## test-cargo-miri @@ -106,7 +106,7 @@ function run_tests { echo 'build.rustc-wrapper = "thisdoesnotexist"' > .cargo/config.toml fi # Run the actual test - ${PYTHON} test-cargo-miri/run-test.py + time ${PYTHON} test-cargo-miri/run-test.py # Clean up unset RUSTC MIRI rm -rf .cargo