diff options
-rwxr-xr-x | BuildTools/FilterScanBuildResults.py | 9 |
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) |