mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Change test helper to just check for asserts (not errors)
Setting the Vulkan layer produces two errors
This commit is contained in:
@@ -274,6 +274,6 @@ class Subgroup_Zoo(rdtest.TestCase):
|
||||
if overallFailed:
|
||||
raise rdtest.TestFailureException("Some tests were not as expected")
|
||||
|
||||
self.check_renderdoc_log()
|
||||
self.check_renderdoc_log_asserts()
|
||||
|
||||
rdtest.log.success("All tests matched")
|
||||
@@ -27,6 +27,6 @@ class Workgroup_Zoo(rdtest.Subgroup_Zoo):
|
||||
if self.check_compute_tests(compute_dims, thread_checks):
|
||||
raise rdtest.TestFailureException("Some tests were not as expected")
|
||||
|
||||
self.check_renderdoc_log()
|
||||
self.check_renderdoc_log_asserts()
|
||||
|
||||
rdtest.log.success("All tests matched")
|
||||
@@ -893,17 +893,13 @@ class TestCase:
|
||||
taskIdx += 1
|
||||
return data
|
||||
|
||||
def check_renderdoc_log(self, asserts: bool = True, errors: bool = True):
|
||||
def check_renderdoc_log_asserts(self):
|
||||
countAsserts = 0
|
||||
countErrors = 0
|
||||
rdlog = rd.GetLogFile()
|
||||
with open(rdlog, 'r') as f:
|
||||
for line in f:
|
||||
if asserts and 'Assertion' in line:
|
||||
if 'Assertion' in line:
|
||||
log.error(line)
|
||||
countAsserts += 1
|
||||
elif errors and 'Error' in line:
|
||||
log.error(line)
|
||||
countErrors += 1
|
||||
if countAsserts > 0 or countErrors > 0:
|
||||
raise TestFailureException(f'Renderdoc log file contains {countAsserts} Asserts and {countErrors} Errors')
|
||||
if countAsserts > 0:
|
||||
raise TestFailureException(f'Renderdoc log file contains {countAsserts} Asserts')
|
||||
|
||||
@@ -227,6 +227,6 @@ class D3D12_Shader_DebugData_Zoo(rdtest.TestCase):
|
||||
if failed:
|
||||
raise rdtest.TestFailureException("Some tests were not as expected")
|
||||
|
||||
self.check_renderdoc_log()
|
||||
self.check_renderdoc_log_asserts()
|
||||
|
||||
rdtest.log.success("All tests matched")
|
||||
|
||||
Reference in New Issue
Block a user