Title: [191410] trunk/Tools
Revision
191410
Author
commit-qu...@webkit.org
Date
2015-10-21 16:05:53 -0700 (Wed, 21 Oct 2015)

Log Message

run-webkit-tests does not copy all crash logs for layout test failures on Mac
https://bugs.webkit.org/show_bug.cgi?id=150407
<rdar://problem/22239750>

Patch by Aakash Jain <aakash_j...@apple.com> on 2015-10-21
Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/port/mac.py:
(MacPort._merge_crash_logs): Merge unique crash logs from two dictionaries.
(MacPort._look_for_all_crash_logs_in_log_dir): Get the crash logs from
the log directory.
(MacPort.look_for_new_crash_logs): Uses above method to get crash logs
from log directory and merge them with the list of already crashed tests.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (191409 => 191410)


--- trunk/Tools/ChangeLog	2015-10-21 22:30:59 UTC (rev 191409)
+++ trunk/Tools/ChangeLog	2015-10-21 23:05:53 UTC (rev 191410)
@@ -1,3 +1,18 @@
+2015-10-21  Aakash Jain  <aakash_j...@apple.com>
+
+        run-webkit-tests does not copy all crash logs for layout test failures on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=150407
+        <rdar://problem/22239750>
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Scripts/webkitpy/port/mac.py:
+        (MacPort._merge_crash_logs): Merge unique crash logs from two dictionaries.
+        (MacPort._look_for_all_crash_logs_in_log_dir): Get the crash logs from
+        the log directory.
+        (MacPort.look_for_new_crash_logs): Uses above method to get crash logs
+        from log directory and merge them with the list of already crashed tests.
+
 2015-10-21  Filip Pizlo  <fpi...@apple.com>
 
         Failures in PutStackSinkingPhase should be less severe

Modified: trunk/Tools/Scripts/webkitpy/port/mac.py (191409 => 191410)


--- trunk/Tools/Scripts/webkitpy/port/mac.py	2015-10-21 22:30:59 UTC (rev 191409)
+++ trunk/Tools/Scripts/webkitpy/port/mac.py	2015-10-21 23:05:53 UTC (rev 191410)
@@ -220,6 +220,22 @@
             return (stderr, None)
         return (stderr, crash_log)
 
+    def _merge_crash_logs(self, logs, new_logs, crashed_processes):
+        for test, crash_log in new_logs.iteritems():
+            try:
+                process_name = test.split("-")[0]
+                pid = int(test.split("-")[1])
+            except IndexError:
+                continue
+            if not any(entry[1] == process_name and entry[2] == pid for entry in crashed_processes):
+                # if this is a new crash, then append the logs
+                logs[test] = crash_log
+        return logs
+
+    def _look_for_all_crash_logs_in_log_dir(self, newer_than):
+        crash_log = CrashLogs(self.host)
+        return crash_log.find_all_logs(include_errors=True, newer_than=newer_than)
+
     def look_for_new_crash_logs(self, crashed_processes, start_time):
         """Since crash logs can take a long time to be written out if the system is
            under stress do a second pass at the end of the test run.
@@ -236,7 +252,8 @@
             if not crash_log:
                 continue
             crash_logs[test_name] = crash_log
-        return crash_logs
+        all_crash_log = self._look_for_all_crash_logs_in_log_dir(start_time)
+        return self._merge_crash_logs(crash_logs, all_crash_log, crashed_processes)
 
     def look_for_new_samples(self, unresponsive_processes, start_time):
         sample_files = {}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to