From 2cde81e190a9b77a7279b48b7e94635f410c14f1 Mon Sep 17 00:00:00 2001 From: Robert Raposa Date: Thu, 30 Apr 2020 11:04:25 -0400 Subject: [PATCH] fix get_worker_test_list.py (#23842) * fix get_worker_test_list.py The test name is not always at the same index in the line, so pull it from the regex instead. --- scripts/xdist/get_worker_test_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/xdist/get_worker_test_list.py b/scripts/xdist/get_worker_test_list.py index 6800b4f371..62939ffd1f 100644 --- a/scripts/xdist/get_worker_test_list.py +++ b/scripts/xdist/get_worker_test_list.py @@ -32,12 +32,12 @@ def main(log_file, test_suite): worker_test_dict = {} with io.open(log_file, 'r') as console_file: for line in console_file: - regex_search = re.search(r'\[gw(\d+)] (PASSED|FAILED|SKIPPED|ERROR)'.format(test_suite), line) + regex_search = re.search(r'\[gw(\d+)] (PASSED|FAILED|SKIPPED|ERROR) (\S+)'.format(test_suite), line) if regex_search: worker_num_string = regex_search.group(1) if worker_num_string not in worker_test_dict: worker_test_dict[worker_num_string] = [] - test = line.split()[2] + test = regex_search.group(3) if test_suite == "commonlib-unit": if "pavelib" not in test and not test.startswith('scripts'): test = u"common/lib/{}".format(test)