nixosTests: Reraise exception in subtests

This commit is contained in:
Jacek Galowicz 2020-02-06 11:34:57 +01:00 committed by Florian Klink
parent 8aee1600f6
commit b139bc0d87

View File

@ -905,10 +905,8 @@ def subtest(name: str) -> Iterator[None]:
yield
return True
except Exception as e:
failed_tests.append(
'Test "{}" failed with error: "{}"'.format(name, str(e))
)
log.log("error: {}".format(str(e)))
log.log(f'Test "{name}" failed with error: "{e}"')
raise e
return False