diff options
author | Anna Zaks <ganna@apple.com> | 2011-11-08 19:56:31 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-11-08 19:56:31 +0000 |
commit | 767d356f878ef7b1f0b9edbcee48561f42b7a36f (patch) | |
tree | d36a48a6f27b728ffa6e08729c648a80d1bdcb78 /clang/utils/analyzer/CmpRuns.py | |
parent | 13076521850a1c207be63827563c772c2e931346 (diff) | |
download | bcm5719-llvm-767d356f878ef7b1f0b9edbcee48561f42b7a36f.tar.gz bcm5719-llvm-767d356f878ef7b1f0b9edbcee48561f42b7a36f.zip |
[analyzer] Testing: Display the number of reported differences in the main log.
llvm-svn: 144113
Diffstat (limited to 'clang/utils/analyzer/CmpRuns.py')
-rwxr-xr-x | clang/utils/analyzer/CmpRuns.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/clang/utils/analyzer/CmpRuns.py b/clang/utils/analyzer/CmpRuns.py index b37c0022400..2072e4d0a1b 100755 --- a/clang/utils/analyzer/CmpRuns.py +++ b/clang/utils/analyzer/CmpRuns.py @@ -189,25 +189,25 @@ def cmpScanBuildResults(dirA, dirB, opts, deleteEmpty=True): auxLog = None diff = compareResults(resultsA, resultsB) - foundDiffs = False + foundDiffs = 0 for res in diff: a,b,confidence = res if a is None: print "ADDED: %r" % b.getReadableName() - foundDiffs = True + foundDiffs += 1 if auxLog: print >>auxLog, ("('ADDED', %r, %r)" % (b.getReadableName(), b.getReportData())) elif b is None: print "REMOVED: %r" % a.getReadableName() - foundDiffs = True + foundDiffs += 1 if auxLog: print >>auxLog, ("('REMOVED', %r, %r)" % (a.getReadableName(), a.getReportData())) elif confidence: print "CHANGED: %r to %r" % (a.getReadableName(), b.getReadableName()) - foundDiffs = True + foundDiffs += 1 if auxLog: print >>auxLog, ("('CHANGED', %r, %r, %r, %r)" % (a.getReadableName(), @@ -217,10 +217,13 @@ def cmpScanBuildResults(dirA, dirB, opts, deleteEmpty=True): else: pass - print "TOTAL REPORTS: %r" % len(resultsB.diagnostics) + TotalReports = len(resultsB.diagnostics) + print "TOTAL REPORTS: %r" % TotalReports + print "TOTAL DIFFERENCES: %r" % foundDiffs if auxLog: - print >>auxLog, "('TOTAL REPORTS', %r)" % len(resultsB.diagnostics) - + print >>auxLog, "('TOTAL NEW REPORTS', %r)" % TotalReports + print >>auxLog, "('TOTAL DIFFERENCES', %r)" % foundDiffs + return foundDiffs def main(): |