Removed the daca2-diff script. This functionality is embedded in daca2-report instead.
This commit is contained in:
parent
6812cb57ba
commit
2d00be7a9a
|
@ -1,57 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
|
||||
def parseResults(filename):
|
||||
ftp = ''
|
||||
warnings = []
|
||||
pattern = re.compile(r'.*: (error|warning|style|performance|portability):.* \[([a-zA-Z0-9_\\-]+)\]')
|
||||
for line in open(filename, 'rt'):
|
||||
line = line.strip('\r\n')
|
||||
if line.startswith('ftp://'):
|
||||
ftp = line
|
||||
continue
|
||||
if pattern.match(line):
|
||||
warnings.append(ftp + '\n' + line)
|
||||
return warnings
|
||||
|
||||
def getUnique(warnings1, warnings2):
|
||||
ret = ''
|
||||
for w in warnings1:
|
||||
if w not in warnings2:
|
||||
ret = ret + w + '\n'
|
||||
return ret
|
||||
|
||||
daca2folder = os.path.expanduser('~/daca2/')
|
||||
reportpath = ''
|
||||
for arg in sys.argv[1:]:
|
||||
if arg.startswith('--daca2='):
|
||||
daca2folder = arg[8:]
|
||||
if daca2folder[-1] != '/':
|
||||
daca2folder += '/'
|
||||
else:
|
||||
reportpath = arg
|
||||
if reportpath[-1] != '/':
|
||||
reportpath += '/'
|
||||
|
||||
warnings_base = []
|
||||
warnings_head = []
|
||||
|
||||
for lib in ['', 'lib']:
|
||||
for a in "0123456789abcdefghijklmnopqrstuvwxyz":
|
||||
if not os.path.isfile(daca2folder + lib + a + '/results-1.84.txt'):
|
||||
continue
|
||||
if not os.path.isfile(daca2folder + lib + a + '/results-head.txt'):
|
||||
continue
|
||||
|
||||
warnings_base.extend(parseResults(daca2folder + lib + a + '/results-1.84.txt'))
|
||||
warnings_head.extend(parseResults(daca2folder + lib + a + '/results-head.txt'))
|
||||
|
||||
f = open(reportpath + 'diff-1.84.txt', 'wt')
|
||||
f.write(getUnique(warnings_base, warnings_head))
|
||||
f.close()
|
||||
|
||||
f = open(reportpath + 'diff-head.txt', 'wt')
|
||||
f.write(getUnique(warnings_head, warnings_base))
|
||||
f.close()
|
|
@ -35,7 +35,6 @@ def daca2report(reportfolder):
|
|||
subprocess.call(['rm', '-rf', reportfolder])
|
||||
subprocess.call(['mkdir', reportfolder])
|
||||
subprocess.call(['python', os.path.expanduser('~/cppcheck/tools/daca2-report.py'), reportfolder])
|
||||
subprocess.call(['python', os.path.expanduser('~/cppcheck/tools/daca2-diff.py'), reportfolder])
|
||||
|
||||
|
||||
# Upload file to sourceforge server using scp
|
||||
|
|
Loading…
Reference in New Issue