summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-18 17:59:47 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-18 18:10:35 (GMT)
commit2f6c2299c28c9bb03ee1437058a4c7071ff2ac3f (patch)
tree5fb82cd3ea77b82ce0c5fec973e1fee4de1def4b /BuildTools/Coverage
parent6d115ace1a038acd1a4354391c552bef84d67e79 (diff)
downloadswift-2f6c2299c28c9bb03ee1437058a4c7071ff2ac3f.zip
swift-2f6c2299c28c9bb03ee1437058a4c7071ff2ac3f.tar.bz2
Updated coverage tools.
Updated LCov to 1.9. Removed obsolete overview script.
Diffstat (limited to 'BuildTools/Coverage')
-rwxr-xr-xBuildTools/Coverage/GenerateCoverageResults.sh2
-rwxr-xr-xBuildTools/Coverage/GenerateOverview.py63
2 files changed, 1 insertions, 64 deletions
diff --git a/BuildTools/Coverage/GenerateCoverageResults.sh b/BuildTools/Coverage/GenerateCoverageResults.sh
index 111dc07..3f7accb 100755
--- a/BuildTools/Coverage/GenerateCoverageResults.sh
+++ b/BuildTools/Coverage/GenerateCoverageResults.sh
@@ -29,7 +29,7 @@ $SCRIPT_DIR/FilterLCovData.py $OUTPUT_DIR/all.info
# Generate HTML
$LCOVDIR/gendesc -o $OUTPUT_DIR/descriptions $SCRIPT_DIR/descriptions.txt
-$LCOVDIR/genhtml --no-function-coverage --title "Swift Coverage" --output-directory $OUTPUT_DIR $OUTPUT_DIR/all.info
+$LCOVDIR/genhtml --prefix $PWD --no-function-coverage --title "Swift Coverage" --output-directory $OUTPUT_DIR $OUTPUT_DIR/all.info
# Generate summary
$SCRIPT_DIR/GenerateSummary.py $OUTPUT_DIR/all.info $OUTPUT_DIR/summary
diff --git a/BuildTools/Coverage/GenerateOverview.py b/BuildTools/Coverage/GenerateOverview.py
deleted file mode 100755
index 8928afd..0000000
--- a/BuildTools/Coverage/GenerateOverview.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-
-import sys, os.path
-
-assert(len(sys.argv) == 4)
-
-resultsDir = sys.argv[1]
-summaryFile = sys.argv[2]
-overviewFile = sys.argv[3]
-
-results = []
-for dir in os.listdir(resultsDir) :
- summary = os.path.join(resultsDir, dir, summaryFile)
- if os.path.exists(summary) :
- file = open(summary)
- lines = file.readlines()
- if len(lines) == 0 or len(lines[0].split("/")) != 2 :
- continue
- coveredCount = int(lines[0].split("/")[0])
- totalCount = int(lines[0].split("/")[1])
- results.append((dir,coveredCount,totalCount))
-
-# Compute coverage chart URL
-chartparams = ["chs=320x240", "cht=lc", "chtt=Coverage (Relative)", "chxt=y", "chxl=0:|50%|80%|100%|", "chxp=0,50,80,100"]
-chartdata = []
-for (url,covered,total) in results :
- chartdata.append(str(100*covered/total))
-chartparams.append("chd=t:" + ",".join(chartdata))
-coverageChartURL = "http://chart.apis.google.com/chart?" + '&'.join(chartparams)
-
-# Compute the maximum of lines over time
-maximumNumberOfLines = 0
-for (url,covered,total) in results :
- maximumNumberOfLines = max(maximumNumberOfLines,total)
-
-# Compute code chart URL
-chartparams = ["chs=320x240", "cht=lc", "chtt=Coverage (Absolute)", "chxt=y", "chxl=0:|" + str(maximumNumberOfLines) + "|", "chxp=0,100", "chm=b,FF0000,0,1,0|b,80C65A,1,2,0", "chco=00000000,00000000,00000000"]
-coveredLinesData = []
-totalLinesData = []
-nullLinesData = []
-for (url,covered,total) in results :
- coveredLinesData.append(str(100*covered/maximumNumberOfLines))
- totalLinesData.append(str(100*total/maximumNumberOfLines))
- nullLinesData.append("0")
-chartparams.append("chd=t:" + ",".join(totalLinesData) + "|" + ",".join(coveredLinesData) + "|" + ",".join(nullLinesData))
-codeChartURL = "http://chart.apis.google.com/chart?" + '&'.join(chartparams)
-
-
-# Output page
-output = open(os.path.join(resultsDir,overviewFile), 'w')
-output.write("<img src=\"%(url)s\"s/>" % {'url' : coverageChartURL})
-output.write("<img src=\"%(url)s\"s/>" % {'url' : codeChartURL})
-output.write("<ul>\n")
-for (url,covered,total) in results :
- output.write("<li><a href='%(url)s/index.html'>%(url)s</a> %(percentage)s%% (%(covered)s/%(total)s)</li>\n" % {
- 'url' : url,
- 'percentage' : 100*covered / total,
- 'covered' : covered,
- 'total' : total
- })
-output.write("</ul>")
-output.close()
-