diff options
author | Sam James <sam@gentoo.org> | 2024-03-16 01:38:45 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-03-23 15:40:50 +0000 |
commit | abf8e2ee55c52c8ae894e0b3845ea1cebfcfd4e8 (patch) | |
tree | 87e2e76457208cc12293b7730dbfab6baba80077 /eclass | |
parent | toolchain.eclass: add CHOST to test data path (diff) | |
download | gentoo-abf8e2ee55c52c8ae894e0b3845ea1cebfcfd4e8.tar.gz gentoo-abf8e2ee55c52c8ae894e0b3845ea1cebfcfd4e8.tar.bz2 gentoo-abf8e2ee55c52c8ae894e0b3845ea1cebfcfd4e8.zip |
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 <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 32 |
1 files 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 |