diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index d85659568bc76b4973b89ed9b5cbbecf4a8944c1..e24a0325c332719b559c5d3f0afe3346808024bb 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -723,9 +723,13 @@ class Containerize(): cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml config | grep com.docker.network.bridge.name | sed -e "s@^.*name: @@"' networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) if re.search('4g.*rfsimulator', self.yamlPath[0]) is not None: + # Excluding any traffic from LTE-UE container (192.168.61.30) + # From the trf-gen, keeping only PING traffic cmd = 'sudo nohup tshark -f "(host 192.168.61.11 and icmp) or (not host 192.168.61.11 and not host 192.168.61.30 and not arp and not port 53 and not port 2152)"' elif re.search('5g.*rfsimulator', self.yamlPath[0]) is not None: - cmd = 'sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not host 192.168.71.150 and not arp and not port 53 and not port 2152 and not port 2153)"' + # Excluding any traffic from NR-UE containers (192.168.71.150 and 192.168.71.151) + # From the ext-dn, keeping only PING traffic + cmd = 'sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not host 192.168.71.150 and not host 192.168.71.151 and not arp and not port 53 and not port 2152 and not port 2153)"' else: return for name in networkNames.split('\n'): @@ -781,46 +785,48 @@ class Containerize(): # Analyzing log file(s)! listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du'] for container in listOfPossibleRanContainers: - filename = self.yamlPath[0] + '/rfsim?g-oai-' + container + '.log' - cmd = 'ls ' + filename + filenames = self.yamlPath[0] + '/rfsim?g-oai-' + container + '.log' + cmd = 'ls ' + filenames containerStatus = True try: lsStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) - filename = str(lsStatus).strip() + filenames = str(lsStatus).strip() except: containerStatus = False if not containerStatus: continue - logging.debug('\u001B[1m Analyzing xNB logfile ' + filename + ' \u001B[0m') - logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers) - if (logStatus < 0): - fullStatus = False - self.exitStatus = 1 - HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus) - else: - HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) + for filename in filenames.split('\n'): + logging.debug('\u001B[1m Analyzing xNB logfile ' + filename + ' \u001B[0m') + logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers) + if (logStatus < 0): + fullStatus = False + self.exitStatus = 1 + HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus) + else: + HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) listOfPossibleUeContainers = ['lte-ue*', 'nr-ue*'] for container in listOfPossibleUeContainers: - filename = self.yamlPath[0] + '/rfsim?g-oai-' + container + '.log' - cmd = 'ls ' + filename + filenames = self.yamlPath[0] + '/rfsim?g-oai-' + container + '.log' + cmd = 'ls ' + filenames containerStatus = True try: lsStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) - filename = str(lsStatus).strip() + filenames = str(lsStatus).strip() except: containerStatus = False if not containerStatus: continue - logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m') - logStatus = UE.AnalyzeLogFile_UE(filename, HTML, RAN) - if (logStatus < 0): - fullStatus = False - HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus) - else: - HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) + for filename in filenames.split('\n'): + logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m') + logStatus = UE.AnalyzeLogFile_UE(filename, HTML, RAN) + if (logStatus < 0): + fullStatus = False + HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus) + else: + HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) cmd = 'rm ' + self.yamlPath[0] + '/*.log' logging.debug(cmd) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index beb89370d24cd0968e68a18f34b120b96345eb13..f29ac405c2d0905e3fbeeecc604d61fc196deb78 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -999,8 +999,18 @@ class RANManagement(): for k in keys: result = re.search(k, line) if result is not None: + ue_prefix = 'ue0' + ue_res = re.search('UE ID 1|UE 1:', line) + if ue_res is not None: + ue_prefix = 'ue1' + ue_res = re.search('UE ID 2|UE 2:', line) + if ue_res is not None: + ue_prefix = 'ue2' + ue_res = re.search('UE ID 3|UE 3:', line) + if ue_res is not None: + ue_prefix = 'ue3' #remove 1- all useless char before relevant info (ulsch or dlsch) 2- trailing char - dlsch_ulsch_stats[k]=re.sub(r'^.*\]\s+', r'' , line.rstrip()) + dlsch_ulsch_stats[ue_prefix+k]=re.sub(r'^.*\]\s+', r'' , line.rstrip()) #count "problem receiving samples" msg diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml index e0d0bb38a6b20d66ef58aa6fe0f264b0e14595c7..a1f50948a501baa6e5fe316e335333a55b7f2ba0 100644 --- a/ci-scripts/xml_files/container_5g_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_rfsim.xml @@ -79,7 +79,7 @@ <desc>Deploy Second OAI 5G NR-UE RF sim SA</desc> <yaml_path>yaml_files/5g_rfsimulator</yaml_path> <services>oai-nr-ue2</services> - <nb_healthy>8</nb_healthy> + <nb_healthy>9</nb_healthy> </testCase> <testCase id="020001">