commit:     0af10f80d825e200319b1d910d49984ec40246e6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 29 17:26:13 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 29 17:28:10 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0af10f80

dev-libs/boost: apply "keep-going" for tests

Run the whole testsuite and print errors at the end. We generally want
these semantics for testsuites so that e.g. if one failure occurs, we can
look to see if there's another "easier" one to analyse. Plus, people
running the testsuite generally don't mind if it takes a bit longer as long
as it's not unreasonable (people don't broadly want fail-fast for it;
they don't want to know some e.g. linter test failed but not find out later
that some critical core functionality test later didn't fail as it never
got run).

Could maybe trim the test summary failure output to drop the path
but not going to bother for now.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/boost/boost-1.88.0.ebuild | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/dev-libs/boost/boost-1.88.0.ebuild 
b/dev-libs/boost/boost-1.88.0.ebuild
index 0ac724b61c97..8d1aa15874dc 100644
--- a/dev-libs/boost/boost-1.88.0.ebuild
+++ b/dev-libs/boost/boost-1.88.0.ebuild
@@ -340,15 +340,26 @@ multilib_src_test() {
 
        # Finally build & run all test suites
        einfo "Running the following tests: ${lib_names[*]}"
+
+       local failed_tests=()
        for lib in "${libs[@]}"; do
                # Skip libraries without test directory
                [[ ! -d "${lib}/test" ]] && continue
 
                # Move into library test dir & run all tests
                pushd "${lib}/test" >/dev/null || die
-                       edob -m "Running tests in: $(pwd)" ejam 
--prefix="${EPREFIX}"/usr "${TEST_OPTIONS[@]}"
-               popd >/dev/null
+               nonfatal edob -m "Running tests in: $(pwd)" ejam 
--prefix="${EPREFIX}"/usr "${TEST_OPTIONS[@]}" || failed_tests+=( "${lib}" )
+               popd >/dev/null || die
        done
+
+       if (( ${#failed_tests[@]} )); then
+               eerror "Failed tests. Printing summary."
+               local failed_test
+               for failed_test in "${failed_tests[@]}" ; do
+                       eerror "Failed test: ${failed_test}"
+               done
+               die "Tests failed."
+       fi
 }
 
 multilib_src_install() {

Reply via email to