summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-08-14 09:13:11 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-08-16 22:13:28 (GMT)
commitd3dad1ccfe1741a5a5f2c610d995b5c8cc603844 (patch)
treeee78712720803addda4a7c3f2e1bc50b402c8257 /tools/coverage/GenerateSummary.py
parent8e53a2df443901f786932942759e5fe7b632852e (diff)
downloadswift-contrib-d3dad1ccfe1741a5a5f2c610d995b5c8cc603844.zip
swift-contrib-d3dad1ccfe1741a5a5f2c610d995b5c8cc603844.tar.bz2
Move coverage tools to BuildTools dir.
Diffstat (limited to 'tools/coverage/GenerateSummary.py')
-rwxr-xr-xtools/coverage/GenerateSummary.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/tools/coverage/GenerateSummary.py b/tools/coverage/GenerateSummary.py
deleted file mode 100755
index ec94a4f..0000000
--- a/tools/coverage/GenerateSummary.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env python
-
-import sys, re
-
-assert(len(sys.argv) == 3)
-
-inputFile = open(sys.argv[1])
-currentFile = ""
-coverage = {}
-for line in inputFile.readlines() :
- line = line.strip()
- m = re.match("^SF:(.*)", line)
- if m :
- currentFile = m.group(1)
- else :
- m = re.match("^DA:(\d+),(\d+)", line)
- if m :
- currentFileCoverage = coverage.get(currentFile, {})
- line = int(m.group(1))
- count = int(m.group(2))
- currentFileCoverage[line] = currentFileCoverage.get(line, 0) + count
- coverage[currentFile] = currentFileCoverage
-inputFile.close()
-
-totalLines = 0
-coveredLines = 0
-for c in coverage.values() :
- totalLines += len(c)
- for l in c.values() :
- if l > 0 :
- coveredLines += 1
-
-outputFile = open(sys.argv[2], 'w')
-outputFile.write(str(coveredLines) + "/" + str(totalLines))
-outputFile.close()