]> granicus.if.org Git - clang/commitdiff
[analyzer] Add the HTML file to the SATest diagnostic diff.
authorAnna Zaks <ganna@apple.com>
Tue, 24 Jan 2012 21:57:35 +0000 (21:57 +0000)
committerAnna Zaks <ganna@apple.com>
Tue, 24 Jan 2012 21:57:35 +0000 (21:57 +0000)
(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

tools/scan-build/scan-build
utils/analyzer/CmpRuns.py
utils/analyzer/SATestBuild.py

index 8b79c84ae535c2385cbcb9ef90918a1a7234cd09..59b0bafaefe7df10a174b99f63480e805c480c0f 100755 (executable)
@@ -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
index 6d4be712994e649ed76205da363f12276f2d48b4..e68c45df184af086888e991df9d5cc3c4acf1136 100755 (executable)
@@ -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):
index a45263b15cace4c51084ef33480c94e856d78e83..ce64ae45d7e9c5b123655b44f52cba74bcc83ac8 100755 (executable)
@@ -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")