mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 932349 - make Mochitest use kill_on_timeout=False and an onTimeout handler. r=jhammel
This commit is contained in:
parent
0e117f16fa
commit
3513b2c4a5
@ -844,8 +844,14 @@ class Mochitest(MochitestUtilsMixin):
|
||||
dump_screen_on_timeout=not debuggerInfo,
|
||||
)
|
||||
|
||||
def timeoutHandler():
|
||||
browserProcessId = outputHandler.browserProcessId
|
||||
self.handleTimeout(timeout, proc, utilityPath, debuggerInfo, browserProcessId)
|
||||
kp_kwargs = {'kill_on_timeout': False,
|
||||
'onTimeout': [timeoutHandler]}
|
||||
# if the output handler is a pipe, it will process output via the subprocess
|
||||
kp_kwargs = {} if outputHandler.pipe else {'processOutputLine': [outputHandler]}
|
||||
if not outputHandler.pipe:
|
||||
kp_kwargs['processOutputLine'] = [outputHandler]
|
||||
|
||||
# create mozrunner instance and start the system under test process
|
||||
self.lastTestSeen = self.test_name
|
||||
@ -902,11 +908,6 @@ class Mochitest(MochitestUtilsMixin):
|
||||
# finalize output handler
|
||||
outputHandler.finish(didTimeout)
|
||||
|
||||
# handle timeout
|
||||
if didTimeout:
|
||||
browserProcessId = outputHandler.browserProcessId
|
||||
self.handleTimeout(timeout, proc, utilityPath, debuggerInfo, browserProcessId)
|
||||
|
||||
# record post-test information
|
||||
if status:
|
||||
log.info("TEST-UNEXPECTED-FAIL | %s | application terminated with exit code %s", self.lastTestSeen, status)
|
||||
|
Loading…
Reference in New Issue
Block a user