Make the tests run faster again

This commit is contained in:
Ximin Luo 2017-09-15 03:08:36 +02:00
parent 2243380e74
commit f1b4ffd3c8
2 changed files with 9 additions and 19 deletions

17
debian/TODO.Debian vendored
View File

@ -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
<eddyb> infinity0: LLVM [in Rust]?
<eddyb> infinity0: ./configure --enable-debug has this annoying detail that nobody has fixed yet, that it disabled optimizations
<eddyb> so you always have to add --enable-optimize or something like that to counteract the negative effect
<eddyb> 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
<eddyb> infinity0: -Z time-passes between two different compilers, on the same test, would also be pretty revealing
<eddyb> 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)
<eddyb> infinity0: in the old thing [pre-rustbuild makefiles] it's... make check-stage1-cfail, I think
Older backlog
=============

11
debian/rules vendored
View File

@ -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