From a1426529608c7ca3d8fed4fb971d1dc9db121c0d Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Fri, 14 Oct 2022 17:40:31 +0200 Subject: [PATCH] Fix https://github.com/easybuilders/easybuild-easyblocks/issues/2802 using improved regex --- easybuild/easyblocks/p/pytorch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/p/pytorch.py b/easybuild/easyblocks/p/pytorch.py index ec4ee9ad97a..42ed999e857 100644 --- a/easybuild/easyblocks/p/pytorch.py +++ b/easybuild/easyblocks/p/pytorch.py @@ -303,9 +303,9 @@ def get_count_for_pattern(regex, text): # Loop over the second pattern to count failures/errors for summary in summary_matches_pattern2: - failures = get_count_for_pattern(r"^.*(?P[0-9]+) failed.*$", summary[0]) + failures = get_count_for_pattern(r"^.*[^0-9](?P[0-9]+) failed.*$", summary[0]) failure_cnt += failures - errs = get_count_for_pattern(r"^.*(?P[0-9]+) error.*$", summary[0]) + errs = get_count_for_pattern(r"^.*[^0-9](?P[0-9]+) error.*$", summary[0]) error_cnt += errs # Calculate total number of unsuccesful tests