mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Only avoid duplicate failures when exceptions are raised
This commit is contained in:
@@ -29,6 +29,7 @@ class TestLogger:
|
||||
self.outputs = [sys.stdout]
|
||||
self.failed = False
|
||||
self.section_failed = False
|
||||
self.logged_exception = False
|
||||
|
||||
def subprocess_print(self, line: str):
|
||||
for o in self.outputs:
|
||||
@@ -87,6 +88,7 @@ class TestLogger:
|
||||
self.rawprint(">> Section {}".format(name))
|
||||
self.indent()
|
||||
self.section_failed = False
|
||||
self.logged_exception = False
|
||||
|
||||
def end_section(self, name: str):
|
||||
if self.section_failed:
|
||||
@@ -129,9 +131,10 @@ class TestLogger:
|
||||
self.rawprint("!! " + message)
|
||||
|
||||
def failure(self, ex):
|
||||
if self.section_failed:
|
||||
if self.logged_exception:
|
||||
return
|
||||
|
||||
self.logged_exception = True
|
||||
self.failed = self.section_failed = True
|
||||
|
||||
if ex is TestFailureException:
|
||||
|
||||
Reference in New Issue
Block a user