Skip to content

Commit

Permalink
PyTorch: Also capture tests failing with signal
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Aug 4, 2022
1 parent 1989c86 commit 706d230
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions easybuild/easyblocks/p/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,9 @@ def test_step(self):
(tests_out, tests_ec) = super(EB_PyTorch, self).test_step(return_output_ec=True)

ran_tests_hits = re.findall(r"^Ran (?P<test_cnt>[0-9]+) tests in", tests_out, re.M)
test_cnt = 0
for hit in ran_tests_hits:
test_cnt += int(hit)
test_cnt = sum(int(hit) for hit in ran_tests_hits)

failed_tests = nub(re.findall(r"^(?P<failed_test_name>.*) failed!(?: Received signal: \w+)?\s*$", tests_out, re.M))
failed_tests = nub(re.findall(r"^(?P<test_name>.*) failed!(?: Received signal: \w+)?\s*$", tests_out, re.M))
failed_test_cnt = len(failed_tests)

if failed_test_cnt:
Expand Down

0 comments on commit 706d230

Please sign in to comment.