Skip to content

Commit

Permalink
Also handle tests terminating by a signal
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Nov 25, 2022
1 parent bec22a6 commit 4e8a97e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion easybuild/easyblocks/p/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@ def get_count_for_pattern(regex, text):
#
# FAILED (errors=10, skipped=190, expected failures=6)
# test_fx failed!
regex = r"^Ran (?P<test_cnt>[0-9]+) tests.*$\n\nFAILED \((?P<failure_summary>.*)\)$\n(?:^(?:(?!failed!).)*$\n)*(?P<failed_test_suite_name>.*) failed!$" # noqa: E501
regex = (r"^Ran (?P<test_cnt>[0-9]+) tests.*$\n\n"
r"FAILED \((?P<failure_summary>.*)\)$\n"
r"(?:^(?:(?!failed!).)*$\n)*"
r"(?P<failed_test_suite_name>.*) failed!(?: Received signal: \w+)?\s*$")

for summary in re.findall(regex, tests_out, re.M):
# E.g. 'failures=3, errors=10, skipped=190, expected failures=6'
Expand Down

0 comments on commit 4e8a97e

Please sign in to comment.