summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/layout_tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Scripts/webkitpy/layout_tests')
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/apple.py3
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/chromium.py7
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py4
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/chromium_win.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/gtk.py3
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/port_testcase.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/server_process.py21
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/views/printing.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py12
12 files changed, 37 insertions, 31 deletions
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/apple.py b/Tools/Scripts/webkitpy/layout_tests/port/apple.py
index d8e16494b..055419a14 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/apple.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/apple.py
@@ -92,7 +92,8 @@ class ApplePort(Port):
def _generate_all_test_configurations(self):
configurations = []
- for port_name in self.VERSION_FALLBACK_ORDER:
+ allowed_port_names = self.VERSION_FALLBACK_ORDER + [self.operating_system() + "-future"]
+ for port_name in allowed_port_names:
for build_type in self.ALL_BUILD_TYPES:
for architecture in self.ARCHITECTURES:
configurations.append(TestConfiguration(version=self._strip_port_name_prefix(port_name), architecture=architecture, build_type=build_type))
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
index feecfbdff..44c98a383 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
@@ -114,6 +114,9 @@ class ChromiumPort(Port):
def default_pixel_tests(self):
return True
+ def default_baseline_search_path(self):
+ return map(self._webkit_baseline_path, self.FALLBACK_PATHS[self.version()])
+
def default_timeout_ms(self):
if self.get_option('configuration') == 'Debug':
return 12 * 1000
@@ -351,8 +354,8 @@ class ChromiumPort(Port):
if stderr and 'AddressSanitizer' in stderr:
asan_filter_path = self.path_from_chromium_base('tools', 'valgrind', 'asan', 'asan_symbolize.py')
if self._filesystem.exists(asan_filter_path):
- output = self._executive.run_command([asan_filter_path], input=stderr)
- stderr = self._executive.run_command(['c++filt'], input=output)
+ output = self._executive.run_command([asan_filter_path], input=stderr, decode_output=False)
+ stderr = self._executive.run_command(['c++filt'], input=output, decode_output=False)
return super(ChromiumPort, self)._get_crash_log(name, pid, stdout, stderr, newer_than)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
index 4ce18efdd..fcccec15a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
@@ -187,7 +187,7 @@ class ChromiumAndroidPort(chromium.ChromiumPort):
def default_child_processes(self):
return len(self._get_devices())
- def baseline_search_path(self):
+ def default_baseline_search_path(self):
return map(self._webkit_baseline_path, self.FALLBACK_PATHS)
def check_wdiff(self, logging=True):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
index d5c2235bf..fa8c274ea 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
@@ -106,7 +106,7 @@ class ChromiumLinuxPort(chromium.ChromiumPort):
self._version = 'lucid' # We only support lucid right now.
self._architecture = arch
- def baseline_search_path(self):
+ def default_baseline_search_path(self):
port_names = self.FALLBACK_PATHS[self._architecture]
return map(self._webkit_baseline_path, port_names)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
index 554feca23..db82d5c79 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
@@ -79,10 +79,6 @@ class ChromiumMacPort(chromium.ChromiumPort):
self._version = port_name[port_name.index('chromium-mac-') + len('chromium-mac-'):]
assert self._version in self.SUPPORTED_OS_VERSIONS
- def baseline_search_path(self):
- fallback_paths = self.FALLBACK_PATHS
- return map(self._webkit_baseline_path, fallback_paths[self._version])
-
def _modules_to_search_for_symbols(self):
return [self._build_path('ffmpegsumo.so')]
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
index 7d0337acc..1168e407c 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
@@ -99,10 +99,6 @@ class ChromiumWinPort(chromium.ChromiumPort):
self._executive.run_command([setup_mount]) # Paths are all absolute, so this does not require a cwd.
return env
- def baseline_search_path(self):
- port_names = self.FALLBACK_PATHS[self.version()]
- return map(self._webkit_baseline_path, port_names)
-
def _modules_to_search_for_symbols(self):
# FIXME: we should return the path to the ffmpeg equivalents to detect if we have the mp3 and aac codecs installed.
# See https://bugs.webkit.org/show_bug.cgi?id=89706.
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/gtk.py b/Tools/Scripts/webkitpy/layout_tests/port/gtk.py
index 3cc0ea566..f02d14819 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/gtk.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/gtk.py
@@ -38,6 +38,9 @@ from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver
class GtkPort(Port, PulseAudioSanitizer):
port_name = "gtk"
+ def expectations_files(self):
+ return [self._filesystem.join(self._webkit_baseline_path(d), 'TestExpectations') for d in self._skipped_file_search_paths()]
+
def _port_flag_for_scripts(self):
return "--gtk"
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py b/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
index e12b68773..1f75c799a 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
@@ -609,3 +609,7 @@ class PortTestCase(unittest.TestCase):
port._build_driver = build_driver_called
port.check_build(False)
self.assertFalse(self.build_called, None)
+
+ def test_additional_platform_directory(self):
+ port = self.make_port(options=MockOptions(additional_platform_directory=['/tmp/foo']))
+ self.assertEquals(port.baseline_search_path()[0], '/tmp/foo')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/server_process.py b/Tools/Scripts/webkitpy/layout_tests/port/server_process.py
index 1cf173975..bfa6aab80 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/server_process.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/server_process.py
@@ -228,24 +228,21 @@ class ServerProcess(object):
raise
try:
+ # Note that we may get no data during read() even though
+ # select says we got something; see the select() man page
+ # on linux. I don't know if this happens on Mac OS and
+ # other Unixen as well, but we don't bother special-casing
+ # Linux because it's relatively harmless either way.
if out_fd in read_fds:
data = self._proc.stdout.read()
- if not data and not stopping:
- if self._treat_no_data_as_crash or self._proc.poll() is not None:
- _log.warning('unexpected EOF of stdout, %s crashed' % self._name)
- self._crashed = True
- else:
- _log.warning('unexpected EOF of stdout, %s is still alive' % self._name)
+ if not data and not stopping and (self._treat_no_data_as_crash or self._proc.poll()):
+ self._crashed = True
self._output += data
if err_fd in read_fds:
data = self._proc.stderr.read()
- if not data and not stopping:
- if self._treat_no_data_as_crash or self._proc.poll() is not None:
- _log.warning('unexpected EOF on stderr, %s crashed' % self._name)
- self._crashed = True
- else:
- _log.warning('unexpected EOF on stderr, %s is still alive' % self._name)
+ if not data and not stopping and (self._treat_no_data_as_crash or self._proc.poll()):
+ self._crashed = True
self._error += data
except IOError, e:
# We can ignore the IOErrors because we will detect if the subporcess crashed
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index ddb0105c2..a79ab3ce3 100755
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -105,7 +105,7 @@ def run(port, options, args, regular_output=sys.stderr, buildbot_output=sys.stdo
unexpected_result_count = -1
manager = Manager(port, options, printer)
- printer.print_config()
+ printer.print_config(port.results_directory())
unexpected_result_count = manager.run(args)
_log.debug("Testing completed, Exit status: %d" % unexpected_result_count)
diff --git a/Tools/Scripts/webkitpy/layout_tests/views/printing.py b/Tools/Scripts/webkitpy/layout_tests/views/printing.py
index bf0b79ee0..22a55ed2f 100644
--- a/Tools/Scripts/webkitpy/layout_tests/views/printing.py
+++ b/Tools/Scripts/webkitpy/layout_tests/views/printing.py
@@ -83,10 +83,10 @@ class Printer(object):
def __del__(self):
self.cleanup()
- def print_config(self):
+ def print_config(self, results_directory):
self._print_default("Using port '%s'" % self._port.name())
self._print_default("Test configuration: %s" % self._port.test_configuration())
- self._print_default("Placing test results in %s" % self._options.results_directory)
+ self._print_default("Placing test results in %s" % results_directory)
# FIXME: should these options be in printing_options?
if self._options.new_baseline:
diff --git a/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py b/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
index fa2af46c3..bc30092f4 100644
--- a/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
@@ -114,17 +114,23 @@ class Testprinter(unittest.TestCase):
def test_print_config(self):
printer, err, out = self.get_printer()
# FIXME: it's lame that i have to set these options directly.
- printer._options.results_directory = '/tmp'
printer._options.pixel_tests = True
printer._options.new_baseline = True
printer._options.time_out_ms = 6000
printer._options.slow_time_out_ms = 12000
- printer.print_config()
+ printer.print_config('/tmp')
+ self.assertTrue("Using port 'test-mac-leopard'" in err.getvalue())
+ self.assertTrue('Test configuration: <leopard, x86, release>' in err.getvalue())
+ self.assertTrue('Placing test results in /tmp' in err.getvalue())
self.assertTrue('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic' in err.getvalue())
+ self.assertTrue('Using Release build' in err.getvalue())
+ self.assertTrue('Pixel tests enabled' in err.getvalue())
+ self.assertTrue('Command line:' in err.getvalue())
+ self.assertTrue('Regular timeout: ' in err.getvalue())
self.reset(err)
printer._options.quiet = True
- printer.print_config()
+ printer.print_config('/tmp')
self.assertFalse('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic' in err.getvalue())
def test_print_one_line_summary(self):