Bug 1093328 - Limit crashreports to first 10 minidumps; r=ted
authorGeoff Brown <gbrown@mozilla.com>
Tue, 04 Nov 2014 08:17:19 -0700
changeset 213936 e80e4fa3a93dfe70c3fdd18f97b7a34f538af8f7
parent 213935 138515da8c06115ef4d9abc81060baadfba8b244
child 213937 910d4f759d201afdd5b62461f25b41545e4664ce
push id27768
push userkwierso@gmail.com
push dateWed, 05 Nov 2014 02:19:03 +0000
treeherdermozilla-central@a1823d3c7365 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1093328
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1093328 - Limit crashreports to first 10 minidumps; r=ted
testing/mozbase/mozcrash/mozcrash/mozcrash.py
--- a/testing/mozbase/mozcrash/mozcrash/mozcrash.py
+++ b/testing/mozbase/mozcrash/mozcrash/mozcrash.py
@@ -177,16 +177,21 @@ class CrashInfo(object):
 
     @property
     def dump_files(self):
         """List of tuple (path_to_dump_file, path_to_extra_file) for each dump
            file in self.dump_directory. The extra files may not exist."""
         if self._dump_files is None:
             self._dump_files = [(path, os.path.splitext(path)[0] + '.extra') for path in
                                 glob.glob(os.path.join(self.dump_directory, '*.dmp'))]
+            max_dumps = 10
+            if len(self._dump_files) > max_dumps:
+                self.logger.warning("Found %d dump files -- limited to %d!" % (len(self._dump_files), max_dumps))
+                del self._dump_files[max_dumps:]
+
         return self._dump_files
 
     @property
     def has_dumps(self):
         """Boolean indicating whether any crash dump files were found in the
         current directory"""
         return len(self.dump_files) > 0