Changeset 91488 in webkit
- Timestamp:
- Jul 21, 2011, 12:15:35 PM (14 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r91487 r91488 1 2011-07-21 Eric Seidel <eric@webkit.org> 2 3 Unreviewed. Just fixing (and unittesting) a previous typo. 4 5 Fix typo in print_leaks_summary regexp which was causing 6 leaks summarizing to fail on the --leaks bot. 7 8 * Scripts/webkitpy/layout_tests/port/mac.py: 9 * Scripts/webkitpy/layout_tests/port/mac_unittest.py: 10 1 11 2011-07-21 Adam Barth <abarth@webkit.org> 2 12 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py
r91323 r91488 116 116 return 117 117 118 # total: 5,888 bytes (0 bytes excluded). 118 119 unique_leak_count = len(re.findall(r'^(\d*)\scalls', parse_malloc_history_output)) 119 total_bytes = int(re.search(r'^total\:\s(.*)\s\(', parse_malloc_history_output).group(1))120 return (total_bytes , unique_leak_count)120 total_bytes_string = re.search(r'^total\:\s(.+)\s\(', parse_malloc_history_output, re.MULTILINE).group(1) 121 return (total_bytes_string, unique_leak_count) 121 122 122 123 def check_for_leaks(self, process_name, process_pid): … … 131 132 return 132 133 134 # FIXME: We should consider moving leaks parsing to the end when summarizing is done. 133 135 count, excluded, bytes = self._parse_leaks_output(leaks_output, process_pid) 134 136 adjusted_count = count - excluded … … 254 256 # We're in the manager process, so the leak detector will not have a valid list of leak files. 255 257 # FIXME: This is a hack, but we don't have a better way to get this information from the workers yet. 258 # FIXME: This will include too many leaks in subsequent runs until the results directory is cleared! 256 259 leaks_files = self._leak_detector.leaks_files_in_directory(self.results_directory()) 257 260 if not leaks_files: 258 261 return 259 total_bytes, unique_leaks = self._leak_detector.parse_leak_files(leaks_files) 260 _log.info("%s total leaks found for a total of %s!" % (self._total_leaks, total_bytes)) 262 total_bytes_string, unique_leaks = self._leak_detector.parse_leak_files(leaks_files) 263 # old-run-webkit-tests used to print the "total leaks" count, but that would 264 # require re-parsing each of the leaks files (which we could do at some later point if that would be useful.) 265 # Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg greps for "leaks found". 266 # master.cfg will need an update if these strings change. 267 _log.info("leaks found for a total of %s!" % total_bytes_string) 261 268 _log.info("%s unique leaks found!" % unique_leaks) 262 269 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
r91245 r91488 100 100 def mock_run_script(name, args, include_configuration_arguments=False): 101 101 print "MOCK _run_script: %s %s" % (name, args) 102 return "total: 12345 (" 102 return """1 calls for 16 bytes: -[NSURLRequest mutableCopyWithZone:] | +[NSObject(NSObject) allocWithZone:] | _internal_class_createInstanceFromZone | calloc | malloc_zone_calloc 103 104 total: 5,888 bytes (0 bytes excluded).""" 103 105 detector._port._run_script = mock_run_script 104 106 … … 106 108 expected_stdout = "MOCK _run_script: parse-malloc-history ['--merge-depth', 5, '/mock-results/leaks-DumpRenderTree-1234.txt', '/mock-results/leaks-DumpRenderTree-1235.txt']\n" 107 109 results_tuple = OutputCapture().assert_outputs(self, detector.parse_leak_files, [leak_files], expected_stdout=expected_stdout) 108 self.assertEquals(results_tuple, ( 12345, 0))110 self.assertEquals(results_tuple, ("5,888 bytes", 1)) 109 111 110 112
Note:
See TracChangeset
for help on using the changeset viewer.