Change test helper to just check for asserts (not errors)

Setting the Vulkan layer produces two errors
This commit is contained in:
Jake Turner
2025-04-22 14:30:37 +01:00
parent a8de121cd0
commit 258ab5b6e3
4 changed files with 7 additions and 11 deletions
+1 -1
View File
@@ -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")
+1 -1
View File
@@ -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")
+4 -8
View File
@@ -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")