daca2: If cppcheck crash, the exitcode is nonzero. Write message in the report when the exitcode is nonzero.

This commit is contained in:
Daniel Marjamäki 2013-12-31 18:24:32 +01:00
parent 32be4094e7
commit 56a5b0d55f
1 changed files with 5 additions and 1 deletions

View File

@ -158,6 +158,7 @@ def scanarchive(filepath):
'../cppcheck-O2', '../cppcheck-O2',
'-D__GCC__', '-D__GCC__',
'--enable=style', '--enable=style',
'--error-exitcode=0',
'--suppressions-list=../suppressions.txt', '--suppressions-list=../suppressions.txt',
'.'], '.'],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
@ -165,7 +166,10 @@ def scanarchive(filepath):
comm = p.communicate() comm = p.communicate()
results = open('results.txt', 'at') results = open('results.txt', 'at')
results.write(comm[1] + '\n') results.write(comm[1])
if p.returncode != 0:
results.write('Exit code is not zero! Crash?\n')
results.write('\n')
results.close() results.close()
FOLDER = None FOLDER = None