Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py

Issue 2329263002: Run format-webkitpy and fix long lines. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 from webkitpy.common.webkit_finder import WebKitFinder 52 from webkitpy.common.webkit_finder import WebKitFinder
53 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx pectationsFactory 53 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx pectationsFactory
54 from webkitpy.layout_tests.models import test_run_results 54 from webkitpy.layout_tests.models import test_run_results
55 from webkitpy.layout_tests.models.test_configuration import TestConfiguration 55 from webkitpy.layout_tests.models.test_configuration import TestConfiguration
56 from webkitpy.layout_tests.port import driver 56 from webkitpy.layout_tests.port import driver
57 from webkitpy.layout_tests.port import server_process 57 from webkitpy.layout_tests.port import server_process
58 from webkitpy.layout_tests.port.factory import PortFactory 58 from webkitpy.layout_tests.port.factory import PortFactory
59 from webkitpy.layout_tests.servers import apache_http 59 from webkitpy.layout_tests.servers import apache_http
60 from webkitpy.layout_tests.servers import pywebsocket 60 from webkitpy.layout_tests.servers import pywebsocket
61 from webkitpy.layout_tests.servers import wptserve 61 from webkitpy.layout_tests.servers import wptserve
62 from functools import reduce # pylint: disable=redefined-builtin
62 63
63 _log = logging.getLogger(__name__) 64 _log = logging.getLogger(__name__)
64 65
65 66
66 # FIXME: This class should merge with WebKitPort now that Chromium behaves mostl y like other webkit ports. 67 # FIXME: This class should merge with WebKitPort now that Chromium behaves mostl y like other webkit ports.
67 class Port(object): 68 class Port(object):
68 """Abstract class for Port-specific hooks for the layout_test package.""" 69 """Abstract class for Port-specific hooks for the layout_test package."""
69 70
70 # Subclasses override this. This should indicate the basic implementation 71 # Subclasses override this. This should indicate the basic implementation
71 # part of the port name, e.g., 'mac', 'win', 'gtk'; there is probably (?) 72 # part of the port name, e.g., 'mac', 'win', 'gtk'; there is probably (?)
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 'third_party', 'llvm-build', 'Release+Asserts', 'bin', 'llvm-sym bolizer') 1563 'third_party', 'llvm-build', 'Release+Asserts', 'bin', 'llvm-sym bolizer')
1563 if self._filesystem.exists(llvm_symbolizer_path): 1564 if self._filesystem.exists(llvm_symbolizer_path):
1564 env = self.host.environ.copy() 1565 env = self.host.environ.copy()
1565 env['LLVM_SYMBOLIZER_PATH'] = llvm_symbolizer_path 1566 env['LLVM_SYMBOLIZER_PATH'] = llvm_symbolizer_path
1566 else: 1567 else:
1567 env = None 1568 env = None
1568 sanitizer_filter_path = self.path_from_chromium_base('tools', 'valgr ind', 'asan', 'asan_symbolize.py') 1569 sanitizer_filter_path = self.path_from_chromium_base('tools', 'valgr ind', 'asan', 'asan_symbolize.py')
1569 sanitizer_strip_path_prefix = 'Release/../../' 1570 sanitizer_strip_path_prefix = 'Release/../../'
1570 if self._filesystem.exists(sanitizer_filter_path): 1571 if self._filesystem.exists(sanitizer_filter_path):
1571 stderr = self._executive.run_command( 1572 stderr = self._executive.run_command(
1572 ['flock', sys.executable, sanitizer_filter_path, sanitizer_s trip_path_prefix], input=stderr, decode_output=False, env=env) 1573 ['flock', sys.executable, sanitizer_filter_path, sanitizer_s trip_path_prefix],
1574 input=stderr, decode_output=False, env=env)
1573 1575
1574 name_str = name or '<unknown process name>' 1576 name_str = name or '<unknown process name>'
1575 pid_str = str(pid or '<unknown>') 1577 pid_str = str(pid or '<unknown>')
1576 1578
1577 # We require stdout and stderr to be bytestrings, not character strings. 1579 # We require stdout and stderr to be bytestrings, not character strings.
1578 if stdout: 1580 if stdout:
1579 assert isinstance(stdout, str) 1581 assert isinstance(stdout, str)
1580 stdout_lines = stdout.decode('utf8', 'replace').splitlines() 1582 stdout_lines = stdout.decode('utf8', 'replace').splitlines()
1581 else: 1583 else:
1582 stdout_lines = [u'<empty>'] 1584 stdout_lines = [u'<empty>']
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 1815
1814 def __init__(self, base, args, reference_args=None): 1816 def __init__(self, base, args, reference_args=None):
1815 self.name = base 1817 self.name = base
1816 self.base = base 1818 self.base = base
1817 self.args = args 1819 self.args = args
1818 self.reference_args = args if reference_args is None else reference_args 1820 self.reference_args = args if reference_args is None else reference_args
1819 self.tests = set() 1821 self.tests = set()
1820 1822
1821 def __repr__(self): 1823 def __repr__(self):
1822 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) 1824 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698