Commit 63238cb3 authored by Stephen McGruer's avatar Stephen McGruer Committed by Chromium LUCI CQ

[blinkpy] Additional logging around WPT manifest regeneration

This change also adds a timeout for generating the manifest (5 minutes),
so that failures (e.g. bug 1161274) do not just silently hang at
'Collecting tests...'.

Bug: 1161274
Change-Id: I55e2cfb37b230135694a3ad4a5f95a1cc2fdaa58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611124
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Auto-Submit: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840262}
parent e6bc5ffa
......@@ -286,7 +286,7 @@ class WPTManifest(object):
@staticmethod
def ensure_manifest(port, path=None):
"""Updates the MANIFEST.json file, or generates if it does not exist.
"""Regenerates the WPT MANIFEST.json file.
Args:
port: A blinkpy.web_tests.port.Port object.
......@@ -302,6 +302,7 @@ class WPTManifest(object):
# manifest from scratch (when version is bumped) or invalid/out-of-date
# local manifest breaking the runner.
if fs.exists(manifest_path):
_log.debug('Removing existing manifest file "%s".', manifest_path)
fs.remove(manifest_path)
# TODO(crbug.com/853815): perhaps also cache the manifest for wpt_internal.
......@@ -309,6 +310,8 @@ class WPTManifest(object):
base_manifest_path = fs.join(port.web_tests_dir(), 'external',
BASE_MANIFEST_NAME)
if fs.exists(base_manifest_path):
_log.debug('Copying base manifest from "%s" to "%s".',
base_manifest_path, manifest_path)
fs.copyfile(base_manifest_path, manifest_path)
else:
_log.error('Manifest base not found at "%s".',
......@@ -335,10 +338,13 @@ class WPTManifest(object):
]
# ScriptError will be raised if the command fails.
port.host.executive.run_command(
output = port.host.executive.run_command(
cmd,
timeout_seconds=300,
# This will also include stderr in the exception message.
return_stderr=True)
if output:
_log.debug('Output: %s', output)
@staticmethod
def _flatten_items(items):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment