]> granicus.if.org Git - clang/commitdiff
[analyzer] SATestBuild.py: Move additional checkers logic so SATestAdd.py can use...
authorDevin Coughlin <dcoughlin@apple.com>
Wed, 16 Sep 2015 01:52:32 +0000 (01:52 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Wed, 16 Sep 2015 01:52:32 +0000 (01:52 +0000)
Move the logic looking for additional checkers in the SA_ADDITIONAL_CHECKERS
environmental variable from SATestBuild's main() to runScanBuild(). This allows
SATestAdd.py to use the variable as well. Without it, we won't include
additional checkers when building reference results for the build bot.

Differential Revision: http://reviews.llvm.org/D12891

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247767 91177308-0d34-0410-b5e6-96231b3b80d8

utils/analyzer/SATestBuild.py

index 440b2ec956b07bc6f9d26a6d2c27f8a9f5999241..21cf4524bc751d07db2d3a8d3bceee5f713ef8f9 100755 (executable)
@@ -210,9 +210,14 @@ def runScanBuild(Dir, SBOutputDir, PBuildLogFile):
     if not os.path.exists(BuildScriptPath):
         print "Error: build script is not defined: %s" % BuildScriptPath
         sys.exit(-1)
+
+    AllCheckers = Checkers
+    if os.environ.has_key('SA_ADDITIONAL_CHECKERS'):
+        AllCheckers = AllCheckers + ',' + os.environ['SA_ADDITIONAL_CHECKERS']
+
     SBOptions = "--use-analyzer " + Clang + " "
     SBOptions += "-plist-html -o " + SBOutputDir + " "
-    SBOptions += "-enable-checker " + Checkers + " "
+    SBOptions += "-enable-checker " + AllCheckers + " "
     SBOptions += "--keep-empty "
     # Always use ccc-analyze to ensure that we can locate the failures
     # directory.
@@ -614,7 +619,4 @@ if __name__ == '__main__':
         IsReference = True
         UpdateSVN = True
 
-    if os.environ.has_key('SA_ADDITIONAL_CHECKERS'):
-        Checkers = Checkers + ',' + os.environ['SA_ADDITIONAL_CHECKERS']
-
     testAll(IsReference, UpdateSVN, Strictness)