summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-07-30 23:01:20 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-07-30 23:01:20 +0000
commitcfa1c8b41364c3129868adb6aef52070c29be588 (patch)
treedb36600a571252176533da819befa6f36819ba89 /utils
parentb7709b0bcd2430aa7274537529f370e326e79497 (diff)
downloadclang-cfa1c8b41364c3129868adb6aef52070c29be588.tar.gz
[analyzer] [tests] Style fixes for testing harness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-xutils/analyzer/CmpRuns.py10
-rwxr-xr-xutils/analyzer/SATestBuild.py18
2 files changed, 14 insertions, 14 deletions
diff --git a/utils/analyzer/CmpRuns.py b/utils/analyzer/CmpRuns.py
index 1b8fe7bd69..1c44f5c6a6 100755
--- a/utils/analyzer/CmpRuns.py
+++ b/utils/analyzer/CmpRuns.py
@@ -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,
diff --git a/utils/analyzer/SATestBuild.py b/utils/analyzer/SATestBuild.py
index 4da025aa53..ea95ee289e 100755
--- a/utils/analyzer/SATestBuild.py
+++ b/utils/analyzer/SATestBuild.py
@@ -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):