Commit ea4a60d9 authored by hardy's avatar hardy

DL support + testcase fix

parent 2d46faaf
......@@ -148,8 +148,8 @@ class Module_UE:
else: #check response
result = re.search('mtu (?P<mtu>[0-9]+)', response[0].decode("utf-8") )
if result is not None:
if (result.group('mtu') is not None) and (result.group('mtu')==self.MTU) :
logging.debug('\u001B[1mUE Module NIC MTU is ' + self.MTU + ' as requested\u001B[0m')
if (result.group('mtu') is not None) and (str(result.group('mtu'))==str(self.MTU)) :
logging.debug('\u001B[1mUE Module NIC MTU is ' + str(self.MTU) + ' as expected\u001B[0m')
return 0
else:
logging.debug('\u001B[1;37;41m Incorrect Module NIC MTU ' + str(result.group('mtu')) + '! Expected : ' + str(self.MTU) + '\u001B[0m')
......
......@@ -402,9 +402,9 @@ class OaiCiTest():
logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress)
#execute additional commands from yaml file after UE attach
SSH = sshconnection.SSHConnection()
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
for startcommand in Module_UE.StartCommands:
cmd = 'echo ' + EPC.Password + ' | ' + startcommand
cmd = 'echo ' + Module_UE.HostPassword + ' | ' + startcommand
SSH.command(cmd,'\$',5)
SSH.close()
#check that the MTU is as expected / requested
......@@ -2240,6 +2240,51 @@ class OaiCiTest():
def Iperf_Module(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, Module_UE):
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
#retrieve trf-gen container IP address
SSH = sshconnection.SSHConnection()
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('docker inspect --format="TRF_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" prod-trf-gen', '\$', 5)
result = re.search('TRF_IP_ADDR = (?P<trf_ip_addr>[0-9\.]+)', SSH.getBefore())
if result is not None:
EPC_Iperf_UE_IPAddress = result.group('trf_ip_addr')
SSH.close()
#kill iperf processes on UE side before (in case there are still some remaining)
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'killall --signal=SIGKILL iperf'
SSH.command(cmd,'\$',5)
SSH.close()
iperf_time = self.Iperf_ComputeTime()
if self.iperf_direction=="DL":
logging.debug("Iperf for Module in DL mode detected")
#server side UE
server_filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'rm ' + server_filename
SSH.command(cmd,'\$',5)
cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > ' + server_filename
SSH.command(cmd,'\$',5)
SSH.close()
#client side EPC
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
iperf_cmd = 'bin/iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > ' + client_filename
cmd = 'docker exec -it prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
SSH.command(cmd,'\$',int(iperf_time)*5.0)
SSH.command('docker cp prod-trf-gen:' + client_filename + ' ' + EPC.SourceCodePath, '\$', 5)
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + client_filename, '.')
SSH.close()
#copy the 2 resulting files locally
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, server_filename, '.')
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, client_filename, '.')
#send for analysis
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,server_filename,1)
else:
#default is ltebox
SSH = sshconnection.SSHConnection()
#kill iperf processes before (in case there are still some remaining)
......
......@@ -56,7 +56,7 @@
<testCase id="030000">
<class>Initialize_eNB</class>
<desc>Initialize eNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf</Initialize_eNB_args>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf --usrp-tx-thread-config 1 --thread-pool 0,2,4,6</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface>
......@@ -90,24 +90,24 @@
<testCase id="050000">
<class>Ping</class>
<desc>Ping: 20 pings in 20sec</desc>
<desc>Ping: 20 pings</desc>
<id>nrmodule2_quectel</id>
<ping_args>-c 20 -s 2048</ping_args>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
<desc>Ping: 100 pings in 20sec</desc>
<desc>Ping: 100 pings, size 2048</desc>
<id>nrmodule2_quectel</id>
<ping_args>-c 100 -i 0.2 -s 2048</ping_args>
<ping_args>-c 100 -s 2048</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="070000">
<class>Iperf</class>
<desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 20M -t 60</iperf_args>
<iperf_args>-u -b 26M -t 60</iperf_args>
<direction>DL</direction>
<id>nrmodule2_quectel</id>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
......
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