From d6b220de04893b83aa9b3c561cd70d959cc223e2 Mon Sep 17 00:00:00 2001 From: James Graham Date: Thu, 9 Apr 2015 18:36:46 +0100 Subject: [PATCH] Bug 1153521 - Update to latest wptrunner, a=testonly --- .../harness/wptrunner/executors/executormarionette.py | 2 +- testing/web-platform/harness/wptrunner/update/sync.py | 9 +++++++++ testing/web-platform/harness/wptrunner/update/update.py | 6 ++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/testing/web-platform/harness/wptrunner/executors/executormarionette.py b/testing/web-platform/harness/wptrunner/executors/executormarionette.py index d7f14da712a..0382823c359 100644 --- a/testing/web-platform/harness/wptrunner/executors/executormarionette.py +++ b/testing/web-platform/harness/wptrunner/executors/executormarionette.py @@ -373,7 +373,7 @@ class MarionetteRefTestExecutor(RefTestExecutor): return self.convert_result(test, result) def screenshot(self, test): - timeout = test.timeout if self.debug_args is None else None + timeout = self.timeout_multiplier * test.timeout if self.debug_args is None else None test_url = self.test_url(test) diff --git a/testing/web-platform/harness/wptrunner/update/sync.py b/testing/web-platform/harness/wptrunner/update/sync.py index 6a58696d545..68db2d3285b 100644 --- a/testing/web-platform/harness/wptrunner/update/sync.py +++ b/testing/web-platform/harness/wptrunner/update/sync.py @@ -4,6 +4,7 @@ import os import shutil +import sys import uuid from .. import testloader @@ -93,6 +94,14 @@ class UpdateCheckout(Step): sync_tree.update(state.sync["remote_url"], state.sync["branch"], state.local_branch) + sync_path = os.path.abspath(sync_tree.root) + if not sync_path in sys.path: + from update import setup_paths + setup_paths(sync_path) + + def restore(self, state): + assert os.path.abspath(state.sync_tree.root) in sys.path + Step.restore(self, state) class GetSyncTargetCommit(Step): diff --git a/testing/web-platform/harness/wptrunner/update/update.py b/testing/web-platform/harness/wptrunner/update/update.py index 3ef4b3f1c07..2fb9443349e 100644 --- a/testing/web-platform/harness/wptrunner/update/update.py +++ b/testing/web-platform/harness/wptrunner/update/update.py @@ -14,7 +14,7 @@ from base import Step, StepRunner, exit_clean, exit_unclean from state import State def setup_paths(sync_path): - sys.path.insert(0, sync_path) + sys.path.insert(0, os.path.abspath(sync_path)) from tools import localpaths class LoadConfig(Step): @@ -117,7 +117,9 @@ class WPTUpdate(object): if not kwargs["sync"]: setup_paths(self.serve_root) else: - setup_paths(kwargs["sync_path"]) + if os.path.exists(kwargs["sync_path"]): + # If the sync path doesn't exist we defer this until it does + setup_paths(kwargs["sync_path"]) self.state = State(logger) self.kwargs = kwargs