From 758acb433d577e548b2125ee4051996666766df7 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Wed, 18 Sep 2024 13:33:18 +0200 Subject: [PATCH] Replace renamed files in bugfix test results --- tests/ci/bugfix_validate_check.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/ci/bugfix_validate_check.py b/tests/ci/bugfix_validate_check.py index 932d709a7b8..dbb2d45d343 100644 --- a/tests/ci/bugfix_validate_check.py +++ b/tests/ci/bugfix_validate_check.py @@ -139,13 +139,20 @@ def main(): jr = JobReport.load(from_file=report_file) additional_files.append(report_file) for file in set(jr.additional_files): - file_ = Path(file) - file_name = file_.name + orig_file = Path(file) + file_name = orig_file.name file_name = file_name.replace( ".", "__" + CI.Utils.normalize_string(job_id) + ".", 1 ) - file_ = file_.rename(file_.parent / file_name) - additional_files.append(file_) + new_file = orig_file.rename(orig_file.parent / file_name) + for tr in test_results: + if tr.log_files is None: + continue + tr.log_files = [ + new_file if (Path(log_file) == orig_file) else Path(log_file) + for log_file in tr.log_files + ] + additional_files.append(new_file) JobReport( description=description,