Fix arch-indep and arch-dep tests

This commit is contained in:
Ximin Luo 2017-06-14 09:10:25 +02:00
parent 26923695fc
commit 7958f3dbfd
4 changed files with 36 additions and 10 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
rustc (1.17.0+dfsg2-4) UNRELEASED; urgency=medium
* Fix arch-indep and arch-dep tests.
-- Ximin Luo <infinity0@debian.org> Wed, 14 Jun 2017 03:17:35 +0200
rustc (1.17.0+dfsg2-3) experimental; urgency=medium
* Try to force the real gdb package. Some resolvers like aspcud will select

View File

@ -11,6 +11,7 @@ u-ignoretest-ppc64el.patch
u-fix-weird-arm-logic.diff
u-fix-debuginfo.patch
u-allow-stable-features.patch
u-only-run-linkchecker-if-docs.patch
gcc-4.8-aarch64-ice.diff

View File

@ -0,0 +1,17 @@
Description: Only run check-linkchecker when actually building docs
Otherwise the build fails, when running tests but not building docs
Author: Ximin Luo <infinity0@debian.org>
Bug: https://github.com/rust-lang/rust/pull/42651
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/bootstrap/step.rs
+++ b/src/bootstrap/step.rs
@@ -460,7 +460,7 @@
rules.test("check-linkchecker", "src/tools/linkchecker")
.dep(|s| s.name("tool-linkchecker").stage(0))
.dep(|s| s.name("default:doc"))
- .default(true)
+ .default(build.config.docs)
.host(true)
.run(move |s| check::linkcheck(build, s.target));
rules.test("check-cargotest", "src/tools/cargotest")

22
debian/rules vendored
View File

@ -149,12 +149,8 @@ ifneq (,$(BUILD_DOCS))
$(RUSTBUILD) doc $(RUSTBUILD_FLAGS)
endif
override_dh_auto_test-arch:
ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Use non-parallel $(MAKE) here instead of dh_auto_test, otherwise the upstream
# Makefile will try to run N instances of the testrunner each of which will run
# N instances of rustc (there is also parallel logic in libtest.rs already).
if RUST_BACKTRACE=1 $(RUSTBUILD) test $(RUSTBUILD_FLAGS); then \
RUN_TESTS = \
if $(1); then \
: ; \
elif [ $(DEB_VENDOR) = "Debian" -a $(DEB_DISTRIBUTION) != "experimental" ]; then \
false; \
@ -165,13 +161,19 @@ ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
echo "WARNING: Ignoring test failures in the rust testsuite"; \
echo "====================================================="; \
fi
override_dh_auto_test-arch:
ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
$(call RUN_TESTS,RUST_BACKTRACE=1 $(RUSTBUILD) test $(RUSTBUILD_FLAGS))
endif
# No tests are applicable when only building arch:all packages.
# More specifically: when we do an arch-all build, some crates are not built.
# This makes some arch-dependent tests fail, so don't run them here.
override_dh_auto_test-indep:
true
ifneq (,$(BUILD_DOCS))
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,RUST_BACKTRACE=1 $(RUSTBUILD) test src/tools/linkchecker $(RUSTBUILD_FLAGS))
endif
endif
override_dh_auto_install:
DESTDIR=$(DEB_DESTDIR) $(RUSTBUILD) dist $(RUSTBUILD_FLAGS) --install