summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-04-30 04:16:07 +0100
committerSam James <sam@gentoo.org>2024-05-01 01:26:20 +0100
commit467c2e2e91f66157ebfc278d7726827c3d8a6e3b (patch)
tree7ea9722af112e8ef2a438ee9dec071ecf14a068d /eclass/toolchain.eclass
parentgames-board/pychess: 1.0.5 (diff)
downloadgentoo-467c2e2e91f66157ebfc278d7726827c3d8a6e3b.tar.gz
gentoo-467c2e2e91f66157ebfc278d7726827c3d8a6e3b.tar.bz2
gentoo-467c2e2e91f66157ebfc278d7726827c3d8a6e3b.zip
toolchain.eclass: iterate over older slots if test manifest doesn't exist
Iterate over all known slots (at least those using the "new" SLOT value from --with-major-version-only since ~GCC 10 in Gentoo) if we couldn't find a test manifest for GCC_TESTS_COMPARISON_SLOT, rather than expecting pristine results. This makes life easier when installing a new slot (or newly enabling tests for one). It's *particularly* useful, I think, for arch testers who might want to establish a baseline once but not have to keep doing it across many chroots for each new slot. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass12
1 files changed, 11 insertions, 1 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 4d057de7a0f3..645e18ff27ca 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1930,7 +1930,17 @@ toolchain_src_test() {
--manifest="${T}"/${CHOST}.xfail \
--produce_manifest &> /dev/null
- local manifest="${GCC_TESTS_COMPARISON_DIR}/${GCC_TESTS_COMPARISON_SLOT}/${CHOST}.xfail"
+ # If there's no manifest available, check older slots, as it's better
+ # than nothing. We start with 10 for the fallback as the first version
+ # we started using --with-major-version-only.
+ local possible_slot
+ for possible_slot in "${GCC_TESTS_COMPARISON_SLOT}" $(seq ${SLOT} -1 10) ; do
+ [[ -f "${GCC_TESTS_COMPARISON_DIR}/${possible_slot}/${CHOST}.xfail" ]] && break
+ done
+ if [[ ${possible_slot} != "${GCC_TESTS_COMPARISON_SLOT}" ]] ; then
+ ewarn "Couldn't find manifest for ${GCC_TESTS_COMPARISON_SLOT}; falling back to ${possible_slot}"
+ fi
+ local manifest="${GCC_TESTS_COMPARISON_DIR}/${possible_slot}/${CHOST}.xfail"
if [[ -f "${manifest}" ]] ; then
# TODO: Distribute some baseline results in e.g. gcc-patches.git?