diff --git a/easybuild/easyblocks/p/pytorch.py b/easybuild/easyblocks/p/pytorch.py index 9a7637fed18..252bc09741b 100644 --- a/easybuild/easyblocks/p/pytorch.py +++ b/easybuild/easyblocks/p/pytorch.py @@ -266,7 +266,15 @@ def test_step(self): 'excluded_tests': ' '.join(excluded_tests) }) - tests_out, tests_ec = super(EB_PyTorch, self).test_step(return_output_ec=True) + test_result = super(EB_PyTorch, self).test_step(return_output_ec=True) + if test_result is None: + if self.cfg['runtest'] is False: + msg = "Do not set 'runtest' to False, use --skip-test-step instead." + else: + msg = "Tests did not run. Make sure 'runtest' is set to a command." + raise EasyBuildError(msg) + + tests_out, tests_ec = test_result def get_count_for_pattern(regex, text): """Match the regexp containing a single group and return the integer value of the matched group.