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:
baldurk committed 2019-10-24 18:02:54 +01:00
1 parent 0559bfffd4
commit 1530bc6499
2 files changed
+7 -6

No files matched your search

+5 -5
View File
@@ -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)
+2 -1
View File
@@ -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]