mirror of https://github.com/microsoft/clang.git
[analyzer] [tests] Style fixes for testing harness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338322 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b7709b0bcd
commit
cfa1c8b413
|
@ -312,11 +312,11 @@ def compareStats(resultsA, resultsB):
|
||||||
# Only apply highlighting when writing to TTY and it's not Windows
|
# Only apply highlighting when writing to TTY and it's not Windows
|
||||||
if sys.stdout.isatty() and os.name != 'nt':
|
if sys.stdout.isatty() and os.name != 'nt':
|
||||||
if valB != 0:
|
if valB != 0:
|
||||||
ratio = (valB - valA) / valB
|
ratio = (valB - valA) / valB
|
||||||
if ratio < -0.2:
|
if ratio < -0.2:
|
||||||
report = Colors.GREEN + report + Colors.CLEAR
|
report = Colors.GREEN + report + Colors.CLEAR
|
||||||
elif ratio > 0.2:
|
elif ratio > 0.2:
|
||||||
report = Colors.RED + report + Colors.CLEAR
|
report = Colors.RED + report + Colors.CLEAR
|
||||||
print "\t %s %s" % (kkey, report)
|
print "\t %s %s" % (kkey, report)
|
||||||
|
|
||||||
def dumpScanBuildResultsDiff(dirA, dirB, opts, deleteEmpty=True,
|
def dumpScanBuildResultsDiff(dirA, dirB, opts, deleteEmpty=True,
|
||||||
|
|
|
@ -60,9 +60,9 @@ import threading
|
||||||
import time
|
import time
|
||||||
import Queue
|
import Queue
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
###############################################################################
|
||||||
# Helper functions.
|
# Helper functions.
|
||||||
#------------------------------------------------------------------------------
|
###############################################################################
|
||||||
|
|
||||||
Local = threading.local()
|
Local = threading.local()
|
||||||
Local.stdout = sys.stdout
|
Local.stdout = sys.stdout
|
||||||
|
@ -91,9 +91,9 @@ def getProjectMapPath():
|
||||||
ProjectMapPath = os.path.join(os.path.abspath(os.curdir),
|
ProjectMapPath = os.path.join(os.path.abspath(os.curdir),
|
||||||
ProjectMapFile)
|
ProjectMapFile)
|
||||||
if not os.path.exists(ProjectMapPath):
|
if not os.path.exists(ProjectMapPath):
|
||||||
Local.stdout.write("Error: Cannot find the Project Map file "
|
Local.stdout.write("Error: Cannot find the Project Map file " +
|
||||||
+ ProjectMapPath
|
ProjectMapPath +
|
||||||
+ "\nRunning script for the wrong directory?\n")
|
"\nRunning script for the wrong directory?\n")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
return ProjectMapPath
|
return ProjectMapPath
|
||||||
|
|
||||||
|
@ -108,9 +108,9 @@ def getSBOutputDirName(IsReferenceBuild):
|
||||||
else:
|
else:
|
||||||
return SBOutputDirName
|
return SBOutputDirName
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
###############################################################################
|
||||||
# Configuration setup.
|
# Configuration setup.
|
||||||
#------------------------------------------------------------------------------
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
# Find Clang for static analysis.
|
# Find Clang for static analysis.
|
||||||
|
@ -185,9 +185,9 @@ Checkers = ",".join([
|
||||||
|
|
||||||
Verbose = 0
|
Verbose = 0
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
###############################################################################
|
||||||
# Test harness logic.
|
# Test harness logic.
|
||||||
#------------------------------------------------------------------------------
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
def runCleanupScript(Dir, PBuildLogFile):
|
def runCleanupScript(Dir, PBuildLogFile):
|
||||||
|
|
Loading…
Reference in New Issue