From 7004ceb69127159a88b682c2fc47762a274ae708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Sun, 24 Oct 2021 11:02:51 +0200 Subject: [PATCH] donate_cpu_lib.py: fixed detection of ThreadExecutor error (#3521) --- tools/donate_cpu_lib.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/donate_cpu_lib.py b/tools/donate_cpu_lib.py index 09d506937..3fbe29235 100644 --- a/tools/donate_cpu_lib.py +++ b/tools/donate_cpu_lib.py @@ -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