Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常顺宇
OpenXG-RAN
Commits
921f624b
Commit
921f624b
authored
May 19, 2021
by
hardy
Committed by
rmagueta
May 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solve iperf UL implementation for module UE
parent
96e3d00a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+10
-12
No files found.
ci-scripts/cls_oaicitest.py
View file @
921f624b
...
...
@@ -391,7 +391,7 @@ class OaiCiTest():
Module_UE
.
Command
(
"wup"
)
status
=
Module_UE
.
GetModuleIPAddress
()
if
status
==
0
:
HTML
.
CreateHtmlTestRow
(
Module_UE
.
UEIPAddress
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
Module_UE
.
UEIPAddress
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
logging
.
debug
(
'UE IP addresss : '
+
Module_UE
.
UEIPAddress
)
else
:
#status==-1 failed to retrieve IP address
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
UE_IP_ADDRESS_ISSUE
)
...
...
@@ -1512,8 +1512,8 @@ class OaiCiTest():
SSH
.
command
(
'cat '
+
EPC
.
SourceCodePath
+
'/scripts/ping_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
5
)
else
:
#launch from Module
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
#ping from module NIC rather than IP address to make sure round trip is over the air
cmd
=
'ping -I '
+
Module_UE
.
UENetwork
+
' '
+
self
.
ping_args
+
' '
+
EPC
.
IPAddress
+
' 2>&1 > ping_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
#ping from module NIC rather than IP address to make sure round trip is over the air
cmd
=
'ping -I '
+
Module_UE
.
UENetwork
+
' '
+
self
.
ping_args
+
' '
+
EPC
.
IPAddress
+
' 2>&1 > ping_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
int
(
ping_time
[
0
])
*
1.5
)
#copy the ping log file to have it locally for analysis (ping stats)
SSH
.
copyin
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
,
'ping_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
,
'.'
)
...
...
@@ -2205,13 +2205,13 @@ class OaiCiTest():
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
cmd
=
'rm iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
cmd
=
'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B '
+
UE_IPAddress
+
' -u 2>&1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
cmd
=
'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B '
+
UE_IPAddress
+
' -u 2>&1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
#client side EPC
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
cmd
=
'rm iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
cmd
=
'iperf -c '
+
UE_IPAddress
+
' '
+
self
.
iperf_args
+
' 2>&1 > iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
cmd
=
'iperf -c '
+
UE_IPAddress
+
' '
+
self
.
iperf_args
+
' 2>&1 > iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
int
(
iperf_time
)
*
5.0
)
#copy the 2 resulting files locally
SSH
.
copyin
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
,
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
,
'.'
)
...
...
@@ -2226,7 +2226,9 @@ class OaiCiTest():
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
cmd
=
'rm iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
cmd
=
'echo $USER; nohup iperf -s -i 1 -u 2>&1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
#cmd = 'echo $USER; nohup iperf3 -s -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
#SSH.command(cmd,'\$',5)
...
...
@@ -2239,23 +2241,19 @@ class OaiCiTest():
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
cmd
=
'rm iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
# SSH.command('iperf3 -c ' + EPC.IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', int(iperf_time)*5.0)
SSH
.
command
(
'/opt/iperf-2.0.10/iperf -c 192.172.0.1 '
+
self
.
iperf_args
+
' 2>&1 > iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
,
'\$'
,
int
(
iperf_time
)
*
5.0
)
HOST
=
Module_UE
.
HostIPAddress
COMMAND
=
'iperf3 -c '
+
EPC
.
IPAddress
+
' '
+
self
.
iperf_args
+
' 2>&1 > iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
logging
.
debug
(
COMMAND
)
subprocess
.
Popen
([
"ssh"
,
"%s"
%
HOST
,
COMMAND
],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
#copy the 2 resulting files locally
SSH
.
copyin
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
,
'iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
,
'.'
)
#send for analysis
filename
=
'iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
filename
,
1
)
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
filename
,
1
)
else
:
logging
.
debug
(
"Incorrect or missing IPERF direction in XML"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment