donate_cpu_lib.py: fixed detection of ThreadExecutor error (#3521)

This commit is contained in:
Oliver Stöneberg 2021-10-24 11:02:51 +02:00 committed by GitHub
parent 90ba25a6bc
commit 7004ceb691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 7 deletions

View File

@ -15,7 +15,7 @@ import shlex
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
# changes)
CLIENT_VERSION = "1.3.15"
CLIENT_VERSION = "1.3.16"
# Timeout for analysis with Cppcheck in seconds
CPPCHECK_TIMEOUT = 30 * 60
@ -385,20 +385,21 @@ def scan_package(work_path, cppcheck_path, jobs, libraries):
return returncode, stacktrace, '', returncode, options, ''
if returncode != 0:
# returncode is always 1 when this message is written
thr_pos = stderr.find('#### ThreadExecutor')
if thr_pos != -1:
print('Thread!')
return -222, stderr[thr_pos:], '', -222, options, ''
print('Error!')
if returncode > 0:
returncode = -100-returncode
return returncode, stdout, '', returncode, options, ''
if sig_num != -1:
print('Error!')
print('Signal!')
return -sig_num, ''.join(internal_error_messages_list), '', -sig_num, options, ''
thr_pos = stderr.find('#### ThreadExecutor')
if thr_pos != -1:
print('Thread!')
return -222, stderr[thr_pos:], '', -222, options, ''
return count, ''.join(issue_messages_list), ''.join(information_messages_list), elapsed_time, options, timing_str