summaryrefslogtreecommitdiffstats
path: root/tools/purify
diff options
context:
space:
mode:
authorpamg@google.com <pamg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 18:35:38 +0000
committerpamg@google.com <pamg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 18:35:38 +0000
commit1720fa7242c1da5b98948b0c704cfbc136f17cdf (patch)
tree30a70a765f911aa57d75a94b66ea88db078d38e8 /tools/purify
parent43ebb4d08c62012d6719646edb93f44e45e01d42 (diff)
downloadchromium_src-1720fa7242c1da5b98948b0c704cfbc136f17cdf.zip
chromium_src-1720fa7242c1da5b98948b0c704cfbc136f17cdf.tar.gz
chromium_src-1720fa7242c1da5b98948b0c704cfbc136f17cdf.tar.bz2
Report the total number of fixable and fixable-but-flakey messages listed in
the data files for the executable under test, to give it better visibility. BUG=5469 TEST=look for 'Fixable errors' and 'Flakey errors' lines in output on buildbot; verify counts from the lines output just before them Review URL: http://codereview.chromium.org/17304 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/purify')
-rw-r--r--tools/purify/purify_analyze.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/purify/purify_analyze.py b/tools/purify/purify_analyze.py
index 299910c..6865697 100644
--- a/tools/purify/purify_analyze.py
+++ b/tools/purify/purify_analyze.py
@@ -404,6 +404,7 @@ class PurifyAnalyze:
if echo == None:
echo = self._echo
logging.info("summary of Purify messages:")
+ self._ReportFixableMessages()
for key in self._message_lists:
list = self._message_lists[key]
unique = list.UniqueMessages()
@@ -613,6 +614,32 @@ class PurifyAnalyze:
f.close()
return True
+ def _ReportFixableMessages(self):
+ ''' Collects all baseline files for the executable being tested, including
+ lists of flakey results, and logs the total number of messages in them.
+ '''
+ # TODO(pamg): As long as we're looking at all the files, we could use the
+ # information to report any message types that no longer happen at all.
+ fixable = 0
+ flakey = 0
+ paths = [os.path.join(self._data_dir, x)
+ for x in os.listdir(self._data_dir)]
+ for path in paths:
+ # We only care about this executable's files, and not its gtest filters.
+ if (not os.path.basename(path).startswith(self._name) or
+ not path.endswith(".txt") or
+ path.endswith("gtest.txt") or
+ not os.path.isfile(path)):
+ continue
+ msgs = self._MessageHashesFromFile(path)
+ if path.find("flakey") == -1:
+ fixable += len(msgs)
+ else:
+ flakey += len(msgs)
+
+ logging.info("Fixable errors: %s" % fixable)
+ logging.info("Flakey errors: %s" % flakey)
+
def _MessageHashesFromFile(self, filename):
''' Reads a file of normalized messages (see SaveResults) and creates a
dictionary mapping the hash of each message to its text.