зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1136398 - Update to latest wptrunner, a=testonly
This commit is contained in:
Родитель
17643d2924
Коммит
53dbf084d4
|
@ -30,10 +30,12 @@ required_files = [("testharness_runner.html", "", False),
|
|||
|
||||
def do_delayed_imports():
|
||||
global marionette
|
||||
global errors
|
||||
try:
|
||||
import marionette
|
||||
from marionette import errors
|
||||
except ImportError:
|
||||
import marionette_driver.marionette as marionette
|
||||
from marionette_driver import marionette, errors
|
||||
|
||||
|
||||
class MarionetteTestExecutor(TestExecutor):
|
||||
|
@ -153,13 +155,13 @@ class MarionetteTestExecutor(TestExecutor):
|
|||
|
||||
try:
|
||||
self.marionette.set_script_timeout((timeout + extra_timeout) * 1000)
|
||||
except IOError, marionette.errors.InvalidResponseException:
|
||||
except IOError, errors.InvalidResponseException:
|
||||
self.logger.error("Lost marionette connection before starting test")
|
||||
return Stop
|
||||
|
||||
try:
|
||||
result = self.convert_result(test, self.do_test(test, timeout))
|
||||
except marionette.errors.ScriptTimeoutException:
|
||||
except errors.ScriptTimeoutException:
|
||||
with result_lock:
|
||||
if not result_flag.is_set():
|
||||
result_flag.set()
|
||||
|
@ -179,7 +181,7 @@ class MarionetteTestExecutor(TestExecutor):
|
|||
# else:
|
||||
# break
|
||||
# Now need to check if the browser is still responsive and restart it if not
|
||||
except (socket.timeout, marionette.errors.InvalidResponseException, IOError):
|
||||
except (socket.timeout, errors.InvalidResponseException, IOError):
|
||||
# This can happen on a crash
|
||||
# Also, should check after the test if the firefox process is still running
|
||||
# and otherwise ignore any other result and set it to crash
|
||||
|
@ -250,7 +252,7 @@ class MarionetteReftestExecutor(MarionetteTestExecutor):
|
|||
full_url = urlparse.urljoin(self.http_server_url, url)
|
||||
try:
|
||||
self.marionette.navigate(full_url)
|
||||
except marionette.errors.MarionetteException:
|
||||
except errors.MarionetteException:
|
||||
return {"status": "ERROR",
|
||||
"message": "Failed to load url %s" % (full_url,)}
|
||||
if url_type == "test":
|
||||
|
|
|
@ -124,6 +124,13 @@ class HgTree(object):
|
|||
def commit_patch(self):
|
||||
self.hg("qfinish")
|
||||
|
||||
def contains_commit(self, commit):
|
||||
try:
|
||||
self.hg("identify", "-r", commit.sha1)
|
||||
return True
|
||||
except subprocess.CalledProcessError:
|
||||
return False
|
||||
|
||||
|
||||
class GitTree(object):
|
||||
name = "git"
|
||||
|
|
Загрузка…
Ссылка в новой задаче