summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-31 16:35:29 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-31 16:35:29 (GMT)
commitd0f250d26bd1bdb405b2232159e7f84741d13e52 (patch)
tree3b5fcd40f5dc510042c417cfd2542029cf6fcae8 /tools/coverage
parent7d03474e499e9d357c2d69e2333ba5dd0dc03fd4 (diff)
downloadswift-d0f250d26bd1bdb405b2232159e7f84741d13e52.zip
swift-d0f250d26bd1bdb405b2232159e7f84741d13e52.tar.bz2
Add Slimber to coverage tests.
Diffstat (limited to 'tools/coverage')
-rwxr-xr-xtools/coverage/FilterLCovData.py8
-rwxr-xr-xtools/coverage/GenerateCoverageResults.sh1
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/coverage/FilterLCovData.py b/tools/coverage/FilterLCovData.py
index b1dd74e..8d56a7f 100755
--- a/tools/coverage/FilterLCovData.py
+++ b/tools/coverage/FilterLCovData.py
@@ -1,9 +1,15 @@
#!/usr/bin/env python
+# TODO: Add uncovered non-ignored files
+
import sys, re, os.path
assert(len(sys.argv) == 2)
+def isIgnored(file) :
+ return (find.find("/Swiften/") == -1 and find.find("/Slimber/") == -1 and find.find("/Swift/") == -1) or (find.find("/UnitTest/") != -1 or find.find("/QA/") != -1)
+
+
output = []
inputFile = open(sys.argv[1])
inIgnoredFile = False
@@ -12,7 +18,7 @@ for line in inputFile.readlines() :
if line == "end_of_record\n" :
inIgnoredFile = False
else :
- if line.startswith("SF:") and (line.find("/Swiften/") == -1 or line.find("/UnitTest/") != -1 or line.find("/QA/") != -1 or line.find("/3rdParty/") != -1):
+ if line.startswith("SF:") and isIgnored(line) :
inIgnoredFile = True
else :
m = re.match("SF:(.*)", line)
diff --git a/tools/coverage/GenerateCoverageResults.sh b/tools/coverage/GenerateCoverageResults.sh
index 75efaa9..f006e4b 100755
--- a/tools/coverage/GenerateCoverageResults.sh
+++ b/tools/coverage/GenerateCoverageResults.sh
@@ -31,6 +31,7 @@ $LCOVDIR/lcov --zerocounters --directory $SOURCE_DIR
# All tests
make -C $SOURCE_DIR test
$LCOVDIR/lcov --capture --directory $SOURCE_DIR -b $SOURCE_DIR --output-file $OUTPUT_DIR/all.info --test-name all
+cp $OUTPUT_DIR/all.info $OUTPUT_DIR/all.info.orig
$SCRIPT_DIR/FilterLCovData.py $OUTPUT_DIR/all.info
# Generate HTML