]> granicus.if.org Git - clang/commitdiff
[Analyzer] Fix minor errors in python scripts.
authorGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 22 Sep 2017 22:58:46 +0000 (22:58 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 22 Sep 2017 22:58:46 +0000 (22:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314042 91177308-0d34-0410-b5e6-96231b3b80d8

utils/analyzer/SATestBuild.py
utils/analyzer/SATestUpdateDiffs.py

index 8d44b75729e7cd4771dedb3eb2b9d6beeab7f5e1..a053f5fb013bd4ce1d941083d1ba84ba4f783e9e 100755 (executable)
@@ -485,7 +485,6 @@ def checkBuild(SBOutputDir):
                                                    % (NumOfFailuresInSummary,))
         # TODO: Add a line "See the results folder for more."
 
-        FailuresCopied = NumOfFailuresInSummary
         Idx = 0
         for FailLogPathI in Failures:
             if Idx >= NumOfFailuresInSummary:
index 994fd1f07493032359b5d2b7b0ac398197e20e61..df836b10f84f11c5a38abfc183379456bad21b24 100755 (executable)
@@ -4,8 +4,9 @@
 Update reference results for static analyzer.
 """
 
-from subprocess import check_call, check_output, CalledProcessError
-import csv
+import SATestBuild
+
+from subprocess import check_call
 import os
 import sys
 
@@ -35,8 +36,7 @@ def updateReferenceResults(ProjName, ProjBuildMode):
     runCmd('cp -r "%s" "%s"' % (CreatedResultsPath, RefResultsPath,))
 
     # Run cleanup script.
-    with open(SATestBuild.getBuildLogPath(RefResultsPath), "wb+")
-            as PBuildLogFile:
+    with open(SATestBuild.getBuildLogPath(RefResultsPath), "wb+") as PBuildLogFile:
         SATestBuild.runCleanupScript(ProjDir, PBuildLogFile)
 
     SATestBuild.normalizeReferenceResults(ProjDir, RefResultsPath, ProjBuildMode)
@@ -52,7 +52,7 @@ def updateReferenceResults(ProjName, ProjBuildMode):
 def main(argv):
     if len(argv) == 2 and argv[1] in ('-h', '--help'):
         print >> sys.stderr, "Update static analyzer reference results based "\
-                             "\non the previous run of SATestBuild.py.\n"
+                             "\non the previous run of SATestBuild.py.\n"\
                              "\nN.B.: Assumes that SATestBuild.py was just run."
         sys.exit(-1)