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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 13A9C158041 for ; Sat, 23 Mar 2024 15:43:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ABA17E2A38; Sat, 23 Mar 2024 15:43:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 76D0FE2A34 for ; Sat, 23 Mar 2024 15:43:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 602C634301D for ; Sat, 23 Mar 2024 15:43:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C2F9F15D0 for ; Sat, 23 Mar 2024 15:42:59 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1711208450.abf8e2ee55c52c8ae894e0b3845ea1cebfcfd4e8.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: abf8e2ee55c52c8ae894e0b3845ea1cebfcfd4e8 X-VCS-Branch: master Date: Sat, 23 Mar 2024 15:42:59 +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: 6b318348-2c8a-4542-9055-fcb251b2e4e6 X-Archives-Hash: 0e13449cfbe2ab964b0951d63498a306 commit: abf8e2ee55c52c8ae894e0b3845ea1cebfcfd4e8 Author: Sam James gentoo org> AuthorDate: Sat Mar 16 01:38:45 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat Mar 23 15:40:50 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abf8e2ee toolchain.eclass: install test results as orphaned files in /var/cache/gcc This allows comparison across versions even after they get upgraded, which is useful in itself (and across series), but also for looking into when regressions started if they're reported but started a while ago. Followup to 9ac3f1cf62b522236ba9efd7e923071c37df1e6d. Bug: https://bugs.gentoo.org/214345 Bug: https://bugs.gentoo.org/253926 Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index c8543c617ccd..699e647c693a 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -2100,16 +2100,9 @@ toolchain_src_install() { pax-mark -r "${ED}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1plus" if use test ; then - # TODO: In future, install orphaned to allow comparison across - # more versions even after unmerged? Also would be useful for - # historical records and tracking down regressions a while - # after they first appeared, but were only just reported. - einfo "Copying test results to ${EPREFIX}/var/cache/gcc/${CHOST}/${SLOT} for future comparison" - ( - dodir /var/cache/gcc/${CHOST}/${SLOT} - cd "${WORKDIR}"/build || die - find . -name \*.sum -exec cp --parents -v {} "${ED}"/var/cache/gcc/${CHOST}/${SLOT} \; - ) + mkdir "${T}"/test-results || die + cd "${WORKDIR}"/build || die + find . -name \*.sum -exec cp --parents -v {} "${T}"/test-results \; fi } @@ -2262,6 +2255,23 @@ create_revdep_rebuild_entry() { EOF } +#---->> pkg_pre* <<---- + +toolchain_pkg_preinst() { + if use test ; then + # Install as orphaned to allow comparison across more + # versions even after unmerged. Also useful for historical records + # and tracking down regressions a while after they first appeared, + # but were only just reported. + einfo "Copying test results to ${BROOT}/var/cache/gcc/${CHOST}/${SLOT} for future comparison" + ( + mkdir -p "${BROOT}"/var/cache/gcc/${CHOST}/${SLOT} || die + cd "${T}"/test-results || die + find . -name \*.sum -exec cp --parents -v {} "${BROOT}"/var/cache/gcc/${CHOST}/${SLOT} \; + ) + fi +} + #---->> pkg_post* <<---- toolchain_pkg_postinst() { @@ -2515,4 +2525,4 @@ fi # enabled-by-default state: # econf $(usex foo '' --disable-foo) -EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm +EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm