r338322 - [analyzer] [tests] Style fixes for testing harness.

George Karpenkov via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 30 16:01:20 PDT 2018


Author: george.karpenkov
Date: Mon Jul 30 16:01:20 2018
New Revision: 338322

URL: http://llvm.org/viewvc/llvm-project?rev=338322&view=rev
Log:
[analyzer] [tests] Style fixes for testing harness.

Modified:
    cfe/trunk/utils/analyzer/CmpRuns.py
    cfe/trunk/utils/analyzer/SATestBuild.py

Modified: cfe/trunk/utils/analyzer/CmpRuns.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/CmpRuns.py?rev=338322&r1=338321&r2=338322&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/CmpRuns.py (original)
+++ cfe/trunk/utils/analyzer/CmpRuns.py Mon Jul 30 16:01:20 2018
@@ -312,11 +312,11 @@ def compareStats(resultsA, resultsB):
             # Only apply highlighting when writing to TTY and it's not Windows
             if sys.stdout.isatty() and os.name != 'nt':
                 if valB != 0:
-                  ratio = (valB - valA) / valB
-                  if ratio < -0.2:
-                      report = Colors.GREEN + report + Colors.CLEAR
-                  elif ratio > 0.2:
-                      report = Colors.RED + report + Colors.CLEAR
+                    ratio = (valB - valA) / valB
+                    if ratio < -0.2:
+                        report = Colors.GREEN + report + Colors.CLEAR
+                    elif ratio > 0.2:
+                        report = Colors.RED + report + Colors.CLEAR
             print "\t %s %s" % (kkey, report)
 
 def dumpScanBuildResultsDiff(dirA, dirB, opts, deleteEmpty=True,

Modified: cfe/trunk/utils/analyzer/SATestBuild.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/SATestBuild.py?rev=338322&r1=338321&r2=338322&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/SATestBuild.py (original)
+++ cfe/trunk/utils/analyzer/SATestBuild.py Mon Jul 30 16:01:20 2018
@@ -60,9 +60,9 @@ import threading
 import time
 import Queue
 
-#------------------------------------------------------------------------------
+###############################################################################
 # Helper functions.
-#------------------------------------------------------------------------------
+###############################################################################
 
 Local = threading.local()
 Local.stdout = sys.stdout
@@ -91,9 +91,9 @@ def getProjectMapPath():
     ProjectMapPath = os.path.join(os.path.abspath(os.curdir),
                                   ProjectMapFile)
     if not os.path.exists(ProjectMapPath):
-        Local.stdout.write("Error: Cannot find the Project Map file "
-                           + ProjectMapPath
-                           + "\nRunning script for the wrong directory?\n")
+        Local.stdout.write("Error: Cannot find the Project Map file " +
+                           ProjectMapPath +
+                           "\nRunning script for the wrong directory?\n")
         sys.exit(1)
     return ProjectMapPath
 
@@ -108,9 +108,9 @@ def getSBOutputDirName(IsReferenceBuild)
     else:
         return SBOutputDirName
 
-#------------------------------------------------------------------------------
+###############################################################################
 # Configuration setup.
-#------------------------------------------------------------------------------
+###############################################################################
 
 
 # Find Clang for static analysis.
@@ -185,9 +185,9 @@ Checkers = ",".join([
 
 Verbose = 0
 
-#------------------------------------------------------------------------------
+###############################################################################
 # Test harness logic.
-#------------------------------------------------------------------------------
+###############################################################################
 
 
 def runCleanupScript(Dir, PBuildLogFile):




More information about the cfe-commits mailing list