commit:     0390031b2adea88a52b0559e177cfc0cee09bb6c
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  1 18:43:15 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Tue Aug  1 18:53:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0390031b

dev-lang/nim: update test strategy - fail at the end

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 dev-lang/nim/nim-1.6.14-r1.ebuild | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/dev-lang/nim/nim-1.6.14-r1.ebuild 
b/dev-lang/nim/nim-1.6.14-r1.ebuild
index bf22ccb6ecfe..85bb540e41e0 100644
--- a/dev-lang/nim/nim-1.6.14-r1.ebuild
+++ b/dev-lang/nim/nim-1.6.14-r1.ebuild
@@ -152,28 +152,35 @@ src_test() {
        # AdditionalCategories from "testament/categories.nim".
        categories+=( debugger examples lib )
 
-       local tcat checkpoint
+       local test_return=0
+
+       local tcat
+       local checkpoint
        for tcat in "${categories[@]}"; do
                # Use checkpoints for less painful testing.
                checkpoint="${T}/.testament-${tcat}"
+
                [[ -f "${checkpoint}" ]] && continue
 
                case ${tcat} in
                        testdata )
                                :
-                       ;;
+                               ;;
                        arc | ic | valgrind )
                                einfo "Skipped category '${tcat}'"
                                ;;
                        * )
                                einfo "Running tests in category '${tcat}'"
-                               edo ./bin/testament "${testament_args[@]}" \
-                                       category "${tcat}" "${nimflags[@]}"
+                               nonfatal edo ./bin/testament 
"${testament_args[@]}" \
+                                                category "${tcat}" 
"${nimflags[@]}" || test_return=1
                                ;;
                esac
 
                touch "${checkpoint}" || die
        done
+
+       [[ "${test_return}" -eq 1 ]] &&
+               die "tests failed, please inspect the failed test categories 
above"
 }
 
 src_install() {

Reply via email to