mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 20:25:44 +00:00
Bug 1373709 - Don't infinite loop when a test expects to crash, r=ato
In order to avoid the leak checker complaining about missing output, we restart the browser before running tests that are expected to crash. But as part of that restart we end up checking again if a restart is required and so end up in an infinite loop. To break out of that loop we simply check if this is the same test as during the last iteration, and don't ask to restart in that case. MozReview-Commit-ID: 90gsmqVCRsD --HG-- extra : rebase_source : 9cf625e9cd1861b25b72e5c39ce070981b84046e
This commit is contained in:
parent
1a8b5f9bbd
commit
981d317f0f
@ -154,6 +154,7 @@ class BrowserManager(object):
|
||||
self.browser = browser
|
||||
self.no_timeout = no_timeout
|
||||
self.browser_settings = None
|
||||
self.last_test = None
|
||||
|
||||
self.started = False
|
||||
|
||||
@ -163,8 +164,9 @@ class BrowserManager(object):
|
||||
browser_settings = self.browser.settings(test)
|
||||
restart_required = ((self.browser_settings is not None and
|
||||
self.browser_settings != browser_settings) or
|
||||
test.expected() == "CRASH")
|
||||
(self.last_test != test and test.expected() == "CRASH"))
|
||||
self.browser_settings = browser_settings
|
||||
self.last_test = test
|
||||
return restart_required
|
||||
|
||||
def init(self):
|
||||
|
Loading…
Reference in New Issue
Block a user