Diff
Modified: trunk/Tools/ChangeLog (89880 => 89881)
--- trunk/Tools/ChangeLog 2011-06-28 00:15:18 UTC (rev 89880)
+++ trunk/Tools/ChangeLog 2011-06-28 00:33:26 UTC (rev 89881)
@@ -2,6 +2,27 @@
Reviewed by Eric Seidel.
+ NRWT should wait for ReportCrash
+ https://bugs.webkit.org/show_bug.cgi?id=63495
+
+ When a test crashes on Mac, ReportCrash confuses us into thinking the
+ test times out.
+
+ I'm not sure how to test this in a meaningful way in our current test
+ harness...
+
+ * Scripts/webkitpy/common/system/crashlogs.py:
+ * Scripts/webkitpy/common/system/crashlogs_unittest.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ * Scripts/webkitpy/layout_tests/port/server_process.py:
+ * Scripts/webkitpy/tool/commands/queries.py:
+
+2011-06-27 Adam Barth <[email protected]>
+
+ Reviewed by Eric Seidel.
+
new-run-webkit-tests should upload crash logs
https://bugs.webkit.org/show_bug.cgi?id=55907
Modified: trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py (89880 => 89881)
--- trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py 2011-06-28 00:15:18 UTC (rev 89880)
+++ trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py 2011-06-28 00:33:26 UTC (rev 89881)
@@ -36,8 +36,7 @@
class CrashLogs(object):
- def __init__(self, executive, filesystem):
- self._executive = executive
+ def __init__(self, filesystem):
self._filesystem = filesystem
def find_newest_log(self, process_name):
@@ -61,8 +60,4 @@
logs = self._filesystem.files_under(log_directory, file_filter=is_crash_log)
if not logs:
return
-
- # FIXME: We should wait for the CrashReporter to finish, but that causes tests to timeout.
- if False:
- self._executive.wait_newest(_is_crash_reporter)
return self._filesystem.read_text_file(sorted(logs)[-1])
Modified: trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py (89880 => 89881)
--- trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py 2011-06-28 00:15:18 UTC (rev 89880)
+++ trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py 2011-06-28 00:33:26 UTC (rev 89881)
@@ -37,6 +37,6 @@
files = {}
files['/Users/mock/Library/Logs/DiagnosticReports/TextMate_2011-06-13-150719_quadzen.crash'] = mock_crash_report
filesystem = MockFileSystem(files)
- crash_logs = CrashLogs(Mock(), filesystem)
+ crash_logs = CrashLogs(filesystem)
log = crash_logs.find_newest_log("TextMate")
self.assertTrue(log, mock_crash_report)
Modified: trunk/Tools/Scripts/webkitpy/common/system/executive.py (89880 => 89881)
--- trunk/Tools/Scripts/webkitpy/common/system/executive.py 2011-06-28 00:15:18 UTC (rev 89880)
+++ trunk/Tools/Scripts/webkitpy/common/system/executive.py 2011-06-28 00:33:26 UTC (rev 89881)
@@ -296,7 +296,8 @@
running_pids = []
if sys.platform in ("win32", "cygwin"):
- raise NotImplemented()
+ # FIXME: running_pids isn't implemented on Windows yet...
+ return []
ps_process = self.popen(['ps', '-eo', 'pid,comm'], stdout=self.PIPE, stderr=self.PIPE)
stdout, _ = ps_process.communicate()
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py (89880 => 89881)
--- trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py 2011-06-28 00:15:18 UTC (rev 89880)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py 2011-06-28 00:33:26 UTC (rev 89881)
@@ -173,7 +173,7 @@
filename = self.output_filename(self.FILENAME_SUFFIX_CRASH_LOG + ".txt")
fs.maybe_make_directory(fs.dirname(filename))
# FIXME: We shouldn't be grabbing private members of port.
- crash_logs = CrashLogs(self._port._executive, fs)
+ crash_logs = CrashLogs(fs)
log = crash_logs.find_newest_log(self._port.driver_name())
# CrashLogs doesn't support every platform, so we fall back to
# including the stderr output, which is admittedly somewhat redundant.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (89880 => 89881)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2011-06-28 00:15:18 UTC (rev 89880)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2011-06-28 00:33:26 UTC (rev 89881)
@@ -288,6 +288,9 @@
actual_filename)
return ''.join(diff)
+ def is_crash_reporter(self, process_name):
+ return False
+
def driver_name(self):
"""Returns the name of the actual binary that is performing the test,
so that it can be referred to in log messages. In most cases this
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py (89880 => 89881)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2011-06-28 00:15:18 UTC (rev 89880)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2011-06-28 00:33:26 UTC (rev 89881)
@@ -30,6 +30,7 @@
import logging
import platform
+import re
from webkitpy.layout_tests.port.webkit import WebKitPort
@@ -99,6 +100,9 @@
return self.path_from_webkit_base('LayoutTests', 'platform',
'mac', 'test_expectations.txt')
+ def is_crash_reporter(self, process_name):
+ return re.search(r'ReportCrash', process_name)
+
def _skipped_file_paths(self):
# FIXME: This method will need to be made work for non-mac
# platforms and moved into base.Port.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py (89880 => 89881)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py 2011-06-28 00:15:18 UTC (rev 89880)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py 2011-06-28 00:33:26 UTC (rev 89881)
@@ -167,6 +167,10 @@
select_fds = (out_fd, err_fd)
deadline = time.time() + timeout
while not self.timed_out and not self.crashed:
+ if self._executive.running_pids(self._port.is_crash_reporter):
+ _log.warning('%s is waiting for crash reporter...' % self._name)
+ self._executive.wait_newest(self._port.is_crash_reporter)
+
# poll() is not threadsafe and can throw OSError due to:
# http://bugs.python.org/issue1731717
if self._proc.poll() != None:
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queries.py (89880 => 89881)
--- trunk/Tools/Scripts/webkitpy/tool/commands/queries.py 2011-06-28 00:15:18 UTC (rev 89880)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queries.py 2011-06-28 00:33:26 UTC (rev 89881)
@@ -373,7 +373,7 @@
argument_names = "PROCESS_NAME"
def execute(self, options, args, tool):
- crash_logs = CrashLogs(tool.executive, tool.filesystem)
+ crash_logs = CrashLogs(tool.filesystem)
print crash_logs.find_newest_log(args[0])