mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-07 06:24:57 +00:00
Let tests know if they're being run in debug mode
* This will let us do extra logging or dumping data we don't want to do on a real run
This commit is contained in:
2 files changed
+7
-6
No files matched your search
@@ -297,17 +297,17 @@ def run_tests(test_include: str, test_exclude: str, in_process: bool, slow_tests
|
||||
|
||||
util.set_current_test(name)
|
||||
|
||||
def do():
|
||||
def do(debugMode):
|
||||
if in_process:
|
||||
instance.invoketest()
|
||||
instance.invoketest(debugMode)
|
||||
else:
|
||||
_run_test(testclass, failedcases)
|
||||
|
||||
if debugger:
|
||||
do()
|
||||
do(True)
|
||||
else:
|
||||
try:
|
||||
do()
|
||||
do(False)
|
||||
except Exception as ex:
|
||||
log.failure(ex)
|
||||
failedcases.append(testclass)
|
||||
@@ -356,7 +356,7 @@ def internal_run_test(test_name):
|
||||
|
||||
try:
|
||||
instance = testclass()
|
||||
instance.invoketest()
|
||||
instance.invoketest(False)
|
||||
suceeded = True
|
||||
except Exception as ex:
|
||||
log.failure(ex)
|
||||
|
||||
@@ -341,9 +341,10 @@ class TestCase:
|
||||
self.controller.Shutdown()
|
||||
self.pickout = None
|
||||
|
||||
def invoketest(self):
|
||||
def invoketest(self, debugMode):
|
||||
self.run()
|
||||
self.pickout = None
|
||||
self.debugMode = debugMode
|
||||
|
||||
def get_first_draw(self):
|
||||
first_draw: rd.DrawcallDescription = self.controller.GetDrawcalls()[0]
|
||||
|
||||
Reference in new issue
Block a user