Commit 5e1e2769 authored by Raphael Defosseux's avatar Raphael Defosseux

fix(ci): the PCAP file was getting too big

 -- Excluded the 2nd UE container IP address from capture
 -- Also added support for multiple UEs for dlsch_ulsch_stats
Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 4869b109
......@@ -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,17 +785,18 @@ 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
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):
......@@ -803,17 +808,18 @@ class Containerize():
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
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):
......
......@@ -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
......
......@@ -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">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment