summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/Coverage/FilterLCovData.py')
-rwxr-xr-xBuildTools/Coverage/FilterLCovData.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/BuildTools/Coverage/FilterLCovData.py b/BuildTools/Coverage/FilterLCovData.py
index 33fd682..e0f5c92 100755
--- a/BuildTools/Coverage/FilterLCovData.py
+++ b/BuildTools/Coverage/FilterLCovData.py
@@ -7,23 +7,23 @@ import sys, re, os.path
assert(len(sys.argv) == 2)
def isIgnored(file) :
- return (file.find("/Swiften/") == -1 and file.find("/Slimber/") == -1 and file.find("/Swift/") == -1) or (file.find("/UnitTest/") != -1 or file.find("/QA/") != -1)
+ return (file.find("/Swiften/") == -1 and file.find("/Slimber/") == -1 and file.find("/Swift/") == -1) or (file.find("/UnitTest/") != -1 or file.find("/QA/") != -1)
output = []
inputFile = open(sys.argv[1])
inIgnoredFile = False
for line in inputFile.readlines() :
- if inIgnoredFile :
- if line == "end_of_record\n" :
- inIgnoredFile = False
- else :
- if line.startswith("SF:") and isIgnored(line) :
- inIgnoredFile = True
- else :
- m = re.match("SF:(.*)", line)
- if m :
- line = "SF:" + os.path.realpath(m.group(1)) + "\n"
- output.append(line)
+ if inIgnoredFile :
+ if line == "end_of_record\n" :
+ inIgnoredFile = False
+ else :
+ if line.startswith("SF:") and isIgnored(line) :
+ inIgnoredFile = True
+ else :
+ m = re.match("SF:(.*)", line)
+ if m :
+ line = "SF:" + os.path.realpath(m.group(1)) + "\n"
+ output.append(line)
inputFile.close()
outputFile = open(sys.argv[1], 'w')