Title: [89873] trunk
Revision
89873
Author
[email protected]
Date
2011-06-27 16:05:36 -0700 (Mon, 27 Jun 2011)

Log Message

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

        * fast/harness/resources/results-test.js:
        * fast/harness/results.html:
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

        NRWT used to have a different name for crash logs.  I've changed the
        name to patch ORWT.

        * Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89872 => 89873)


--- trunk/LayoutTests/ChangeLog	2011-06-27 22:52:07 UTC (rev 89872)
+++ trunk/LayoutTests/ChangeLog	2011-06-27 23:05:36 UTC (rev 89873)
@@ -1,3 +1,13 @@
+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
+
+        * fast/harness/resources/results-test.js:
+        * fast/harness/results.html:
+
 2011-06-27  Nate Chapin  <[email protected]>
 
         Unreviewed, Chromium expectations update.

Modified: trunk/LayoutTests/fast/harness/resources/results-test.js (89872 => 89873)


--- trunk/LayoutTests/fast/harness/resources/results-test.js	2011-06-27 22:52:07 UTC (rev 89872)
+++ trunk/LayoutTests/fast/harness/resources/results-test.js	2011-06-27 23:05:36 UTC (rev 89873)
@@ -174,7 +174,7 @@
         assertTrue(expectationTypes[2].textContent == 'IMAGE');
         
         assertTrue(document.getElementById('crash-tests-table'));
-        assertTrue(document.getElementById('crash-tests-table').textContent.indexOf('stack') != -1);
+        assertTrue(document.getElementById('crash-tests-table').textContent.indexOf('crash log') != -1);
         assertTrue(document.getElementById('timeout-tests-table'));
         assertTrue(document.getElementById('timeout-tests-table').textContent.indexOf('expected actual diff') != -1);
     });

Modified: trunk/LayoutTests/fast/harness/results.html (89872 => 89873)


--- trunk/LayoutTests/fast/harness/results.html	2011-06-27 22:52:07 UTC (rev 89872)
+++ trunk/LayoutTests/fast/harness/results.html	2011-06-27 23:05:36 UTC (rev 89873)
@@ -588,7 +588,7 @@
         else if (tableId == 'passes-table')
             html += testObject.expected;
         else if (tableId == 'crash-tests-table')
-            html += resultLink(stripExtension(test), '-stack.txt', 'crash stack');
+            html += resultLink(stripExtension(test), '-crash-log.txt', 'crash log');
         else if (tableId == 'timeout-tests-table') {
             // FIXME: only include timeout actual/diff results here if we actually spit out results for timeout tests.
             html += textResultLinks(stripExtension(test));

Modified: trunk/Tools/ChangeLog (89872 => 89873)


--- trunk/Tools/ChangeLog	2011-06-27 22:52:07 UTC (rev 89872)
+++ trunk/Tools/ChangeLog	2011-06-27 23:05:36 UTC (rev 89873)
@@ -1,3 +1,16 @@
+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
+
+        NRWT used to have a different name for crash logs.  I've changed the
+        name to patch ORWT.
+
+        * Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+
 2011-06-27  Eric Seidel  <[email protected]>
 
         Reviewed by Adam Barth.

Modified: trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py (89872 => 89873)


--- trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py	2011-06-27 22:52:07 UTC (rev 89872)
+++ trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py	2011-06-27 23:05:36 UTC (rev 89873)
@@ -62,5 +62,7 @@
         if not logs:
             return
 
-        self._executive.wait_newest(_is_crash_reporter)
+        # 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/layout_tests/layout_package/test_result_writer.py (89872 => 89873)


--- trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py	2011-06-27 22:52:07 UTC (rev 89872)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py	2011-06-27 23:05:36 UTC (rev 89873)
@@ -30,6 +30,7 @@
 import logging
 import os
 
+from webkitpy.common.system.crashlogs import CrashLogs
 from webkitpy.layout_tests.layout_package import test_failures
 
 
@@ -100,6 +101,7 @@
     FILENAME_SUFFIX_EXPECTED = "-expected"
     FILENAME_SUFFIX_DIFF = "-diff"
     FILENAME_SUFFIX_STDERR = "-stderr"
+    FILENAME_SUFFIX_CRASH_LOG = "-crash-log"
     FILENAME_SUFFIX_WDIFF = "-wdiff.html"
     FILENAME_SUFFIX_PRETTY_PATCH = "-pretty-diff.html"
     FILENAME_SUFFIX_IMAGE_DIFF = "-diff.png"
@@ -167,11 +169,15 @@
         fs.write_binary_file(filename, error)
 
     def write_crash_report(self, error):
-        """Write crash information."""
         fs = self._port._filesystem
-        filename = self.output_filename("-stack.txt")
+        filename = self.output_filename(self.FILENAME_SUFFIX_CRASH_LOG + ".txt")
         fs.maybe_make_directory(fs.dirname(filename))
-        fs.write_text_file(filename, error)
+        # FIXME: We shouldn't be grabbing private members of port.
+        crash_logs = CrashLogs(self._port._executive, 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.
+        fs.write_text_file(filename, log if log else error)
 
     def write_text_files(self, actual_text, expected_text):
         self.write_output_files(".txt", actual_text, expected_text)

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (89872 => 89873)


--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py	2011-06-27 22:52:07 UTC (rev 89872)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py	2011-06-27 23:05:36 UTC (rev 89873)
@@ -415,6 +415,22 @@
             filesystem=fs)
         self.assertTrue(fs.read_text_file('/tmp/layout-test-results/unexpected_results.json').find('{"crash-with-stderr.html":{"expected":"PASS","actual":"CRASH","has_stderr":true}}') != -1)
 
+    def test_crash_log(self):
+        mock_crash_report = 'mock-crash-report'
+        fs = port.unit_test_filesystem()
+        fs.write_text_file('/Users/mock/Library/Logs/DiagnosticReports/DumpRenderTree_2011-06-13-150719_quadzen.crash', mock_crash_report)
+        res, buildbot_output, regular_output, user = logging_run([
+                'failures/unexpected/crash-with-stderr.html',
+            ],
+            tests_included=True,
+            record_results=True,
+            filesystem=fs)
+        expected_crash_log = mock_crash_report
+        # Currently CrashLog uploading only works on Darwin.
+        if sys.platform != "darwin":
+            expected_crash_log = "mock-std-error-output"
+        self.assertEquals(fs.read_text_file('/tmp/layout-test-results/failures/unexpected/crash-with-stderr-crash-log.txt'), expected_crash_log)
+
     def test_exit_after_n_failures_upload(self):
         fs = port.unit_test_filesystem()
         res, buildbot_output, regular_output, user = logging_run([
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to