Commit cae952e1 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/ci_add_2nd_ue' into integration_2022_wk15

parents 3e6e9f44 dc4feae7
......@@ -757,9 +757,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)"'
elif re.search('5g_l2sim', 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 arp and not port 53 and not port 2152 and not port 2153)"'
else:
......@@ -817,46 +821,48 @@ class Containerize():
# Analyzing log file(s)!
listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du']
for container in listOfPossibleRanContainers:
filename = self.yamlPath[0] + '/*-oai-' + container + '.log'
cmd = 'ls ' + filename
filenames = self.yamlPath[0] + '/*-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] + '/*-oai-' + container + '.log'
cmd = 'ls ' + filename
filenames = self.yamlPath[0] + '/*-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)
......
......@@ -997,8 +997,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())
result = re.search('Received NR_RRCReconfigurationComplete from UE', str(line))
if result is not None:
......
......@@ -31,8 +31,11 @@
000001
000002
000003
000004
020001
020002
020003
020004
030001
030002
100001
......@@ -71,6 +74,14 @@
<nb_healthy>8</nb_healthy>
</testCase>
<testCase id="000004">
<class>DeployGenObject</class>
<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>9</nb_healthy>
</testCase>
<testCase id="020001">
<class>PingFromContainer</class>
<desc>Ping ext-dn from NR-UE</desc>
......@@ -87,6 +98,22 @@
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="020003">
<class>PingFromContainer</class>
<desc>Ping ext-dn from Second NR-UE</desc>
<container_name>rfsim5g-oai-nr-ue2</container_name>
<options>-I oaitun_ue1 -c 20 192.168.72.135</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="020004">
<class>PingFromContainer</class>
<desc>Ping Second NR-UE from ext-dn</desc>
<container_name>rfsim5g-oai-ext-dn</container_name>
<options>-c 20 12.1.1.3</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="030001">
<class>IperfFromContainer</class>
<desc>Iperf UDP Downlink</desc>
......
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