From: Anna Zaks Date: Tue, 24 Jan 2012 21:57:35 +0000 (+0000) Subject: [analyzer] Add the HTML file to the SATest diagnostic diff. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c3038edc2a691b2462ef4bc7fae8f4c9a494154;p=clang [analyzer] Add the HTML file to the SATest diagnostic diff. (Uses the functionality which has been in CmpRuns long before.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148868 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/scan-build/scan-build b/tools/scan-build/scan-build index 8b79c84ae5..59b0bafaef 100755 --- a/tools/scan-build/scan-build +++ b/tools/scan-build/scan-build @@ -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 diff --git a/utils/analyzer/CmpRuns.py b/utils/analyzer/CmpRuns.py index 6d4be71299..e68c45df18 100755 --- a/utils/analyzer/CmpRuns.py +++ b/utils/analyzer/CmpRuns.py @@ -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): diff --git a/utils/analyzer/SATestBuild.py b/utils/analyzer/SATestBuild.py index a45263b15c..ce64ae45d7 100755 --- a/utils/analyzer/SATestBuild.py +++ b/utils/analyzer/SATestBuild.py @@ -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")