Commit 2e1fa05c authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Add //thid_party/blink/tools/run_blinkpy_tests.py

It will supercedes //third_party/WebKit/Tools/Scripts/test-webkitpy.
test-webkitpy isn't removed yet due to dependency from
build/scripts/{master,slave}/.

Bug: 829697
Change-Id: I5f827afc1c99693613282a328cc117ed86209251
Reviewed-on: https://chromium-review.googlesource.com/1025434
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarQuinten Yearsley <qyearsley@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553419}
parent 200ecd71
......@@ -1010,7 +1010,6 @@ if (!is_ios) {
"//third_party/WebKit/LayoutTests/SlowTests",
"//third_party/WebKit/LayoutTests/TestExpectations",
"//third_party/WebKit/LayoutTests/VirtualTestSuites",
"//third_party/WebKit/Tools/Scripts/",
"//third_party/blink/renderer/bindings/scripts/",
"//third_party/blink/renderer/build/scripts/",
"//third_party/blink/tools/",
......
......@@ -1342,7 +1342,7 @@
"type": "script",
"script": "//testing/scripts/run_isolated_script_test.py",
"args": [
"../../third_party/WebKit/Tools/Scripts/test-webkitpy"
"../../third_party/blink/tools/run_blinkpy_tests.py"
]
},
"webkit_unit_tests": {
......
......@@ -15,8 +15,8 @@ def main_run(args):
with common.temporary_file() as tempfile_path:
rc = common.run_command([
sys.executable,
os.path.join(common.SRC_DIR, 'third_party', 'WebKit',
'Tools', 'Scripts', 'test-webkitpy'),
os.path.join(common.SRC_DIR, 'third_party', 'blink',
'tools', 'run_blinkpy_tests.py'),
'--write-full-results-to', tempfile_path,
], cwd=args.paths['checkout'])
......
<!-- Generated by Tools/Scripts/test-webkitpy
<!-- Generated by third_party/blink/tools/run_blinkpy_tests.py
test case: TestRepaintOverlay.test_generate_repaint_overlay_html. -->
<!DOCTYPE HTML>
<html>
......
......@@ -27,8 +27,9 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Module for handling messages and concurrency for run-webkit-tests
and test-webkitpy. This module follows the design for multiprocessing.Pool
and concurrency.futures.ProcessPoolExecutor, with the following differences:
and run_blinkpy_tests.py. This module follows the design for
multiprocessing.Pool and concurrency.futures.ProcessPoolExecutor, with the
following differences:
* Tasks are executed in stateful subprocesses via objects that implement the
Worker interface - this allows the workers to share state across tasks.
......
......@@ -81,7 +81,7 @@ class MockExecutive(object):
self._should_log = should_log
self._should_throw = should_throw
# FIXME: Once executive wraps os.getpid() we can just use a static pid for "this" process.
self._running_pids = {'test-webkitpy': os.getpid()}
self._running_pids = {'run_blinkpy_tests.py': os.getpid()}
self._output = output
self._stderr = stderr
self._exit_code = exit_code
......
......@@ -37,12 +37,12 @@ class ConfigureLoggingTestBase(unittest.TestCase):
log_stream = TestLogStream(self)
# Use a logger other than the root logger or one prefixed with
# "blinkpy." so as not to conflict with test-webkitpy logging.
# "blinkpy." so as not to conflict with run_blinkpy_tests.py logging.
logger = logging.getLogger('unittest')
# Configure the test logger not to pass messages along to the
# root logger. This prevents test messages from being
# propagated to loggers used by test-webkitpy logging (e.g.
# propagated to loggers used by run_blinkpy_tests.py logging (e.g.
# the root logger).
logger.propagate = False
......
......@@ -79,12 +79,12 @@ class ConfigureLoggingTestBase(unittest.TestCase):
log_stream = TestLogStream(self)
# Use a logger other than the root logger or one prefixed with
# webkit so as not to conflict with test-webkitpy logging.
# webkit so as not to conflict with run_blinkpy_tests.py logging.
logger = logging.getLogger("unittest")
# Configure the test logger not to pass messages along to the
# root logger. This prevents test messages from being
# propagated to loggers used by test-webkitpy logging (e.g.
# propagated to loggers used by run_blinkpy_tests.py logging (e.g.
# the root logger).
logger.propagate = False
......
......@@ -60,7 +60,7 @@ class TestRepaintOverlay(unittest.TestCase):
layer_tree = str(host.filesystem.read_text_file(layer_tree_file))
self.assertTrue(repaint_overlay.result_contains_repaint_rects(layer_tree))
overlay_html = (
'<!-- Generated by Tools/Scripts/test-webkitpy\n' +
'<!-- Generated by third_party/blink/tools/run_blinkpy_tests.py\n' +
' test case: TestRepaintOverlay.test_generate_repaint_overlay_html. -->\n' +
repaint_overlay.generate_repaint_overlay_html(test_name, layer_tree, layer_tree))
......
#!/usr/bin/env vpython
# Copyright (c) 2011 Google Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import sys
from blinkpy.common import path_finder
path_finder.add_typ_dir_to_sys_path()
import typ
def main():
return typ.main(
top_level_dirs=[path_finder.get_blink_tools_dir(),
os.path.join(path_finder.get_source_dir(), 'build', 'scripts')],
path=[path_finder.get_blinkpy_thirdparty_dir()])
if __name__ == "__main__":
sys.exit(main())
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