summaryrefslogtreecommitdiffstats
path: root/clang/utils/analyzer/SATestBuild.py
diff options
context:
space:
mode:
authorDevin Coughlin <dcoughlin@apple.com>2016-09-19 01:36:40 +0000
committerDevin Coughlin <dcoughlin@apple.com>2016-09-19 01:36:40 +0000
commit0dfc6f0809c27127bd61137c99cc8aa0b5e8e35a (patch)
treeda1c749f52a4ae25665b38d6355fe723c4986dfd /clang/utils/analyzer/SATestBuild.py
parenteeee3b17f3d5b5eada17b7152130761af98fc65a (diff)
downloadbcm5719-llvm-0dfc6f0809c27127bd61137c99cc8aa0b5e8e35a.tar.gz
bcm5719-llvm-0dfc6f0809c27127bd61137c99cc8aa0b5e8e35a.zip
[analyzer] SATestBuild.py: Treat '#' as comment in projectMap.csv
Treat lines in projectMap.csv that start with '#' as comments. This enables a workflow where projects can be temporarily disabled with a comment describing when they should be turned back on. Differential Revision: https://reviews.llvm.org/D24709 llvm-svn: 281880
Diffstat (limited to 'clang/utils/analyzer/SATestBuild.py')
-rwxr-xr-xclang/utils/analyzer/SATestBuild.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/utils/analyzer/SATestBuild.py b/clang/utils/analyzer/SATestBuild.py
index ab68518b5ac..18c5393988a 100755
--- a/clang/utils/analyzer/SATestBuild.py
+++ b/clang/utils/analyzer/SATestBuild.py
@@ -660,11 +660,17 @@ def testProject(ID, ProjectBuildMode, IsReferenceBuild=False, Dir=None, Strictne
print "Completed tests for project %s (time: %.2f)." % \
(ID, (time.time()-TBegin))
+def isCommentCSVLine(Entries):
+ # Treat CSV lines starting with a '#' as a comment.
+ return len(Entries) > 0 and Entries[0].startswith("#")
+
def testAll(IsReferenceBuild = False, UpdateSVN = False, Strictness = 0):
PMapFile = open(getProjectMapPath(), "rb")
try:
# Validate the input.
for I in csv.reader(PMapFile):
+ if (isCommentCSVLine(I)):
+ continue
if (len(I) != 2) :
print "Error: Rows in the ProjectMapFile should have 3 entries."
raise Exception()
@@ -682,6 +688,8 @@ def testAll(IsReferenceBuild = False, UpdateSVN = False, Strictness = 0):
# Test the projects.
PMapFile.seek(0)
for I in csv.reader(PMapFile):
+ if isCommentCSVLine(I):
+ continue;
testProject(I[0], int(I[1]), IsReferenceBuild, None, Strictness)
# Add reference results to SVN.
OpenPOWER on IntegriCloud