Changeset 114960 in webkit
- Timestamp:
- Apr 23, 2012 4:13:13 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r114955 r114960 1 2012-04-23 Dirk Pranke <dpranke@chromium.org> 2 3 run-perf-tests fail intermittently with an exception 4 https://bugs.webkit.org/show_bug.cgi?id=83532 5 6 Reviewed by Ryosuke Niwa. 7 8 This bulletproofs port.get_option('child_processes') 9 against the case where the option wasn't set. 10 11 * Scripts/webkitpy/layout_tests/port/mac.py: 12 (MacPort._get_crash_log): 13 * Scripts/webkitpy/layout_tests/port/mac_unittest.py: 14 (test_get_crash_log): 15 (test_get_crash_log.fake_time_cb): 16 1 17 2012-04-23 Balazs Kelemen <kbalazs@webkit.org> 2 18 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py
r114577 r114960 176 176 pass 177 177 178 def _get_crash_log(self, name, pid, stdout, stderr, newer_than ):178 def _get_crash_log(self, name, pid, stdout, stderr, newer_than, time_fn=None, sleep_fn=None): 179 179 # Note that we do slow-spin here and wait, since it appears the time 180 180 # ReportCrash takes to actually write and flush the file varies when there are 181 181 # lots of simultaneous crashes going on. 182 182 # FIXME: Should most of this be moved into CrashLogs()? 183 time_fn = time_fn or time.time 184 sleep_fn = sleep_fn or time.sleep 183 185 crash_log = '' 184 186 crash_logs = CrashLogs(self._filesystem) 185 now = time .time()187 now = time_fn() 186 188 # FIXME: delete this after we're sure this code is working ... 187 189 _log.debug('looking for crash log for %s:%s' % (name, str(pid))) 188 deadline = now + 5 * int(self.get_option('child_processes' ))190 deadline = now + 5 * int(self.get_option('child_processes', 1)) 189 191 while not crash_log and now <= deadline: 190 192 crash_log = crash_logs.find_newest_log(name, pid, include_errors=True, newer_than=newer_than) 191 193 if not crash_log or not [line for line in crash_log.splitlines() if not line.startswith('ERROR')]: 192 time.sleep(0.1)193 now = time .time()194 sleep_fn(0.1) 195 now = time_fn() 194 196 if not crash_log: 195 197 crash_log = 'no crash log found for %s:%d' % (name, pid) -
trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
r111945 r114960 191 191 192 192 def test_get_crash_log(self): 193 # Mac crash logs are tested elsewhere 194 pass 193 # Mac crash logs are tested elsewhere, so here we just make sure we don't crash. 194 def fake_time_cb(): 195 times = [0, 20, 40] 196 return lambda: times.pop(0) 197 port = self.make_port(port_name='mac-snowleopard') 198 port._get_crash_log('DumpRenderTree', 1234, '', '', 0, 199 time_fn=fake_time_cb(), sleep_fn=lambda delay: None) 195 200 196 201 def test_helper_starts(self):
Note: See TracChangeset
for help on using the changeset viewer.