From d8bc52bffd7ef7750afec20f0443276ba4579267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Mon, 31 Dec 2012 16:29:02 +0100 Subject: Delete ScanBuild report files as well. Change-Id: Ie61040c3bae1ef199ebd17b3e7b1b33b5bfe981d 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) -- cgit v0.10.2-6-g49f6