summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-31 15:29:02 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-31 15:29:02 (GMT)
commitd8bc52bffd7ef7750afec20f0443276ba4579267 (patch)
tree67696e0135853fae7e2f5f4dc678f3e8cab78103
parent0c8499e78e0f0b7587bd5b656f50b2934afb273e (diff)
downloadswift-contrib-d8bc52bffd7ef7750afec20f0443276ba4579267.zip
swift-contrib-d8bc52bffd7ef7750afec20f0443276ba4579267.tar.bz2
Delete ScanBuild report files as well.
Change-Id: Ie61040c3bae1ef199ebd17b3e7b1b33b5bfe981d
-rwxr-xr-xBuildTools/FilterScanBuildResults.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/BuildTools/FilterScanBuildResults.py b/BuildTools/FilterScanBuildResults.py
index 05c9051..53a345f 100755
--- a/BuildTools/FilterScanBuildResults.py
+++ b/BuildTools/FilterScanBuildResults.py
@@ -1,12 +1,13 @@
#!/usr/bin/env python
-import os, os.path, sys
+import os, os.path, sys, re
resultsDir = sys.argv[1]
resultDirs = [ d for d in os.listdir(resultsDir) if os.path.isdir(os.path.join(resultsDir, d)) ]
resultDirs.sort()
if len(resultDirs) > 0 :
- resultFileName = os.path.join(resultsDir, resultDirs[-1], "index.html")
+ resultDir = os.path.join(resultsDir, resultDirs[-1])
+ resultFileName = os.path.join(resultDir, "index.html")
resultData = []
f = open(resultFileName, "r")
skipLines = 0
@@ -14,7 +15,9 @@ if len(resultDirs) > 0 :
if skipLines > 0 :
skipLines -= 1
else :
- if "3rdParty" in line or "SHA1.cpp" in line or "lua.c" in line :
+ if ("3rdParty" in line or "SHA1.cpp" in line or "lua.c" in line) :
+ m = re.match(".*(report-.*\.html)", line)
+ os.remove(os.path.join(resultDir, m.group(1)))
skipLines = 2
else :
resultData.append(line)