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
lizhongxiao
OpenXG-RAN
Commits
f065de08
Commit
f065de08
authored
Aug 10, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ci-fix-legacy-bench' into integration_2022_wk32
parents
9622a56b
888c4ead
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
19 deletions
+20
-19
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+14
-11
ci-scripts/ran.py
ci-scripts/ran.py
+6
-8
No files found.
ci-scripts/cls_oaicitest.py
View file @
f065de08
...
@@ -1329,7 +1329,7 @@ class OaiCiTest():
...
@@ -1329,7 +1329,7 @@ class OaiCiTest():
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
if
self
.
ADBCentralized
:
if
self
.
ADBCentralized
:
SSH
.
command
(
'adb devices'
,
'\$'
,
15
)
SSH
.
command
(
'adb devices'
,
'\$'
,
15
)
self
.
UEDevices
=
re
.
findall
(
"
\\\\
r
\\\\
n([A-Za-z0-9]+)
\\\\
tdevice"
,
SSH
.
getBefore
())
self
.
UEDevices
=
re
.
findall
(
'
\r\n
([A-Za-z0-9]+)
\t
device'
,
SSH
.
getBefore
())
#report number and id of devices found
#report number and id of devices found
msg
=
"UEDevices found by GetAllUEDevices : "
+
" "
.
join
(
self
.
UEDevices
)
msg
=
"UEDevices found by GetAllUEDevices : "
+
" "
.
join
(
self
.
UEDevices
)
logging
.
debug
(
msg
)
logging
.
debug
(
msg
)
...
@@ -1379,8 +1379,7 @@ class OaiCiTest():
...
@@ -1379,8 +1379,7 @@ class OaiCiTest():
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
if
self
.
ADBCentralized
:
if
self
.
ADBCentralized
:
SSH
.
command
(
'lsusb | egrep --colour=never "Future Technology Devices International, Ltd FT2232C" | sed -e "s#:.*##" -e "s# #_#g"'
,
'\$'
,
15
)
SSH
.
command
(
'lsusb | egrep --colour=never "Future Technology Devices International, Ltd FT2232C" | sed -e "s#:.*##" -e "s# #_#g"'
,
'\$'
,
15
)
#self.CatMDevices = re.findall("\\\\r\\\\n([A-Za-z0-9_]+)",SSH.getBefore())
self
.
CatMDevices
=
re
.
findall
(
'
\r\n
([A-Za-z0-9_]+)'
,
SSH
.
getBefore
())
self
.
CatMDevices
=
re
.
findall
(
"
\\\\
r
\\\\
n([A-Za-z0-9_]+)"
,
SSH
.
getBefore
())
else
:
else
:
if
(
os
.
path
.
isfile
(
'./modules_list.txt'
)):
if
(
os
.
path
.
isfile
(
'./modules_list.txt'
)):
os
.
remove
(
'./modules_list.txt'
)
os
.
remove
(
'./modules_list.txt'
)
...
@@ -2046,7 +2045,7 @@ class OaiCiTest():
...
@@ -2046,7 +2045,7 @@ class OaiCiTest():
req_bandwidth
=
'%.1f Gbits/sec'
%
req_bw
req_bandwidth
=
'%.1f Gbits/sec'
%
req_bw
req_bw
=
req_bw
*
1000000000
req_bw
=
req_bw
*
1000000000
result
=
re
.
search
(
'Server Report:
\
\\\
r
\\\
\
n(?:|\[ *\d+\].*) (?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(\d+\/..\d+) +(\((?P<packetloss>[0-9\.]+)%\))'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'Server Report:
\
r
\n
(?:|\[ *\d+\].*) (?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(\d+\/..\d+) +(\((?P<packetloss>[0-9\.]+)%\))'
,
SSH
.
getBefore
())
if
result
is
not
None
:
if
result
is
not
None
:
bitrate
=
result
.
group
(
'bitrate'
)
bitrate
=
result
.
group
(
'bitrate'
)
packetloss
=
result
.
group
(
'packetloss'
)
packetloss
=
result
.
group
(
'packetloss'
)
...
@@ -2262,7 +2261,7 @@ class OaiCiTest():
...
@@ -2262,7 +2261,7 @@ class OaiCiTest():
def
Iperf_analyzeV3Output
(
self
,
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
SSH
):
def
Iperf_analyzeV3Output
(
self
,
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
SSH
):
result
=
re
.
search
(
'(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?:|[0-9\.]+ ms +\d+\/\d+ \((?P<packetloss>[0-9\.]+)%\)) +(?:|receiver)
\
\\\
r
\\\\
n(?:|\[ *\d+\] Sent \d+ datagrams)
\\\\
r
\\\
\
niperf Done\.'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?:|[0-9\.]+ ms +\d+\/\d+ \((?P<packetloss>[0-9\.]+)%\)) +(?:|receiver)
\
r\n
(?:|\[ *\d+\] Sent \d+ datagrams)
\r
\n
iperf Done\.'
,
SSH
.
getBefore
())
if
result
is
None
:
if
result
is
None
:
result
=
re
.
search
(
'(?P<error>iperf: error - [a-zA-Z0-9 :]+)'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'(?P<error>iperf: error - [a-zA-Z0-9 :]+)'
,
SSH
.
getBefore
())
lock
.
acquire
()
lock
.
acquire
()
...
@@ -3865,7 +3864,7 @@ class OaiCiTest():
...
@@ -3865,7 +3864,7 @@ class OaiCiTest():
SSH
=
sshconnection
.
SSHConnection
()
SSH
=
sshconnection
.
SSHConnection
()
SSH
.
open
(
IPAddress
,
UserName
,
Password
)
SSH
.
open
(
IPAddress
,
UserName
,
Password
)
SSH
.
command
(
'lsb_release -a'
,
'\$'
,
5
)
SSH
.
command
(
'lsb_release -a'
,
'\$'
,
5
)
result
=
re
.
search
(
'Description:
\
\\\
t(?P<os_type>[a-zA-Z0-9\-\_\.\ ]+)'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'Description:
\t
(?P<os_type>[a-zA-Z0-9\-\_\.\ ]+)'
,
SSH
.
getBefore
())
if
result
is
not
None
:
if
result
is
not
None
:
OsVersion
=
result
.
group
(
'os_type'
)
OsVersion
=
result
.
group
(
'os_type'
)
logging
.
debug
(
'OS is: '
+
OsVersion
)
logging
.
debug
(
'OS is: '
+
OsVersion
)
...
@@ -3883,13 +3882,13 @@ class OaiCiTest():
...
@@ -3883,13 +3882,13 @@ class OaiCiTest():
logging
.
debug
(
'OS is: '
+
OsVersion
)
logging
.
debug
(
'OS is: '
+
OsVersion
)
HTML
.
OsVersion
[
idx
]
=
OsVersion
HTML
.
OsVersion
[
idx
]
=
OsVersion
SSH
.
command
(
'uname -r'
,
'\$'
,
5
)
SSH
.
command
(
'uname -r'
,
'\$'
,
5
)
result
=
re
.
search
(
'uname -r
\
\\\
r
\\\
\
n(?P<kernel_version>[a-zA-Z0-9\-\_\.]+)'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'uname -r
\
r
\n
(?P<kernel_version>[a-zA-Z0-9\-\_\.]+)'
,
SSH
.
getBefore
())
if
result
is
not
None
:
if
result
is
not
None
:
KernelVersion
=
result
.
group
(
'kernel_version'
)
KernelVersion
=
result
.
group
(
'kernel_version'
)
logging
.
debug
(
'Kernel Version is: '
+
KernelVersion
)
logging
.
debug
(
'Kernel Version is: '
+
KernelVersion
)
HTML
.
KernelVersion
[
idx
]
=
KernelVersion
HTML
.
KernelVersion
[
idx
]
=
KernelVersion
SSH
.
command
(
'dpkg --list | egrep --color=never libuhd
003
'
,
'\$'
,
5
)
SSH
.
command
(
'dpkg --list | egrep --color=never libuhd'
,
'\$'
,
5
)
result
=
re
.
search
(
'libuhd
003
:amd64 *(?P<uhd_version>[0-9\.]+)'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'libuhd
.*
:amd64 *(?P<uhd_version>[0-9\.]+)'
,
SSH
.
getBefore
())
if
result
is
not
None
:
if
result
is
not
None
:
UhdVersion
=
result
.
group
(
'uhd_version'
)
UhdVersion
=
result
.
group
(
'uhd_version'
)
logging
.
debug
(
'UHD Version is: '
+
UhdVersion
)
logging
.
debug
(
'UHD Version is: '
+
UhdVersion
)
...
@@ -3902,7 +3901,7 @@ class OaiCiTest():
...
@@ -3902,7 +3901,7 @@ class OaiCiTest():
logging
.
debug
(
'UHD Version is: '
+
UhdVersion
)
logging
.
debug
(
'UHD Version is: '
+
UhdVersion
)
HTML
.
UhdVersion
[
idx
]
=
UhdVersion
HTML
.
UhdVersion
[
idx
]
=
UhdVersion
SSH
.
command
(
'echo '
+
Password
+
' | sudo -S uhd_find_devices'
,
'\$'
,
180
)
SSH
.
command
(
'echo '
+
Password
+
' | sudo -S uhd_find_devices'
,
'\$'
,
180
)
usrp_boards
=
re
.
findall
(
'product: ([0-9A-Za-z]+)
\\\\
r
\\\\
n
'
,
SSH
.
getBefore
())
usrp_boards
=
re
.
findall
(
'product: ([0-9A-Za-z]+)'
,
SSH
.
getBefore
())
count
=
0
count
=
0
for
board
in
usrp_boards
:
for
board
in
usrp_boards
:
if
count
==
0
:
if
count
==
0
:
...
@@ -3914,14 +3913,18 @@ class OaiCiTest():
...
@@ -3914,14 +3913,18 @@ class OaiCiTest():
logging
.
debug
(
'USRP Board(s) : '
+
UsrpBoard
)
logging
.
debug
(
'USRP Board(s) : '
+
UsrpBoard
)
HTML
.
UsrpBoard
[
idx
]
=
UsrpBoard
HTML
.
UsrpBoard
[
idx
]
=
UsrpBoard
SSH
.
command
(
'lscpu'
,
'\$'
,
5
)
SSH
.
command
(
'lscpu'
,
'\$'
,
5
)
result
=
re
.
search
(
'CPU\(s\): *(?P<nb_cpus>[0-9]+)
.*Model name: *(?P<model>[a-zA-Z0-9\-\_\.\ \(\)]+).*CPU MHz: *(?P<cpu_mhz>[0-9\.]+)
'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'CPU\(s\): *(?P<nb_cpus>[0-9]+)'
,
SSH
.
getBefore
())
if
result
is
not
None
:
if
result
is
not
None
:
CpuNb
=
result
.
group
(
'nb_cpus'
)
CpuNb
=
result
.
group
(
'nb_cpus'
)
logging
.
debug
(
'nb_cpus: '
+
CpuNb
)
logging
.
debug
(
'nb_cpus: '
+
CpuNb
)
HTML
.
CpuNb
[
idx
]
=
CpuNb
HTML
.
CpuNb
[
idx
]
=
CpuNb
result
=
re
.
search
(
'Model name: *(?P<model>[a-zA-Z0-9\-\_\.\ \(\)]+)'
,
SSH
.
getBefore
())
if
result
is
not
None
:
CpuModel
=
result
.
group
(
'model'
)
CpuModel
=
result
.
group
(
'model'
)
logging
.
debug
(
'model: '
+
CpuModel
)
logging
.
debug
(
'model: '
+
CpuModel
)
HTML
.
CpuModel
[
idx
]
=
CpuModel
HTML
.
CpuModel
[
idx
]
=
CpuModel
result
=
re
.
search
(
'CPU MHz: *(?P<cpu_mhz>[0-9\.]+)'
,
SSH
.
getBefore
())
if
result
is
not
None
:
CpuMHz
=
result
.
group
(
'cpu_mhz'
)
+
' MHz'
CpuMHz
=
result
.
group
(
'cpu_mhz'
)
+
' MHz'
logging
.
debug
(
'cpu_mhz: '
+
CpuMHz
)
logging
.
debug
(
'cpu_mhz: '
+
CpuMHz
)
HTML
.
CpuMHz
[
idx
]
=
CpuMHz
HTML
.
CpuMHz
[
idx
]
=
CpuMHz
...
...
ci-scripts/ran.py
View file @
f065de08
...
@@ -374,7 +374,7 @@ class RANManagement():
...
@@ -374,7 +374,7 @@ class RANManagement():
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
eth_interface
=
'any'
eth_interface
=
'any'
fltr
=
'sctp'
fltr
=
'sctp'
logging
.
debug
(
'
\u001B
[1m Launching tshark on interface '
+
eth_interface
+
' with filter "'
+
fltr
+
'"
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m Launching tshark on
xNB on
interface '
+
eth_interface
+
' with filter "'
+
fltr
+
'"
\u001B
[0m'
)
pcapfile
=
pcapfile_prefix
+
self
.
testCase_id
+
'_log.pcap'
pcapfile
=
pcapfile_prefix
+
self
.
testCase_id
+
'_log.pcap'
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S rm -f /tmp/'
+
pcapfile
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S rm -f /tmp/'
+
pcapfile
,
'\$'
,
5
)
mySSH
.
command
(
'echo $USER; nohup sudo -E tshark -i '
+
eth_interface
+
' -f "'
+
fltr
+
'" -w /tmp/'
+
pcapfile
+
' > /dev/null 2>&1 &'
,
'\$'
,
5
)
mySSH
.
command
(
'echo $USER; nohup sudo -E tshark -i '
+
eth_interface
+
' -f "'
+
fltr
+
'" -w /tmp/'
+
pcapfile
+
' > /dev/null 2>&1 &'
,
'\$'
,
5
)
...
@@ -390,7 +390,7 @@ class RANManagement():
...
@@ -390,7 +390,7 @@ class RANManagement():
mySSH
.
open
(
localEpcIpAddr
,
localEpcUserName
,
localEpcPassword
)
mySSH
.
open
(
localEpcIpAddr
,
localEpcUserName
,
localEpcPassword
)
eth_interface
=
'any'
eth_interface
=
'any'
fltr
=
'sctp'
fltr
=
'sctp'
logging
.
debug
(
'
\u001B
[1m Launching tshark on interface '
+
eth_interface
+
' with filter "'
+
fltr
+
'"
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m Launching tshark on
EPC on
interface '
+
eth_interface
+
' with filter "'
+
fltr
+
'"
\u001B
[0m'
)
self
.
epcPcapFile
=
'enb_'
+
self
.
testCase_id
+
'_s1log.pcap'
self
.
epcPcapFile
=
'enb_'
+
self
.
testCase_id
+
'_s1log.pcap'
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S rm -f /tmp/'
+
self
.
epcPcapFile
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S rm -f /tmp/'
+
self
.
epcPcapFile
,
'\$'
,
5
)
mySSH
.
command
(
'echo $USER; nohup sudo tshark -f "host '
+
lIpAddr
+
'" -i '
+
eth_interface
+
' -f "'
+
fltr
+
'" -w /tmp/'
+
self
.
epcPcapFile
+
' > /tmp/tshark.log 2>&1 &'
,
localEpcUserName
,
5
)
mySSH
.
command
(
'echo $USER; nohup sudo tshark -f "host '
+
lIpAddr
+
'" -i '
+
eth_interface
+
' -f "'
+
fltr
+
'" -w /tmp/'
+
self
.
epcPcapFile
+
' > /tmp/tshark.log 2>&1 &'
,
localEpcUserName
,
5
)
...
@@ -517,7 +517,7 @@ class RANManagement():
...
@@ -517,7 +517,7 @@ class RANManagement():
localEpcUserName
=
EPC
.
UserName
localEpcUserName
=
EPC
.
UserName
localEpcPassword
=
EPC
.
Password
localEpcPassword
=
EPC
.
Password
mySSH
.
open
(
localEpcIpAddr
,
localEpcUserName
,
localEpcPassword
)
mySSH
.
open
(
localEpcIpAddr
,
localEpcUserName
,
localEpcPassword
)
logging
.
debug
(
'
\u001B
[1m Stopping tshark
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m Stopping tshark
on EPC
\u001B
[0m'
)
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S killall --signal SIGKILL tshark'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S killall --signal SIGKILL tshark'
,
'\$'
,
5
)
if
self
.
epcPcapFile
!=
''
:
if
self
.
epcPcapFile
!=
''
:
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S chmod 666 /tmp/'
+
self
.
epcPcapFile
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S chmod 666 /tmp/'
+
self
.
epcPcapFile
,
'\$'
,
5
)
...
@@ -644,18 +644,16 @@ class RANManagement():
...
@@ -644,18 +644,16 @@ class RANManagement():
time
.
sleep
(
5
)
time
.
sleep
(
5
)
mySSH
.
command
(
'rm -f my-lte-softmodem-run'
+
str
(
self
.
eNB_instance
)
+
'.sh'
,
'\$'
,
5
)
mySSH
.
command
(
'rm -f my-lte-softmodem-run'
+
str
(
self
.
eNB_instance
)
+
'.sh'
,
'\$'
,
5
)
#stopping tshark (valid if eNB and enabled in xml, will not harm otherwise)
#stopping tshark (valid if eNB and enabled in xml, will not harm otherwise)
logging
.
debug
(
'
\u001B
[1m Stopping tshark
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m Stopping tshark
on xNB
\u001B
[0m'
)
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S killall --signal SIGKILL tshark'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S killall --signal SIGKILL tshark'
,
'\$'
,
5
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
mySSH
.
close
()
mySSH
.
close
()
# If tracer options is on, stopping tshark on EPC side
if
EPC
.
IPAddress
!=
"none"
and
EPC
.
IPAddress
!=
''
:
result
=
re
.
search
(
'T_stdout'
,
str
(
self
.
Initialize_eNB_args
))
if
(
result
is
not
None
):
localEpcIpAddr
=
EPC
.
IPAddress
localEpcIpAddr
=
EPC
.
IPAddress
localEpcUserName
=
EPC
.
UserName
localEpcUserName
=
EPC
.
UserName
localEpcPassword
=
EPC
.
Password
localEpcPassword
=
EPC
.
Password
logging
.
debug
(
'
\u001B
[1m Stopping tshark on EPC ('
+
localEpcIpAddr
+
')
\u001B
[0m'
)
mySSH
.
open
(
localEpcIpAddr
,
localEpcUserName
,
localEpcPassword
)
mySSH
.
open
(
localEpcIpAddr
,
localEpcUserName
,
localEpcPassword
)
logging
.
debug
(
'
\u001B
[1m Stopping tshark
\u001B
[0m'
)
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S killall --signal SIGKILL tshark'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S killall --signal SIGKILL tshark'
,
'\$'
,
5
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
if
self
.
epcPcapFile
!=
''
:
if
self
.
epcPcapFile
!=
''
:
...
...
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