[analyzer] Add the HTML file to the SATest diagnostic diff.

(Uses the functionality which has been in CmpRuns long before.)

llvm-svn: 148868
This commit is contained in:
Anna Zaks 2012-01-24 21:57:35 +00:00
parent 895c312404
commit b3d896d333
3 changed files with 10 additions and 5 deletions

View File

@ -961,7 +961,11 @@ OPTIONS:
-plist - By default the output of scan-build is a set of HTML files.
This option outputs the results as a set of .plist files.
-plist-html - By default the output of scan-build is a set of HTML files.
This option outputs the results as a set of HTML
and .plist files.
--status-bugs - By default, the exit status of $Prog is the same as the
executed build command. Specifying this option causes the
exit status of $Prog to be 1 if it found potential bugs

View File

@ -77,9 +77,10 @@ class AnalysisDiagnostic:
def getReportData(self):
if self.htmlReport is None:
return " "
return open(os.path.join(self.report.run.path,
self.htmlReport), "rb").read()
return os.path.join(self.report.run.path, self.htmlReport)
# We could also dump the report with:
# return open(os.path.join(self.report.run.path,
# self.htmlReport), "rb").read()
class AnalysisRun:
def __init__(self, path, opts):

View File

@ -132,7 +132,7 @@ def runScanBuild(Dir, SBOutputDir, PBuildLogFile):
if not os.path.exists(BuildScriptPath):
print "Error: build script is not defined: %s" % BuildScriptPath
sys.exit(-1)
SBOptions = "-plist -o " + SBOutputDir + " "
SBOptions = "-plist-html -o " + SBOutputDir + " "
SBOptions += "-enable-checker " + Checkers + " "
try:
SBCommandFile = open(BuildScriptPath, "r")