From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B836313835A for ; Wed, 7 Oct 2020 06:58:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17EAEE0905; Wed, 7 Oct 2020 06:58:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F37FDE0905 for ; Wed, 7 Oct 2020 06:58:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 00A27340E29 for ; Wed, 7 Oct 2020 06:58:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA63E332 for ; Wed, 7 Oct 2020 06:58:50 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1602053914.9e3b4eb2e403a3ed5aa7ab0a19c05782cd198868.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust/rust-1.46.0.ebuild X-VCS-Directories: dev-lang/rust/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 9e3b4eb2e403a3ed5aa7ab0a19c05782cd198868 X-VCS-Branch: master Date: Wed, 7 Oct 2020 06:58:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2b7df5aa-f242-48a0-90f9-ffe4ad85f00e X-Archives-Hash: 89085c7ef6758f13029f8ce027a42057 commit: 9e3b4eb2e403a3ed5aa7ab0a19c05782cd198868 Author: Georgy Yakovlev gentoo org> AuthorDate: Wed Oct 7 06:05:30 2020 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Wed Oct 7 06:58:34 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e3b4eb2 dev-lang/rust: rework src_test Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Georgy Yakovlev gentoo.org> dev-lang/rust/rust-1.46.0.ebuild | 69 ++++++++++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/dev-lang/rust/rust-1.46.0.ebuild b/dev-lang/rust/rust-1.46.0.ebuild index 68cc5bb4cb2..7490fabdab7 100644 --- a/dev-lang/rust/rust-1.46.0.ebuild +++ b/dev-lang/rust/rust-1.46.0.ebuild @@ -114,8 +114,7 @@ QA_SONAME=" usr/lib.*/${P}/rustlib/.*/lib/lib.*.so.* " -# tests need a bit more work, currently they are causing multiple -# re-compilations and somewhat fragile. +# still disabled, almost ready to enable RESTRICT="test" PATCHES=( @@ -419,19 +418,57 @@ src_compile() { } src_test() { - env $(cat "${S}"/config.env) RUST_BACKTRACE=1\ - "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml -j$(makeopts_jobs) --no-doc --no-fail-fast \ - src/test/codegen \ - src/test/codegen-units \ - src/test/compile-fail \ - src/test/incremental \ - src/test/mir-opt \ - src/test/pretty \ - src/test/run-fail \ - src/test/run-make \ - src/test/run-make-fulldeps \ - src/test/ui \ - src/test/ui-fulldeps || die + # https://rustc-dev-guide.rust-lang.org/tests/intro.html + + # those are basic and codegen tests. + local tests=( + codegen + codegen-units + compile-fail + incremental + mir-opt + pretty + run-make + ) + + # known to fail with system-llvm sometimes + # system-llvm is stable-masked for time-being + # so only test internal one. + use system-llvm || tests+=( assembly ) + + # fragile/expensive/less important tests + # or tests that require extra build time + # TODO: instead of skipping, just make some nonfatal. + if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then + tests+=( + rustdoc + rustdoc-js + rustdoc-js-std + rustdoc-ui + run-make-fulldeps + ui + ui-fulldeps + ) + fi + + local i failed=() + einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}" + for i in "${tests[@]}"; do + local t="src/test/${i}" + einfo "rust_src_test: running ${t}" + if ! nonfatal env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \ + "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \ + -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"; then + + failed+=( "${t}" ) + eerror "rust_src_test: ${t} failed" + fi + done + + if [[ ${#failed[@]} -ne 0 ]]; then + eerror "rust_src_test: failure summary: ${failed[@]}" + die "aborting due to test failures" + fi } src_install() { @@ -478,7 +515,7 @@ src_install() { rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) mkdir -p "${ED}/usr/${abi_libdir}/${P}" cp "${ED}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \ - "${ED}/usr/${abi_libdir}/${P}" || die + "${ED}/usr/${abi_libdir}/${P}" || die done # versioned libdir/mandir support