mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 799863 (2/3) - Guard against an exception occurring before process is defined in xpcshell tests;r=gbrown
--- testing/xpcshell/runxpcshelltests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
This commit is contained in:
parent
f3518f5541
commit
6ba779efaa
@ -781,6 +781,7 @@ class XPCShellTests(object):
|
||||
|
||||
completeCmd = cmdH + cmdT + args
|
||||
|
||||
proc = None
|
||||
try:
|
||||
self.log.info("TEST-INFO | %s | running test ..." % name)
|
||||
if verbose:
|
||||
@ -876,7 +877,7 @@ class XPCShellTests(object):
|
||||
finally:
|
||||
# We can sometimes get here before the process has terminated, which would
|
||||
# cause removeDir() to fail - so check for the process & kill it it needed.
|
||||
if self.poll(proc) is None:
|
||||
if proc and self.poll(proc) is None:
|
||||
message = "TEST-UNEXPECTED-FAIL | %s | Process still running after test!" % name
|
||||
self.log.error(message)
|
||||
print_stdout(stdout)
|
||||
|
Loading…
Reference in New Issue
Block a user