Revert 568a49c409 and do the changes properly.

This commit is contained in:
XhmikosR 2013-10-12 19:40:04 +03:00
parent c59b9aabab
commit e6e6335473
1 changed files with 24 additions and 15 deletions

View File

@ -68,21 +68,30 @@ for package in packages:
subprocess.call(['tar', 'xzvf', filename])
subprocess.call(['rm', filename])
dirname = None
for s in glob.glob(filename[:2] + '*'):
if os.path.isdir(s):
dirname = s
if dirname is None:
continue
dirname = None
for s in glob.glob(filename[:2] + '*'):
if os.path.isdir(s):
dirname = s
if dirname is None:
continue
print('cppcheck "' + dirname + '"')
p = subprocess.Popen(['nice', '../cppcheck-O2', '-j2', '-D__GCC__', '--enable=style', '--suppressions-list=../suppressions.txt', dirname], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
comm = p.communicate()
print('cppcheck "' + dirname + '"')
p = subprocess.Popen(
['nice',
'../cppcheck-O2',
'-j2',
'-D__GCC__',
'--enable=style',
'--suppressions-list=../suppressions.txt',
dirname],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
comm = p.communicate()
results = open('results.txt', 'at')
results.write(fullpath + '\n')
results.write(comm[1] + '\n')
results.close()
results = open('results.txt', 'at')
results.write(fullpath + '\n')
results.write(comm[1] + '\n')
results.close()
# remove all files/folders except results.txt
removeAllExceptResults()
# remove all files/folders except results.txt
removeAllExceptResults()