From b075c733f31dbe8c695fbbe1b2d8251206e0d8fd Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 12 Aug 2025 10:43:28 +0200 Subject: [PATCH] CI: correct log analysis filename interpolation A previous commit changed to use archiveArtifact() to recover CI logs, and then attempted to "guess" the L1/MAC stats file name through a regex. However, the format "enb-[0-9]+" is not correct, as archiveArtifact() puts the task ID ("[0-9]+") BEFORE the file name (here, "enb"). So, make it more generic and match the final "-enb.log" ("$" means "end of string"). Fixes: 244ea8fc220 ("Use archiveArtifact() for TerminateeNB()") --- ci-scripts/ran.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 49032f01e2..e440fc3a62 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -493,8 +493,8 @@ class RANManagement(): # nrL1_stats.log/nrMAC_stats.log should be in the same directory as main log file # currently the link is only implicit as below based on pattern matching # I will rework this to give the file explicitly - l1_stats_fn = re.sub(r'enb_[0-9]+', 'nrL1_stats', eNBlogFile) - mac_stats_fn = re.sub(r'enb_[0-9]+', 'nrMAC_stats', eNBlogFile) + l1_stats_fn = re.sub(r'-enb.log$', '-nrL1_stats.log', eNBlogFile) + mac_stats_fn = re.sub(r'-enb.log$', '-nrMAC_stats.log', eNBlogFile) if os.path.isfile(l1_stats_fn) and os.path.isfile(mac_stats_fn): # don't use CI-nrL1_stats.log, as this will increase the processing time for # no reason, we just need the last occurence