Changeset 89881 in webkit


Ignore:
Timestamp:
Jun 27, 2011 5:33:26 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-06-27 Adam Barth <abarth@webkit.org>

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:
Location:
trunk/Tools
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r89873 r89881  
     12011-06-27  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        NRWT should wait for ReportCrash
     6        https://bugs.webkit.org/show_bug.cgi?id=63495
     7
     8        When a test crashes on Mac, ReportCrash confuses us into thinking the
     9        test times out.
     10
     11        I'm not sure how to test this in a meaningful way in our current test
     12        harness...
     13
     14        * Scripts/webkitpy/common/system/crashlogs.py:
     15        * Scripts/webkitpy/common/system/crashlogs_unittest.py:
     16        * Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py:
     17        * Scripts/webkitpy/layout_tests/port/base.py:
     18        * Scripts/webkitpy/layout_tests/port/mac.py:
     19        * Scripts/webkitpy/layout_tests/port/server_process.py:
     20        * Scripts/webkitpy/tool/commands/queries.py:
     21
    1222011-06-27  Adam Barth  <abarth@webkit.org>
    223
  • trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py

    r89873 r89881  
    3737
    3838class CrashLogs(object):
    39     def __init__(self, executive, filesystem):
    40         self._executive = executive
     39    def __init__(self, filesystem):
    4140        self._filesystem = filesystem
    4241
     
    6261        if not logs:
    6362            return
    64 
    65         # FIXME: We should wait for the CrashReporter to finish, but that causes tests to timeout.
    66         if False:
    67             self._executive.wait_newest(_is_crash_reporter)
    6863        return self._filesystem.read_text_file(sorted(logs)[-1])
  • trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py

    r89843 r89881  
    3838        files['/Users/mock/Library/Logs/DiagnosticReports/TextMate_2011-06-13-150719_quadzen.crash'] = mock_crash_report
    3939        filesystem = MockFileSystem(files)
    40         crash_logs = CrashLogs(Mock(), filesystem)
     40        crash_logs = CrashLogs(filesystem)
    4141        log = crash_logs.find_newest_log("TextMate")
    4242        self.assertTrue(log, mock_crash_report)
  • trunk/Tools/Scripts/webkitpy/common/system/executive.py

    r89843 r89881  
    297297
    298298        if sys.platform in ("win32", "cygwin"):
    299             raise NotImplemented()
     299            # FIXME: running_pids isn't implemented on Windows yet...
     300            return []
    300301
    301302        ps_process = self.popen(['ps', '-eo', 'pid,comm'], stdout=self.PIPE, stderr=self.PIPE)
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py

    r89873 r89881  
    174174        fs.maybe_make_directory(fs.dirname(filename))
    175175        # FIXME: We shouldn't be grabbing private members of port.
    176         crash_logs = CrashLogs(self._port._executive, fs)
     176        crash_logs = CrashLogs(fs)
    177177        log = crash_logs.find_newest_log(self._port.driver_name())
    178178        # CrashLogs doesn't support every platform, so we fall back to
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py

    r89868 r89881  
    289289        return ''.join(diff)
    290290
     291    def is_crash_reporter(self, process_name):
     292        return False
     293
    291294    def driver_name(self):
    292295        """Returns the name of the actual binary that is performing the test,
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py

    r89512 r89881  
    3131import logging
    3232import platform
     33import re
    3334
    3435from webkitpy.layout_tests.port.webkit import WebKitPort
     
    100101           'mac', 'test_expectations.txt')
    101102
     103    def is_crash_reporter(self, process_name):
     104        return re.search(r'ReportCrash', process_name)
     105
    102106    def _skipped_file_paths(self):
    103107        # FIXME: This method will need to be made work for non-mac
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py

    r85982 r89881  
    168168        deadline = time.time() + timeout
    169169        while not self.timed_out and not self.crashed:
     170            if self._executive.running_pids(self._port.is_crash_reporter):
     171                _log.warning('%s is waiting for crash reporter...' % self._name)
     172                self._executive.wait_newest(self._port.is_crash_reporter)
     173
    170174            # poll() is not threadsafe and can throw OSError due to:
    171175            # http://bugs.python.org/issue1731717
  • trunk/Tools/Scripts/webkitpy/tool/commands/queries.py

    r89843 r89881  
    374374
    375375    def execute(self, options, args, tool):
    376         crash_logs = CrashLogs(tool.executive, tool.filesystem)
     376        crash_logs = CrashLogs(tool.filesystem)
    377377        print crash_logs.find_newest_log(args[0])
    378378
Note: See TracChangeset for help on using the changeset viewer.