r323941 - [analyzer] [tests] Show the number of removed/added bug reports
George Karpenkov via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 31 18:38:42 PST 2018
Author: george.karpenkov
Date: Wed Jan 31 18:38:42 2018
New Revision: 323941
URL: http://llvm.org/viewvc/llvm-project?rev=323941&view=rev
Log:
[analyzer] [tests] Show the number of removed/added bug reports
Differential Revision: https://reviews.llvm.org/D42718
Modified:
cfe/trunk/utils/analyzer/CmpRuns.py
Modified: cfe/trunk/utils/analyzer/CmpRuns.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/CmpRuns.py?rev=323941&r1=323940&r2=323941&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/CmpRuns.py (original)
+++ cfe/trunk/utils/analyzer/CmpRuns.py Wed Jan 31 18:38:42 2018
@@ -254,17 +254,22 @@ def dumpScanBuildResultsDiff(dirA, dirB,
diff = compareResults(resultsA, resultsB)
foundDiffs = 0
+ totalAdded = 0
+ totalRemoved = 0
+ totalChanged = 0
for res in diff:
a, b, confidence = res
if a is None:
print "ADDED: %r" % b.getReadableName()
foundDiffs += 1
+ totalAdded += 1
if auxLog:
print >>auxLog, ("('ADDED', %r, %r)" % (b.getReadableName(),
b.getReport()))
elif b is None:
print "REMOVED: %r" % a.getReadableName()
foundDiffs += 1
+ totalRemoved += 1
if auxLog:
print >>auxLog, ("('REMOVED', %r, %r)" % (a.getReadableName(),
a.getReport()))
@@ -272,6 +277,7 @@ def dumpScanBuildResultsDiff(dirA, dirB,
print "CHANGED: %r to %r" % (a.getReadableName(),
b.getReadableName())
foundDiffs += 1
+ totalChanged += 1
if auxLog:
print >>auxLog, ("('CHANGED', %r, %r, %r, %r)"
% (a.getReadableName(),
@@ -284,6 +290,9 @@ def dumpScanBuildResultsDiff(dirA, dirB,
TotalReports = len(resultsB.diagnostics)
print "TOTAL REPORTS: %r" % TotalReports
print "TOTAL DIFFERENCES: %r" % foundDiffs
+ print "TOTAL ADDED: %r" % totalAdded
+ print "TOTAL REMOVED: %r" % totalRemoved
+ print "TOTAL CHANGED: %r" % totalChanged
if auxLog:
print >>auxLog, "('TOTAL NEW REPORTS', %r)" % TotalReports
print >>auxLog, "('TOTAL DIFFERENCES', %r)" % foundDiffs
More information about the cfe-commits
mailing list