diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-07-31 18:38:11 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-07-31 18:38:11 (GMT) |
commit | 99b65c4dd72105755a7cf95297c9cf69dcbc6446 (patch) | |
tree | c6c862f6ef33b2260c44c0229b29f65351223e7c /tools/coverage | |
parent | fed11bbc3bffd383e097ea63bb92442ce2daf6ed (diff) | |
parent | aa60aa80d2d170a536c246ef6c221f92de7dd8ed (diff) | |
download | swift-99b65c4dd72105755a7cf95297c9cf69dcbc6446.zip swift-99b65c4dd72105755a7cf95297c9cf69dcbc6446.tar.bz2 |
Merge commit 'origin/master' into roster
Diffstat (limited to 'tools/coverage')
-rwxr-xr-x | tools/coverage/FilterLCovData.py | 15 | ||||
-rwxr-xr-x | tools/coverage/GenerateCoverageResults.sh | 1 |
2 files changed, 12 insertions, 4 deletions
diff --git a/tools/coverage/FilterLCovData.py b/tools/coverage/FilterLCovData.py index 8b8d24e..8d56a7f 100755 --- a/tools/coverage/FilterLCovData.py +++ b/tools/coverage/FilterLCovData.py @@ -1,9 +1,15 @@ #!/usr/bin/env python -import sys, re +# 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,11 +18,12 @@ 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 : - if line.startswith("SF:") : - line = line.replace("/./Swiften/", "/Swiften/") + m = re.match("SF:(.*)", line) + if m : + line = "SF:" + os.path.realpath(m.group(1)) + "\n" output.append(line) inputFile.close() 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 |