Commit 7624182e authored by Stephen McGruer's avatar Stephen McGruer Committed by Chromium LUCI CQ

[blinkpy] Double timeout for WPT manifest regeneration

This is mostly a debugging change for crbug.com/1163615, as I don't
*think* 'wpt manifest' should take >5 minutes anyway. However doubling
the timeout for it should make it clear whether crbug.com/1163615 is a
case of the wider crbug.com/1161274 .

I also added some logging when we do kill a process due to timeout, as
currently nothing says the ScriptError is caused by that, and passed
'-v' to 'wpt manifest' as well to get verbose logging in the case of
failures.

Bug: 1163615
Change-Id: I04536f191cbb5f7f7aa32a314c8616173704354e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622336
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Auto-Submit: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: default avatarLuke Z <lpz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842540}
parent ccd62ad9
......@@ -374,8 +374,13 @@ class Executive(object):
env=env,
close_fds=self._should_close_fds())
def on_command_timeout():
_log.error('Error: Command timed out after %s seconds',
timeout_seconds)
process.kill()
if timeout_seconds:
timer = threading.Timer(timeout_seconds, process.kill)
timer = threading.Timer(timeout_seconds, on_command_timeout)
timer.start()
output = process.communicate(string_to_communicate)[0]
......
......@@ -27,7 +27,7 @@ MOCK_WEB_TESTS = '/mock-checkout/' + RELATIVE_WEB_TESTS
MANIFEST_INSTALL_CMD = [
'python3',
'/mock-checkout/third_party/blink/tools/blinkpy/third_party/wpt/wpt/wpt',
'manifest', '--no-download', '--tests-root',
'manifest', '-v', '--no-download', '--tests-root',
MOCK_WEB_TESTS + 'external/wpt'
]
......
......@@ -333,14 +333,14 @@ class WPTManifest(object):
wpt_exec_path = PathFinder(port.host.filesystem).path_from_blink_tools(
'blinkpy', 'third_party', 'wpt', 'wpt', 'wpt')
cmd = [
port.python3_command(), wpt_exec_path, 'manifest', '--no-download',
'--tests-root', dest_path
port.python3_command(), wpt_exec_path, 'manifest', '-v',
'--no-download', '--tests-root', dest_path
]
# ScriptError will be raised if the command fails.
output = port.host.executive.run_command(
cmd,
timeout_seconds=300,
timeout_seconds=600,
# This will also include stderr in the exception message.
return_stderr=True)
if output:
......
......@@ -27,6 +27,7 @@ class WPTManifestUnitTest(unittest.TestCase):
'python3',
'/mock-checkout/third_party/blink/tools/blinkpy/third_party/wpt/wpt/wpt',
'manifest',
'-v',
'--no-download',
'--tests-root',
WEB_TEST_DIR + '/external/wpt',
......@@ -50,6 +51,7 @@ class WPTManifestUnitTest(unittest.TestCase):
'python3',
'/mock-checkout/third_party/blink/tools/blinkpy/third_party/wpt/wpt/wpt',
'manifest',
'-v',
'--no-download',
'--tests-root',
WEB_TEST_DIR + '/external/wpt',
......@@ -71,6 +73,7 @@ class WPTManifestUnitTest(unittest.TestCase):
'python3',
'/mock-checkout/third_party/blink/tools/blinkpy/third_party/wpt/wpt/wpt',
'manifest',
'-v',
'--no-download',
'--tests-root',
WEB_TEST_DIR + '/wpt_internal',
......
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