зеркало из 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():
|
def do_delayed_imports():
|
||||||
global marionette
|
global marionette
|
||||||
|
global errors
|
||||||
try:
|
try:
|
||||||
import marionette
|
import marionette
|
||||||
|
from marionette import errors
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import marionette_driver.marionette as marionette
|
from marionette_driver import marionette, errors
|
||||||
|
|
||||||
|
|
||||||
class MarionetteTestExecutor(TestExecutor):
|
class MarionetteTestExecutor(TestExecutor):
|
||||||
|
@ -153,13 +155,13 @@ class MarionetteTestExecutor(TestExecutor):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.marionette.set_script_timeout((timeout + extra_timeout) * 1000)
|
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")
|
self.logger.error("Lost marionette connection before starting test")
|
||||||
return Stop
|
return Stop
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = self.convert_result(test, self.do_test(test, timeout))
|
result = self.convert_result(test, self.do_test(test, timeout))
|
||||||
except marionette.errors.ScriptTimeoutException:
|
except errors.ScriptTimeoutException:
|
||||||
with result_lock:
|
with result_lock:
|
||||||
if not result_flag.is_set():
|
if not result_flag.is_set():
|
||||||
result_flag.set()
|
result_flag.set()
|
||||||
|
@ -179,7 +181,7 @@ class MarionetteTestExecutor(TestExecutor):
|
||||||
# else:
|
# else:
|
||||||
# break
|
# break
|
||||||
# Now need to check if the browser is still responsive and restart it if not
|
# 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
|
# This can happen on a crash
|
||||||
# Also, should check after the test if the firefox process is still running
|
# Also, should check after the test if the firefox process is still running
|
||||||
# and otherwise ignore any other result and set it to crash
|
# 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)
|
full_url = urlparse.urljoin(self.http_server_url, url)
|
||||||
try:
|
try:
|
||||||
self.marionette.navigate(full_url)
|
self.marionette.navigate(full_url)
|
||||||
except marionette.errors.MarionetteException:
|
except errors.MarionetteException:
|
||||||
return {"status": "ERROR",
|
return {"status": "ERROR",
|
||||||
"message": "Failed to load url %s" % (full_url,)}
|
"message": "Failed to load url %s" % (full_url,)}
|
||||||
if url_type == "test":
|
if url_type == "test":
|
||||||
|
|
|
@ -124,6 +124,13 @@ class HgTree(object):
|
||||||
def commit_patch(self):
|
def commit_patch(self):
|
||||||
self.hg("qfinish")
|
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):
|
class GitTree(object):
|
||||||
name = "git"
|
name = "git"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче