From f1b4ffd3c8a6aa96639e196f5bccbf3bc3fc07b1 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Fri, 15 Sep 2017 03:08:36 +0200 Subject: [PATCH] Make the tests run faster again --- debian/TODO.Debian | 17 ----------------- debian/rules | 11 +++++++++-- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/debian/TODO.Debian b/debian/TODO.Debian index 15c022b48f..fb4c0a65e3 100644 --- a/debian/TODO.Debian +++ b/debian/TODO.Debian @@ -5,23 +5,6 @@ into the package, or (b) keep the patch, and further patch install.rs/step.rs so that install_std() takes a single "target" parameter; test this. -Long build time -=============== - - * Seems to be fixed with 1.17.0 and rustbuild. - - * Try to investigate the 1 hour vs 7 hour build time difference we saw between - git diff debian/1.13.0+dfsg1-2..debian/1.14.0+dfsg1-1 -- debian - - infinity0: LLVM [in Rust]? - infinity0: ./configure --enable-debug has this annoying detail that nobody has fixed yet, that it disabled optimizations - so you always have to add --enable-optimize or something like that to counteract the negative effect - unoptimized rustc is *very* slow, in fact it's my sole guess for 7 hours, assuming you didn't just simply lose 8x parallelism or something - - infinity0: -Z time-passes between two different compilers, on the same test, would also be pretty revealing - infinity0: also try timing the entire compile-fail test run between stage1/bin/rustc and stage2/bin/rustc (the latter is what running tests uses by default) - infinity0: in the old thing [pre-rustbuild makefiles] it's... make check-stage1-cfail, I think - Older backlog ============= diff --git a/debian/rules b/debian/rules index b73229548d..fcb3dbed78 100755 --- a/debian/rules +++ b/debian/rules @@ -53,6 +53,13 @@ OLD_LLVM_VERSION = 3.9 DEB_CONFIGURE_FLAGS += --llvm-root=/usr/lib/llvm-$(LLVM_VERSION) RUSTBUILD = RUST_BACKTRACE=1 ./x.py RUSTBUILD_FLAGS = --config debian/config.toml -v --on-fail env +# TODO: This should simply be "$(RUSTBUILD) test" but unfortunately this causes +# an insane blow up in the time it takes to run tests. See upstream #37477 for +# details. Upstream worked around it in #38984 but in Debian we can't take +# advantage of that work-around, because we want as much debuginfo as possible +# (so we set debuginfo-lines = true, debuginfo-only-std = false) so we have to +# work around it instead by disabling backtrace when running tests. +RUSTBUILD_TEST = ./x.py test # To run a specific test, run something like: # $ debian/rules override_dh_auto_test-arch \ # RUSTBUILD_TEST_FLAGS="src/test/run-make --test-args extern-fn-struct" @@ -224,7 +231,7 @@ override_dh_auto_test-arch: done ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES))) ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS))) - $(call RUN_TESTS,$(RUSTBUILD) test --no-fail-fast $(RUSTBUILD_FLAGS) $(RUSTBUILD_TEST_FLAGS)) + $(call RUN_TESTS,$(RUSTBUILD_TEST) --no-fail-fast $(RUSTBUILD_FLAGS) $(RUSTBUILD_TEST_FLAGS)) # don't continue if RUSTBUILD_TEST_FLAGS is non-empty test -z "$(RUSTBUILD_TEST_FLAGS)" endif @@ -235,7 +242,7 @@ ifneq (,$(BUILD_DOCS)) ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES))) ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS))) # Run all rules that test the docs, i.e. in step.rs that depend on default:doc - $(call RUN_TESTS,$(RUSTBUILD) test --no-fail-fast src/tools/linkchecker $(RUSTBUILD_FLAGS)) + $(call RUN_TESTS,$(RUSTBUILD_TEST) --no-fail-fast src/tools/linkchecker $(RUSTBUILD_FLAGS)) endif endif endif