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
canghaiwuhen
OpenXG-RAN
Commits
dc9211ae
Commit
dc9211ae
authored
Jul 19, 2020
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed all Getters and Setters from EPC, HTML classes (as all attributes are public)
parent
d273ae84
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
373 additions
and
377 deletions
+373
-377
ci-scripts/epc.py
ci-scripts/epc.py
+28
-28
ci-scripts/html.py
ci-scripts/html.py
+56
-60
ci-scripts/main.py
ci-scripts/main.py
+158
-158
ci-scripts/ran.py
ci-scripts/ran.py
+131
-131
No files found.
ci-scripts/epc.py
View file @
dc9211ae
...
@@ -70,34 +70,34 @@ class EPCManagement():
...
@@ -70,34 +70,34 @@ class EPCManagement():
# Setter and Getters on Public Members
# Setter and Getters on Public Members
#-----------------------------------------------------------
#-----------------------------------------------------------
def
SetIPAddress
(
self
,
ipaddress
):
#
def SetIPAddress(self, ipaddress):
self
.
IPAddress
=
ipaddress
#
self.IPAddress = ipaddress
def
GetIPAddress
(
self
):
#
def GetIPAddress(self):
return
self
.
IPAddress
#
return self.IPAddress
def
SetUserName
(
self
,
username
):
#
def SetUserName(self, username):
self
.
UserName
=
username
#
self.UserName = username
def
GetUserName
(
self
):
#
def GetUserName(self):
return
self
.
UserName
#
return self.UserName
def
SetPassword
(
self
,
password
):
#
def SetPassword(self, password):
self
.
Password
=
password
#
self.Password = password
def
GetPassword
(
self
):
#
def GetPassword(self):
return
self
.
Password
#
return self.Password
def
SetSourceCodePath
(
self
,
sourcecodepath
):
#
def SetSourceCodePath(self, sourcecodepath):
self
.
SourceCodePath
=
sourcecodepath
#
self.SourceCodePath = sourcecodepath
def
GetSourceCodePath
(
self
):
#
def GetSourceCodePath(self):
return
self
.
SourceCodePath
#
return self.SourceCodePath
def
SetType
(
self
,
kind
):
#
def SetType(self, kind):
self
.
Type
=
kind
#
self.Type = kind
def
GetType
(
self
):
#
def GetType(self):
return
self
.
Type
#
return self.Type
def
SetHtmlObj
(
self
,
obj
):
#
def SetHtmlObj(self, obj):
self
.
htmlObj
=
obj
#
self.htmlObj = obj
def
SetTestCase_id
(
self
,
idx
):
#
def SetTestCase_id(self, idx):
self
.
testCase_id
=
idx
#
self.testCase_id = idx
def
GetMmeIPAddress
(
self
):
#
def GetMmeIPAddress(self):
return
self
.
MmeIPAddress
#
return self.MmeIPAddress
def
SetContainerPrefix
(
self
,
prefix
):
#
def SetContainerPrefix(self, prefix):
self
.
containerPrefix
=
prefix
#
self.containerPrefix = prefix
#-----------------------------------------------------------
#-----------------------------------------------------------
# EPC management functions
# EPC management functions
...
...
ci-scripts/html.py
View file @
dc9211ae
...
@@ -82,73 +82,69 @@ class HTMLManagement():
...
@@ -82,73 +82,69 @@ class HTMLManagement():
#-----------------------------------------------------------
#-----------------------------------------------------------
# Setters and Getters
# Setters and Getters
#-----------------------------------------------------------
#-----------------------------------------------------------
def
SethtmlUEFailureMsg
(
self
,
huefa
):
self
.
htmlUEFailureMsg
=
huefa
def
GethtmlUEFailureMsg
(
self
):
return
self
.
htmlUEFailureMsg
def
SetHmleNBFailureMsg
(
self
,
msg
):
self
.
htmleNBFailureMsg
=
msg
def
Setdesc
(
self
,
dsc
):
self
.
desc
=
dsc
def
SetstartTime
(
self
,
sttime
):
self
.
startTime
=
sttime
def
SettestCase_id
(
self
,
tcid
):
self
.
testCase_id
=
tcid
def
GettestCase_id
(
self
):
return
self
.
testCase_id
def
SetranRepository
(
self
,
repository
):
self
.
ranRepository
=
repository
def
SetranAllowMerge
(
self
,
merge
):
self
.
ranAllowMerge
=
merge
def
SetranBranch
(
self
,
branch
):
self
.
ranBranch
=
branch
def
SetranCommitID
(
self
,
commitid
):
self
.
ranCommitID
=
commitid
def
SetranTargetBranch
(
self
,
tbranch
):
self
.
ranTargetBranch
=
tbranch
def
SethtmlUEConnected
(
self
,
nbUEs
):
def
SethtmlUEConnected
(
self
,
nbUEs
):
if
nbUEs
>
0
:
if
nbUEs
>
0
:
self
.
htmlUEConnected
=
nbUEs
self
.
htmlUEConnected
=
nbUEs
else
:
else
:
self
.
htmlUEConnected
=
1
self
.
htmlUEConnected
=
1
def
SethtmlNb_Smartphones
(
self
,
nbUEs
):
self
.
htmlNb_Smartphones
=
nbUEs
def
SethtmlNb_CATM_Modules
(
self
,
nbUEs
):
self
.
htmlNb_CATM_Modules
=
nbUEs
def
SetnbTestXMLfiles
(
self
,
nb
):
self
.
nbTestXMLfiles
=
nb
def
GetnbTestXMLfiles
(
self
):
return
self
.
nbTestXMLfiles
def
SettestXMLfiles
(
self
,
xmlFile
):
# def SethtmlUEFailureMsg(self,huefa):
self
.
testXMLfiles
.
append
(
xmlFile
)
# self.htmlUEFailureMsg = huefa
def
SethtmlTabRefs
(
self
,
tabRef
):
# def GethtmlUEFailureMsg(self):
self
.
htmlTabRefs
.
append
(
tabRef
)
# return self.htmlUEFailureMsg
def
SethtmlTabNames
(
self
,
tabName
):
# def SetHmleNBFailureMsg(self, msg):
self
.
htmlTabNames
.
append
(
tabName
)
# self.htmleNBFailureMsg = msg
def
SethtmlTabIcons
(
self
,
tabIcon
):
# def Setdesc(self, dsc):
self
.
htmlTabIcons
.
append
(
tabIcon
)
# self.desc = dsc
# def SetstartTime(self, sttime):
# self.startTime = sttime
# def SettestCase_id(self, tcid):
# self.testCase_id = tcid
# def GettestCase_id(self):
# return self.testCase_id
# def SetranRepository(self, repository):
# self.ranRepository = repository
# def SetranAllowMerge(self, merge):
# self.ranAllowMerge = merge
# def SetranBranch(self, branch):
# self.ranBranch = branch
# def SetranCommitID(self, commitid):
# self.ranCommitID = commitid
# def SetranTargetBranch(self, tbranch):
# self.ranTargetBranch = tbranch
# def SethtmlNb_Smartphones(self, nbUEs):
# self.htmlNb_Smartphones = nbUEs
# def SethtmlNb_CATM_Modules(self, nbUEs):
# self.htmlNb_CATM_Modules = nbUEs
# def SetnbTestXMLfiles(self, nb):
# self.nbTestXMLfiles = nb
# def GetnbTestXMLfiles(self):
# return self.nbTestXMLfiles
# def SettestXMLfiles(self, xmlFile):
# self.testXMLfiles.append(xmlFile)
# def SethtmlTabRefs(self, tabRef):
# self.htmlTabRefs.append(tabRef)
# def SethtmlTabNames(self, tabName):
# self.htmlTabNames.append(tabName)
# def SethtmlTabIcons(self, tabIcon):
# self.htmlTabIcons.append(tabIcon)
# def SetOsVersion(self, version, idx):
# self.OsVersion[idx] = version
# def SetKernelVersion(self, version, idx):
# self.KernelVersion[idx] = version
# def SetUhdVersion(self, version, idx):
# self.UhdVersion[idx] = version
# def SetUsrpBoard(self, version, idx):
# self.UsrpBoard[idx] = version
# def SetCpuNb(self, nb, idx):
# self.CpuNb[idx] = nb
# def SetCpuModel(self, model, idx):
# self.CpuModel[idx] = model
# def SetCpuMHz(self, freq, idx):
# self.CpuMHz[idx] = freq
def
SetOsVersion
(
self
,
version
,
idx
):
self
.
OsVersion
[
idx
]
=
version
def
SetKernelVersion
(
self
,
version
,
idx
):
self
.
KernelVersion
[
idx
]
=
version
def
SetUhdVersion
(
self
,
version
,
idx
):
self
.
UhdVersion
[
idx
]
=
version
def
SetUsrpBoard
(
self
,
version
,
idx
):
self
.
UsrpBoard
[
idx
]
=
version
def
SetCpuNb
(
self
,
nb
,
idx
):
self
.
CpuNb
[
idx
]
=
nb
def
SetCpuModel
(
self
,
model
,
idx
):
self
.
CpuModel
[
idx
]
=
model
def
SetCpuMHz
(
self
,
freq
,
idx
):
self
.
CpuMHz
[
idx
]
=
freq
#-----------------------------------------------------------
#-----------------------------------------------------------
# HTML structure creation functions
# HTML structure creation functions
...
...
ci-scripts/main.py
View file @
dc9211ae
...
@@ -209,9 +209,9 @@ class OaiCiTest():
...
@@ -209,9 +209,9 @@ class OaiCiTest():
sys
.
exit
(
1
)
sys
.
exit
(
1
)
def
CheckFlexranCtrlInstallation
(
self
):
def
CheckFlexranCtrlInstallation
(
self
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
:
return
return
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'ls -ls /opt/flexran_rtc/*/rt_controller'
,
'\$'
,
5
)
SSH
.
command
(
'ls -ls /opt/flexran_rtc/*/rt_controller'
,
'\$'
,
5
)
result
=
re
.
search
(
'/opt/flexran_rtc/build/rt_controller'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'/opt/flexran_rtc/build/rt_controller'
,
SSH
.
getBefore
())
if
result
is
not
None
:
if
result
is
not
None
:
...
@@ -222,15 +222,15 @@ class OaiCiTest():
...
@@ -222,15 +222,15 @@ class OaiCiTest():
def
InitializeFlexranCtrl
(
self
):
def
InitializeFlexranCtrl
(
self
):
if
RAN
.
flexranCtrlInstalled
==
False
:
if
RAN
.
flexranCtrlInstalled
==
False
:
return
return
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cd /opt/flexran_rtc'
,
'\$'
,
5
)
SSH
.
command
(
'cd /opt/flexran_rtc'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
GetPassword
()
+
' | sudo -S rm -f log/*.log'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
Password
+
' | sudo -S rm -f log/*.log'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
GetPassword
()
+
' | sudo -S echo "build/rt_controller -c log_config/basic_log" > ./my-flexran-ctl.sh'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
Password
+
' | sudo -S echo "build/rt_controller -c log_config/basic_log" > ./my-flexran-ctl.sh'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
GetPassword
()
+
' | sudo -S chmod 755 ./my-flexran-ctl.sh'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
Password
+
' | sudo -S chmod 755 ./my-flexran-ctl.sh'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
GetPassword
()
+
' | sudo -S daemon --unsafe --name=flexran_rtc_daemon --chdir=/opt/flexran_rtc -o /opt/flexran_rtc/log/flexranctl_'
+
self
.
testCase_id
+
'.log ././my-flexran-ctl.sh'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
Password
+
' | sudo -S daemon --unsafe --name=flexran_rtc_daemon --chdir=/opt/flexran_rtc -o /opt/flexran_rtc/log/flexranctl_'
+
self
.
testCase_id
+
'.log ././my-flexran-ctl.sh'
,
'\$'
,
5
)
SSH
.
command
(
'ps -aux | grep --color=never rt_controller'
,
'\$'
,
5
)
SSH
.
command
(
'ps -aux | grep --color=never rt_controller'
,
'\$'
,
5
)
result
=
re
.
search
(
'rt_controller -c '
,
SSH
.
getBefore
())
result
=
re
.
search
(
'rt_controller -c '
,
SSH
.
getBefore
())
if
result
is
not
None
:
if
result
is
not
None
:
...
@@ -513,12 +513,12 @@ class OaiCiTest():
...
@@ -513,12 +513,12 @@ class OaiCiTest():
else
:
else
:
if
RAN
.
air_interface
==
'lte'
:
if
RAN
.
air_interface
==
'lte'
:
if
RAN
.
eNBmbmsEnables
[
0
]:
if
RAN
.
eNBmbmsEnables
[
0
]:
HTML
.
SethtmlUEFailureMsg
(
'oaitun_ue1/oaitun_uem1 interfaces are either NOT mounted or NOT configured'
)
HTML
.
htmlUEFailureMsg
=
'oaitun_ue1/oaitun_uem1 interfaces are either NOT mounted or NOT configured'
else
:
else
:
HTML
.
SethtmlUEFailureMsg
(
'oaitun_ue1 interface is either NOT mounted or NOT configured'
)
HTML
.
htmlUEFailureMsg
=
'oaitun_ue1 interface is either NOT mounted or NOT configured'
HTML
.
CreateHtmlTestRow
(
self
.
Initialize_OAI_UE_args
,
'KO'
,
CONST
.
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE
,
'OAI UE'
)
HTML
.
CreateHtmlTestRow
(
self
.
Initialize_OAI_UE_args
,
'KO'
,
CONST
.
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE
,
'OAI UE'
)
else
:
else
:
HTML
.
SethtmlUEFailureMsg
(
'nr-uesoftmodem did NOT synced'
)
HTML
.
htmlUEFailureMsg
=
'nr-uesoftmodem did NOT synced'
HTML
.
CreateHtmlTestRow
(
self
.
Initialize_OAI_UE_args
,
'KO'
,
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
,
'OAI UE'
)
HTML
.
CreateHtmlTestRow
(
self
.
Initialize_OAI_UE_args
,
'KO'
,
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
,
'OAI UE'
)
logging
.
error
(
'
\033
[91mInitialize OAI UE Failed!
\033
[0m'
)
logging
.
error
(
'
\033
[91mInitialize OAI UE Failed!
\033
[0m'
)
self
.
AutoTerminateUEandeNB
()
self
.
AutoTerminateUEandeNB
()
...
@@ -671,7 +671,7 @@ class OaiCiTest():
...
@@ -671,7 +671,7 @@ class OaiCiTest():
self
.
AutoTerminateUEandeNB
()
self
.
AutoTerminateUEandeNB
()
def
PingCatM
(
self
):
def
PingCatM
(
self
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
check_eNB
=
True
check_eNB
=
True
...
@@ -684,10 +684,10 @@ class OaiCiTest():
...
@@ -684,10 +684,10 @@ class OaiCiTest():
try
:
try
:
statusQueue
=
SimpleQueue
()
statusQueue
=
SimpleQueue
()
lock
=
Lock
()
lock
=
Lock
()
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cd '
+
EPC
.
GetSourceCodePath
()
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
SSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
if
re
.
match
(
'OAI'
,
EPC
.
GetType
()
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI'
,
EPC
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Using the OAI EPC HSS: not implemented yet'
)
logging
.
debug
(
'Using the OAI EPC HSS: not implemented yet'
)
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTabFooter
(
False
)
HTML
.
CreateHtmlTabFooter
(
False
)
...
@@ -1200,7 +1200,7 @@ class OaiCiTest():
...
@@ -1200,7 +1200,7 @@ class OaiCiTest():
for
job
in
multi_jobs
:
for
job
in
multi_jobs
:
job
.
join
()
job
.
join
()
if
RAN
.
flexranCtrlInstalled
and
RAN
.
flexranCtrlStarted
:
if
RAN
.
flexranCtrlInstalled
and
RAN
.
flexranCtrlStarted
:
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cd /opt/flexran_rtc'
,
'\$'
,
5
)
SSH
.
command
(
'cd /opt/flexran_rtc'
,
'\$'
,
5
)
SSH
.
command
(
'curl http://localhost:9999/stats | jq
\'
.
\'
> log/check_status_'
+
self
.
testCase_id
+
'.log 2>&1'
,
'\$'
,
5
)
SSH
.
command
(
'curl http://localhost:9999/stats | jq
\'
.
\'
> log/check_status_'
+
self
.
testCase_id
+
'.log 2>&1'
,
'\$'
,
5
)
SSH
.
command
(
'cat log/check_status_'
+
self
.
testCase_id
+
'.log | jq
\'
.eNB_config[0].UE
\'
| grep -c rnti | sed -e "s#^#Nb Connected UE = #"'
,
'\$'
,
5
)
SSH
.
command
(
'cat log/check_status_'
+
self
.
testCase_id
+
'.log | jq
\'
.eNB_config[0].UE
\'
| grep -c rnti | sed -e "s#^#Nb Connected UE = #"'
,
'\$'
,
5
)
...
@@ -1312,13 +1312,13 @@ class OaiCiTest():
...
@@ -1312,13 +1312,13 @@ class OaiCiTest():
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
# But for OAI-Rel14-CUPS, we launch from python executor
# But for OAI-Rel14-CUPS, we launch from python executor
launchFromEpc
=
True
launchFromEpc
=
True
if
re
.
match
(
'OAI-Rel14-CUPS'
,
EPC
.
GetType
()
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-CUPS'
,
EPC
.
Type
,
re
.
IGNORECASE
):
launchFromEpc
=
False
launchFromEpc
=
False
ping_time
=
re
.
findall
(
"-c (\d+)"
,
str
(
self
.
ping_args
))
ping_time
=
re
.
findall
(
"-c (\d+)"
,
str
(
self
.
ping_args
))
if
launchFromEpc
:
if
launchFromEpc
:
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cd '
+
EPC
.
GetSourceCodePath
()
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
SSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
ping_status
=
SSH
.
command
(
'stdbuf -o0 ping '
+
self
.
ping_args
+
' '
+
UE_IPAddress
+
' 2>&1 | stdbuf -o0 tee ping_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
int
(
ping_time
[
0
])
*
1.5
)
ping_status
=
SSH
.
command
(
'stdbuf -o0 ping '
+
self
.
ping_args
+
' '
+
UE_IPAddress
+
' 2>&1 | stdbuf -o0 tee ping_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
int
(
ping_time
[
0
])
*
1.5
)
else
:
else
:
...
@@ -1327,9 +1327,9 @@ class OaiCiTest():
...
@@ -1327,9 +1327,9 @@ class OaiCiTest():
logging
.
debug
(
cmd
)
logging
.
debug
(
cmd
)
ret
=
subprocess
.
run
(
cmd
,
shell
=
True
)
ret
=
subprocess
.
run
(
cmd
,
shell
=
True
)
ping_status
=
ret
.
returncode
ping_status
=
ret
.
returncode
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
'ping_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
GetSourceCodePath
()
+
'/scripts'
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'ping_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cat '
+
EPC
.
GetSourceCodePath
()
+
'/scripts/ping_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
5
)
SSH
.
command
(
'cat '
+
EPC
.
SourceCodePath
+
'/scripts/ping_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
5
)
# TIMEOUT CASE
# TIMEOUT CASE
if
ping_status
<
0
:
if
ping_status
<
0
:
message
=
'Ping with UE ('
+
str
(
UE_IPAddress
)
+
') crashed due to TIMEOUT!'
message
=
'Ping with UE ('
+
str
(
UE_IPAddress
)
+
') crashed due to TIMEOUT!'
...
@@ -1487,7 +1487,7 @@ class OaiCiTest():
...
@@ -1487,7 +1487,7 @@ class OaiCiTest():
else
:
else
:
copyin_res
=
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/ping_'
+
self
.
testCase_id
+
'.log'
,
'.'
)
copyin_res
=
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/ping_'
+
self
.
testCase_id
+
'.log'
,
'.'
)
if
(
copyin_res
==
0
):
if
(
copyin_res
==
0
):
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
'ping_'
+
self
.
testCase_id
+
'.log'
,
EPC
.
GetSourceCodePath
()
+
'/scripts'
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'ping_'
+
self
.
testCase_id
+
'.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
except
:
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
...
@@ -1496,7 +1496,7 @@ class OaiCiTest():
...
@@ -1496,7 +1496,7 @@ class OaiCiTest():
if
result
is
not
None
:
if
result
is
not
None
:
self
.
PingNoS1
()
self
.
PingNoS1
()
return
return
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
check_eNB
=
True
check_eNB
=
True
...
@@ -1840,7 +1840,7 @@ class OaiCiTest():
...
@@ -1840,7 +1840,7 @@ class OaiCiTest():
# Launch iperf server on EPC side (true for ltebox and old open-air-cn0
# Launch iperf server on EPC side (true for ltebox and old open-air-cn0
# But for OAI-Rel14-CUPS, we launch from python executor and we are using its IP address as iperf client address
# But for OAI-Rel14-CUPS, we launch from python executor and we are using its IP address as iperf client address
launchFromEpc
=
True
launchFromEpc
=
True
if
re
.
match
(
'OAI-Rel14-CUPS'
,
EPC
.
GetType
()
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-CUPS'
,
EPC
.
Type
,
re
.
IGNORECASE
):
launchFromEpc
=
False
launchFromEpc
=
False
cmd
=
'hostname -I'
cmd
=
'hostname -I'
ret
=
subprocess
.
run
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
encoding
=
'utf-8'
)
ret
=
subprocess
.
run
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
encoding
=
'utf-8'
)
...
@@ -1848,13 +1848,13 @@ class OaiCiTest():
...
@@ -1848,13 +1848,13 @@ class OaiCiTest():
EPC_Iperf_UE_IPAddress
=
ret
.
stdout
.
strip
()
EPC_Iperf_UE_IPAddress
=
ret
.
stdout
.
strip
()
port
=
5001
+
idx
port
=
5001
+
idx
if
launchFromEpc
:
if
launchFromEpc
:
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cd '
+
EPC
.
GetSourceCodePath
()
+
'/scripts'
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
SSH
.
command
(
'rm -f iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
5
)
SSH
.
command
(
'rm -f iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
5
)
if
udpIperf
:
if
udpIperf
:
SSH
.
command
(
'echo $USER; nohup iperf -u -s -i 1 -p '
+
str
(
port
)
+
' > iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log &'
,
EPC
.
GetUserName
()
,
5
)
SSH
.
command
(
'echo $USER; nohup iperf -u -s -i 1 -p '
+
str
(
port
)
+
' > iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log &'
,
EPC
.
UserName
,
5
)
else
:
else
:
SSH
.
command
(
'echo $USER; nohup iperf -s -i 1 -p '
+
str
(
port
)
+
' > iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log &'
,
EPC
.
GetUserName
()
,
5
)
SSH
.
command
(
'echo $USER; nohup iperf -s -i 1 -p '
+
str
(
port
)
+
' > iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log &'
,
EPC
.
UserName
,
5
)
SSH
.
close
()
SSH
.
close
()
else
:
else
:
if
self
.
ueIperfVersion
==
self
.
dummyIperfVersion
:
if
self
.
ueIperfVersion
==
self
.
dummyIperfVersion
:
...
@@ -1877,7 +1877,7 @@ class OaiCiTest():
...
@@ -1877,7 +1877,7 @@ class OaiCiTest():
SSH
.
command
(
'cd '
+
self
.
UESourceCodePath
+
'/cmake_targets'
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
self
.
UESourceCodePath
+
'/cmake_targets'
,
'\$'
,
5
)
else
:
else
:
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
SSH
.
command
(
'cd '
+
EPC
.
GetSourceCodePath
()
+
'/scripts'
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
iperf_time
=
self
.
Iperf_ComputeTime
()
iperf_time
=
self
.
Iperf_ComputeTime
()
time
.
sleep
(
0.5
)
time
.
sleep
(
0.5
)
...
@@ -1911,27 +1911,27 @@ class OaiCiTest():
...
@@ -1911,27 +1911,27 @@ class OaiCiTest():
# Kill iperf server on EPC side
# Kill iperf server on EPC side
if
launchFromEpc
:
if
launchFromEpc
:
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
())
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
SSH
.
command
(
'killall --signal SIGKILL iperf'
,
EPC
.
GetUserName
()
,
5
)
SSH
.
command
(
'killall --signal SIGKILL iperf'
,
EPC
.
UserName
,
5
)
SSH
.
close
()
SSH
.
close
()
else
:
else
:
cmd
=
'killall --signal SIGKILL iperf'
cmd
=
'killall --signal SIGKILL iperf'
logging
.
debug
(
cmd
)
logging
.
debug
(
cmd
)
subprocess
.
run
(
cmd
,
shell
=
True
)
subprocess
.
run
(
cmd
,
shell
=
True
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
GetSourceCodePath
()
+
'/scripts'
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
# in case of failure, retrieve server log
# in case of failure, retrieve server log
if
(
clientStatus
==
-
1
)
or
(
clientStatus
==
-
2
):
if
(
clientStatus
==
-
1
)
or
(
clientStatus
==
-
2
):
if
launchFromEpc
:
if
launchFromEpc
:
time
.
sleep
(
1
)
time
.
sleep
(
1
)
if
(
os
.
path
.
isfile
(
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
)):
if
(
os
.
path
.
isfile
(
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
)):
os
.
remove
(
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
)
os
.
remove
(
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
)
SSH
.
copyin
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
EPC
.
GetSourceCodePath
()
+
'/scripts/iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/scripts/iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
modified_options
)
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
modified_options
)
# in case of OAI-UE
# in case of OAI-UE
if
(
device_id
==
'OAI-UE'
):
if
(
device_id
==
'OAI-UE'
):
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/iperf_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/iperf_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
'iperf_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
GetSourceCodePath
()
+
'/scripts'
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
def
Iperf_common
(
self
,
lock
,
UE_IPAddress
,
device_id
,
idx
,
ue_num
,
statusQueue
):
def
Iperf_common
(
self
,
lock
,
UE_IPAddress
,
device_id
,
idx
,
ue_num
,
statusQueue
):
try
:
try
:
...
@@ -1945,8 +1945,8 @@ class OaiCiTest():
...
@@ -1945,8 +1945,8 @@ class OaiCiTest():
if
(
device_id
!=
'OAI-UE'
):
if
(
device_id
!=
'OAI-UE'
):
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
# if by chance ADB server and EPC are on the same remote host, at least log collection will take care of it
# if by chance ADB server and EPC are on the same remote host, at least log collection will take care of it
SSH
.
command
(
'if [ ! -d '
+
EPC
.
GetSourceCodePath
()
+
'/scripts ]; then mkdir -p '
+
EPC
.
GetSourceCodePath
()
+
'/scripts ; fi'
,
'\$'
,
5
)
SSH
.
command
(
'if [ ! -d '
+
EPC
.
SourceCodePath
+
'/scripts ]; then mkdir -p '
+
EPC
.
SourceCodePath
+
'/scripts ; fi'
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
GetSourceCodePath
()
+
'/scripts'
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
# Checking if iperf / iperf3 are installed
# Checking if iperf / iperf3 are installed
if
self
.
ADBCentralized
:
if
self
.
ADBCentralized
:
SSH
.
command
(
'adb -s '
+
device_id
+
' shell "ls /data/local/tmp"'
,
'\$'
,
5
)
SSH
.
command
(
'adb -s '
+
device_id
+
' shell "ls /data/local/tmp"'
,
'\$'
,
5
)
...
@@ -2005,7 +2005,7 @@ class OaiCiTest():
...
@@ -2005,7 +2005,7 @@ class OaiCiTest():
SSH
.
command
(
'echo $USER; nohup iperf -B '
+
UE_IPAddress
+
' -u -s -i 1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log &'
,
self
.
UEUserName
,
5
)
SSH
.
command
(
'echo $USER; nohup iperf -B '
+
UE_IPAddress
+
' -u -s -i 1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log &'
,
self
.
UEUserName
,
5
)
else
:
else
:
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
SSH
.
command
(
'cd '
+
EPC
.
GetSourceCodePath
()
+
'/scripts'
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
if
self
.
ADBCentralized
:
if
self
.
ADBCentralized
:
if
(
useIperf3
):
if
(
useIperf3
):
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell /data/local/tmp/iperf3 -s &'
,
'\$'
,
5
)
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell /data/local/tmp/iperf3 -s &'
,
'\$'
,
5
)
...
@@ -2027,11 +2027,11 @@ class OaiCiTest():
...
@@ -2027,11 +2027,11 @@ class OaiCiTest():
# Launch the IPERF client on the EPC side for DL (true for ltebox and old open-air-cn
# Launch the IPERF client on the EPC side for DL (true for ltebox and old open-air-cn
# But for OAI-Rel14-CUPS, we launch from python executor
# But for OAI-Rel14-CUPS, we launch from python executor
launchFromEpc
=
True
launchFromEpc
=
True
if
re
.
match
(
'OAI-Rel14-CUPS'
,
EPC
.
GetType
()
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-CUPS'
,
EPC
.
Type
,
re
.
IGNORECASE
):
launchFromEpc
=
False
launchFromEpc
=
False
if
launchFromEpc
:
if
launchFromEpc
:
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cd '
+
EPC
.
GetSourceCodePath
()
+
'/scripts'
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
iperf_time
=
self
.
Iperf_ComputeTime
()
iperf_time
=
self
.
Iperf_ComputeTime
()
time
.
sleep
(
0.5
)
time
.
sleep
(
0.5
)
...
@@ -2066,9 +2066,9 @@ class OaiCiTest():
...
@@ -2066,9 +2066,9 @@ class OaiCiTest():
logging
.
debug
(
cmd
)
logging
.
debug
(
cmd
)
ret
=
subprocess
.
run
(
cmd
,
shell
=
True
)
ret
=
subprocess
.
run
(
cmd
,
shell
=
True
)
iperf_status
=
ret
.
returncode
iperf_status
=
ret
.
returncode
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
'iperf_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
GetSourceCodePath
()
+
'/scripts'
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cat '
+
EPC
.
GetSourceCodePath
()
+
'/scripts/iperf_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
5
)
SSH
.
command
(
'cat '
+
EPC
.
SourceCodePath
+
'/scripts/iperf_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
5
)
if
iperf_status
<
0
:
if
iperf_status
<
0
:
if
launchFromEpc
:
if
launchFromEpc
:
SSH
.
close
()
SSH
.
close
()
...
@@ -2105,7 +2105,7 @@ class OaiCiTest():
...
@@ -2105,7 +2105,7 @@ class OaiCiTest():
if
(
device_id
==
'OAI-UE'
):
if
(
device_id
==
'OAI-UE'
):
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
else
:
else
:
SSH
.
copyin
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
,
EPC
.
GetSourceCodePath
()
+
'/scripts/iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
SSH
.
copyin
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
,
EPC
.
SourceCodePath
+
'/scripts/iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
# fromdos has to be called on the python executor not on ADB server
# fromdos has to be called on the python executor not on ADB server
cmd
=
'fromdos -o iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
cmd
=
'fromdos -o iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
subprocess
.
run
(
cmd
,
shell
=
True
)
subprocess
.
run
(
cmd
,
shell
=
True
)
...
@@ -2115,10 +2115,10 @@ class OaiCiTest():
...
@@ -2115,10 +2115,10 @@ class OaiCiTest():
if
(
device_id
==
'OAI-UE'
):
if
(
device_id
==
'OAI-UE'
):
if
(
os
.
path
.
isfile
(
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
)):
if
(
os
.
path
.
isfile
(
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
)):
if
not
launchFromEpc
:
if
not
launchFromEpc
:
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
GetSourceCodePath
()
+
'/scripts'
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
else
:
else
:
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'.'
)
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
GetSourceCodePath
()
+
'/scripts'
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
except
:
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
...
@@ -2202,10 +2202,10 @@ class OaiCiTest():
...
@@ -2202,10 +2202,10 @@ class OaiCiTest():
if
(
clientStatus
==
-
1
):
if
(
clientStatus
==
-
1
):
copyin_res
=
SSH
.
copyin
(
iServerIPAddr
,
iServerUser
,
iServerPasswd
,
'/tmp/tmp_iperf_server_'
+
self
.
testCase_id
+
'.log'
,
'iperf_server_'
+
self
.
testCase_id
+
'_OAI-UE.log'
)
copyin_res
=
SSH
.
copyin
(
iServerIPAddr
,
iServerUser
,
iServerPasswd
,
'/tmp/tmp_iperf_server_'
+
self
.
testCase_id
+
'.log'
,
'iperf_server_'
+
self
.
testCase_id
+
'_OAI-UE.log'
)
if
(
copyin_res
==
0
):
if
(
copyin_res
==
0
):
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
'iperf_server_'
+
self
.
testCase_id
+
'_OAI-UE.log'
,
EPC
.
GetSourceCodePath
()
+
'/scripts'
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_server_'
+
self
.
testCase_id
+
'_OAI-UE.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
copyin_res
=
SSH
.
copyin
(
iClientIPAddr
,
iClientUser
,
iClientPasswd
,
'/tmp/tmp_iperf_'
+
self
.
testCase_id
+
'.log'
,
'iperf_'
+
self
.
testCase_id
+
'_OAI-UE.log'
)
copyin_res
=
SSH
.
copyin
(
iClientIPAddr
,
iClientUser
,
iClientPasswd
,
'/tmp/tmp_iperf_'
+
self
.
testCase_id
+
'.log'
,
'iperf_'
+
self
.
testCase_id
+
'_OAI-UE.log'
)
if
(
copyin_res
==
0
):
if
(
copyin_res
==
0
):
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
'iperf_'
+
self
.
testCase_id
+
'_OAI-UE.log'
,
EPC
.
GetSourceCodePath
()
+
'/scripts'
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_'
+
self
.
testCase_id
+
'_OAI-UE.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
iperf_noperf
=
False
iperf_noperf
=
False
if
status_queue
.
empty
():
if
status_queue
.
empty
():
iperf_status
=
False
iperf_status
=
False
...
@@ -2236,7 +2236,7 @@ class OaiCiTest():
...
@@ -2236,7 +2236,7 @@ class OaiCiTest():
if
result
is
not
None
:
if
result
is
not
None
:
self
.
IperfNoS1
()
self
.
IperfNoS1
()
return
return
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
or
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
or
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
check_eNB
=
True
check_eNB
=
True
...
@@ -2432,7 +2432,7 @@ class OaiCiTest():
...
@@ -2432,7 +2432,7 @@ class OaiCiTest():
nrFoundDCI
=
0
nrFoundDCI
=
0
nrCRCOK
=
0
nrCRCOK
=
0
mbms_messages
=
0
mbms_messages
=
0
HTML
.
SethtmlUEFailureMsg
(
''
)
HTML
.
htmlUEFailureMsg
=
''
global_status
=
CONST
.
ALL_PROCESSES_OK
global_status
=
CONST
.
ALL_PROCESSES_OK
for
line
in
ue_log_file
.
readlines
():
for
line
in
ue_log_file
.
readlines
():
result
=
re
.
search
(
'nr_synchro_time'
,
str
(
line
))
result
=
re
.
search
(
'nr_synchro_time'
,
str
(
line
))
...
@@ -2502,22 +2502,22 @@ class OaiCiTest():
...
@@ -2502,22 +2502,22 @@ class OaiCiTest():
if
result
is
not
None
and
(
not
mib_found
):
if
result
is
not
None
and
(
not
mib_found
):
try
:
try
:
mibMsg
=
"MIB Information: "
+
result
.
group
(
1
)
+
', '
+
result
.
group
(
2
)
mibMsg
=
"MIB Information: "
+
result
.
group
(
1
)
+
', '
+
result
.
group
(
2
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
+
'
\n
'
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
mibMsg
=
" nidcell = "
+
result
.
group
(
'nidcell'
)
mibMsg
=
" nidcell = "
+
result
.
group
(
'nidcell'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
mibMsg
=
" n_rb_dl = "
+
result
.
group
(
'n_rb_dl'
)
mibMsg
=
" n_rb_dl = "
+
result
.
group
(
'n_rb_dl'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
+
'
\n
'
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
mibMsg
=
" phich_duration = "
+
result
.
group
(
'phich_duration'
)
mibMsg
=
" phich_duration = "
+
result
.
group
(
'phich_duration'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
mibMsg
=
" phich_resource = "
+
result
.
group
(
'phich_resource'
)
mibMsg
=
" phich_resource = "
+
result
.
group
(
'phich_resource'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
+
'
\n
'
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
mibMsg
=
" tx_ant = "
+
result
.
group
(
'tx_ant'
)
mibMsg
=
" tx_ant = "
+
result
.
group
(
'tx_ant'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
+
'
\n
'
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
mib_found
=
True
mib_found
=
True
except
Exception
as
e
:
except
Exception
as
e
:
...
@@ -2526,7 +2526,7 @@ class OaiCiTest():
...
@@ -2526,7 +2526,7 @@ class OaiCiTest():
if
result
is
not
None
and
(
not
frequency_found
):
if
result
is
not
None
and
(
not
frequency_found
):
try
:
try
:
mibMsg
=
"Measured Carrier Frequency = "
+
result
.
group
(
'measured_carrier_frequency'
)
+
' Hz'
mibMsg
=
"Measured Carrier Frequency = "
+
result
.
group
(
'measured_carrier_frequency'
)
+
' Hz'
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
+
'
\n
'
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
frequency_found
=
True
frequency_found
=
True
except
Exception
as
e
:
except
Exception
as
e
:
...
@@ -2535,7 +2535,7 @@ class OaiCiTest():
...
@@ -2535,7 +2535,7 @@ class OaiCiTest():
if
result
is
not
None
and
(
not
plmn_found
):
if
result
is
not
None
and
(
not
plmn_found
):
try
:
try
:
mibMsg
=
'PLMN MCC = '
+
result
.
group
(
'mcc'
)
+
' MNC = '
+
result
.
group
(
'mnc'
)
mibMsg
=
'PLMN MCC = '
+
result
.
group
(
'mcc'
)
+
' MNC = '
+
result
.
group
(
'mnc'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
+
'
\n
'
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
plmn_found
=
True
plmn_found
=
True
except
Exception
as
e
:
except
Exception
as
e
:
...
@@ -2544,7 +2544,7 @@ class OaiCiTest():
...
@@ -2544,7 +2544,7 @@ class OaiCiTest():
if
result
is
not
None
:
if
result
is
not
None
:
try
:
try
:
mibMsg
=
"The operator is: "
+
result
.
group
(
'operator'
)
mibMsg
=
"The operator is: "
+
result
.
group
(
'operator'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
+
'
\n
'
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
except
Exception
as
e
:
except
Exception
as
e
:
logging
.
error
(
'
\033
[91m'
+
"Operator name not found"
+
'
\033
[0m'
)
logging
.
error
(
'
\033
[91m'
+
"Operator name not found"
+
'
\033
[0m'
)
...
@@ -2552,7 +2552,7 @@ class OaiCiTest():
...
@@ -2552,7 +2552,7 @@ class OaiCiTest():
if
result
is
not
None
:
if
result
is
not
None
:
try
:
try
:
mibMsg
=
"SIB5 InterFreqCarrierFreq element "
+
result
.
group
(
1
)
+
'/'
+
result
.
group
(
2
)
mibMsg
=
"SIB5 InterFreqCarrierFreq element "
+
result
.
group
(
1
)
+
'/'
+
result
.
group
(
2
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
mibMsg
+
' -> '
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
mibMsg
+
' -> '
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
mibMsg
+
'
\033
[0m'
)
except
Exception
as
e
:
except
Exception
as
e
:
logging
.
error
(
'
\033
[91m'
+
"SIB5 InterFreqCarrierFreq element not found"
+
'
\033
[0m'
)
logging
.
error
(
'
\033
[91m'
+
"SIB5 InterFreqCarrierFreq element not found"
+
'
\033
[0m'
)
...
@@ -2570,7 +2570,7 @@ class OaiCiTest():
...
@@ -2570,7 +2570,7 @@ class OaiCiTest():
if
result
is
not
None
:
if
result
is
not
None
:
try
:
try
:
prb
=
result
.
group
(
'allowed_bandwidth'
)
prb
=
result
.
group
(
'allowed_bandwidth'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
' -- PRB: '
+
prb
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
' -- PRB: '
+
prb
+
'
\n
'
logging
.
debug
(
'
\033
[94m'
+
" AllowedMeasBandwidth: "
+
prb
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
" AllowedMeasBandwidth: "
+
prb
+
'
\033
[0m'
)
except
Exception
as
e
:
except
Exception
as
e
:
logging
.
error
(
'
\033
[91m'
+
" AllowedMeasBandwidth not found"
+
'
\033
[0m'
)
logging
.
error
(
'
\033
[91m'
+
" AllowedMeasBandwidth not found"
+
'
\033
[0m'
)
...
@@ -2578,48 +2578,48 @@ class OaiCiTest():
...
@@ -2578,48 +2578,48 @@ class OaiCiTest():
if
rrcConnectionRecfgComplete
>
0
:
if
rrcConnectionRecfgComplete
>
0
:
statMsg
=
'UE connected to eNB ('
+
str
(
rrcConnectionRecfgComplete
)
+
' RRCConnectionReconfigurationComplete message(s) generated)'
statMsg
=
'UE connected to eNB ('
+
str
(
rrcConnectionRecfgComplete
)
+
' RRCConnectionReconfigurationComplete message(s) generated)'
logging
.
debug
(
'
\033
[94m'
+
statMsg
+
'
\033
[0m'
)
logging
.
debug
(
'
\033
[94m'
+
statMsg
+
'
\033
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
nrUEFlag
:
if
nrUEFlag
:
if
nrDecodeMib
>
0
:
if
nrDecodeMib
>
0
:
statMsg
=
'UE showed '
+
str
(
nrDecodeMib
)
+
' MIB decode message(s)'
statMsg
=
'UE showed '
+
str
(
nrDecodeMib
)
+
' MIB decode message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
nrFoundDCI
>
0
:
if
nrFoundDCI
>
0
:
statMsg
=
'UE showed '
+
str
(
nrFoundDCI
)
+
' DCI found message(s)'
statMsg
=
'UE showed '
+
str
(
nrFoundDCI
)
+
' DCI found message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
nrCRCOK
>
0
:
if
nrCRCOK
>
0
:
statMsg
=
'UE showed '
+
str
(
nrCRCOK
)
+
' PDSCH decoding message(s)'
statMsg
=
'UE showed '
+
str
(
nrCRCOK
)
+
' PDSCH decoding message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
not
frequency_found
:
if
not
frequency_found
:
statMsg
=
'NR-UE could NOT synch!'
statMsg
=
'NR-UE could NOT synch!'
logging
.
error
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
error
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
uciStatMsgCount
>
0
:
if
uciStatMsgCount
>
0
:
statMsg
=
'UE showed '
+
str
(
uciStatMsgCount
)
+
' "uci->stat" message(s)'
statMsg
=
'UE showed '
+
str
(
uciStatMsgCount
)
+
' "uci->stat" message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
pdcpDataReqFailedCount
>
0
:
if
pdcpDataReqFailedCount
>
0
:
statMsg
=
'UE showed '
+
str
(
pdcpDataReqFailedCount
)
+
' "PDCP data request failed" message(s)'
statMsg
=
'UE showed '
+
str
(
pdcpDataReqFailedCount
)
+
' "PDCP data request failed" message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
badDciCount
>
0
:
if
badDciCount
>
0
:
statMsg
=
'UE showed '
+
str
(
badDciCount
)
+
' "bad DCI 1(A)" message(s)'
statMsg
=
'UE showed '
+
str
(
badDciCount
)
+
' "bad DCI 1(A)" message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
f1aRetransmissionCount
>
0
:
if
f1aRetransmissionCount
>
0
:
statMsg
=
'UE showed '
+
str
(
f1aRetransmissionCount
)
+
' "Format1A Retransmission but TBS are different" message(s)'
statMsg
=
'UE showed '
+
str
(
f1aRetransmissionCount
)
+
' "Format1A Retransmission but TBS are different" message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
fatalErrorCount
>
0
:
if
fatalErrorCount
>
0
:
statMsg
=
'UE showed '
+
str
(
fatalErrorCount
)
+
' "FATAL ERROR:" message(s)'
statMsg
=
'UE showed '
+
str
(
fatalErrorCount
)
+
' "FATAL ERROR:" message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
macBsrTimerExpiredCount
>
0
:
if
macBsrTimerExpiredCount
>
0
:
statMsg
=
'UE showed '
+
str
(
fatalErrorCount
)
+
' "MAC BSR Triggered ReTxBSR Timer expiry" message(s)'
statMsg
=
'UE showed '
+
str
(
fatalErrorCount
)
+
' "MAC BSR Triggered ReTxBSR Timer expiry" message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
RAN
.
eNBmbmsEnables
[
0
]:
if
RAN
.
eNBmbmsEnables
[
0
]:
if
mbms_messages
>
0
:
if
mbms_messages
>
0
:
statMsg
=
'UE showed '
+
str
(
mbms_messages
)
+
' "TRIED TO PUSH MBMS DATA" message(s)'
statMsg
=
'UE showed '
+
str
(
mbms_messages
)
+
' "TRIED TO PUSH MBMS DATA" message(s)'
...
@@ -2628,7 +2628,7 @@ class OaiCiTest():
...
@@ -2628,7 +2628,7 @@ class OaiCiTest():
statMsg
=
'UE did NOT SHOW "TRIED TO PUSH MBMS DATA" message(s)'
statMsg
=
'UE did NOT SHOW "TRIED TO PUSH MBMS DATA" message(s)'
logging
.
debug
(
'
\u001B
[1;30;41m '
+
statMsg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;41m '
+
statMsg
+
'
\u001B
[0m'
)
global_status
=
OAI_UE_PROCESS_NO_MBMS_MSGS
global_status
=
OAI_UE_PROCESS_NO_MBMS_MSGS
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
statMsg
+
'
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
statMsg
+
'
\n
'
if
foundSegFault
:
if
foundSegFault
:
logging
.
debug
(
'
\u001B
[1;37;41m UE ended with a Segmentation Fault!
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;37;41m UE ended with a Segmentation Fault!
\u001B
[0m'
)
if
not
nrUEFlag
:
if
not
nrUEFlag
:
...
@@ -2638,7 +2638,7 @@ class OaiCiTest():
...
@@ -2638,7 +2638,7 @@ class OaiCiTest():
global_status
=
CONST
.
OAI_UE_PROCESS_SEG_FAULT
global_status
=
CONST
.
OAI_UE_PROCESS_SEG_FAULT
if
foundAssertion
:
if
foundAssertion
:
logging
.
debug
(
'
\u001B
[1;30;43m UE showed an assertion!
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m UE showed an assertion!
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
'UE showed an assertion!
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
'UE showed an assertion!
\n
'
if
not
nrUEFlag
:
if
not
nrUEFlag
:
if
not
mib_found
or
not
frequency_found
:
if
not
mib_found
or
not
frequency_found
:
global_status
=
CONST
.
OAI_UE_PROCESS_ASSERTION
global_status
=
CONST
.
OAI_UE_PROCESS_ASSERTION
...
@@ -2647,14 +2647,14 @@ class OaiCiTest():
...
@@ -2647,14 +2647,14 @@ class OaiCiTest():
global_status
=
CONST
.
OAI_UE_PROCESS_ASSERTION
global_status
=
CONST
.
OAI_UE_PROCESS_ASSERTION
if
foundRealTimeIssue
:
if
foundRealTimeIssue
:
logging
.
debug
(
'
\u001B
[1;37;41m UE faced real time issues!
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;37;41m UE faced real time issues!
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
'UE faced real time issues!
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
'UE faced real time issues!
\n
'
if
nrUEFlag
:
if
nrUEFlag
:
if
not
frequency_found
:
if
not
frequency_found
:
global_status
=
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
global_status
=
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
else
:
else
:
if
no_cell_sync_found
and
not
mib_found
:
if
no_cell_sync_found
and
not
mib_found
:
logging
.
debug
(
'
\u001B
[1;37;41m UE could not synchronize !
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;37;41m UE could not synchronize !
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
HTML
.
GethtmlUEFailureMsg
()
+
'UE could not synchronize!
\n
'
)
HTML
.
htmlUEFailureMsg
=
HTML
.
htmlUEFailureMsg
+
'UE could not synchronize!
\n
'
global_status
=
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
global_status
=
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
return
global_status
return
global_status
...
@@ -2662,13 +2662,13 @@ class OaiCiTest():
...
@@ -2662,13 +2662,13 @@ class OaiCiTest():
def
TerminateFlexranCtrl
(
self
):
def
TerminateFlexranCtrl
(
self
):
if
RAN
.
flexranCtrlInstalled
==
False
or
RAN
.
flexranCtrlStarted
==
False
:
if
RAN
.
flexranCtrlInstalled
==
False
or
RAN
.
flexranCtrlStarted
==
False
:
return
return
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'echo '
+
EPC
.
GetPassword
()
+
' | sudo -S daemon --name=flexran_rtc_daemon --stop'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
Password
+
' | sudo -S daemon --name=flexran_rtc_daemon --stop'
,
'\$'
,
5
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
SSH
.
command
(
'echo '
+
EPC
.
GetPassword
()
+
' | sudo -S killall --signal SIGKILL rt_controller'
,
'\$'
,
5
)
SSH
.
command
(
'echo '
+
EPC
.
Password
+
' | sudo -S killall --signal SIGKILL rt_controller'
,
'\$'
,
5
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
SSH
.
close
()
SSH
.
close
()
RAN
.
flexranCtrlStarted
=
False
RAN
.
flexranCtrlStarted
=
False
...
@@ -2737,7 +2737,7 @@ class OaiCiTest():
...
@@ -2737,7 +2737,7 @@ class OaiCiTest():
copyin_res
=
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/'
+
self
.
UELogFile
,
'.'
)
copyin_res
=
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/'
+
self
.
UELogFile
,
'.'
)
if
(
copyin_res
==
-
1
):
if
(
copyin_res
==
-
1
):
logging
.
debug
(
'
\u001B
[1;37;41m Could not copy UE logfile to analyze it!
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;37;41m Could not copy UE logfile to analyze it!
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
'Could not copy UE logfile to analyze it!'
)
HTML
.
htmlUEFailureMsg
=
'Could not copy UE logfile to analyze it!'
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE
,
'UE'
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE
,
'UE'
)
self
.
UELogFile
=
''
self
.
UELogFile
=
''
return
return
...
@@ -2750,7 +2750,7 @@ class OaiCiTest():
...
@@ -2750,7 +2750,7 @@ class OaiCiTest():
ueAction
=
'Connection'
ueAction
=
'Connection'
if
(
logStatus
<
0
):
if
(
logStatus
<
0
):
logging
.
debug
(
'
\u001B
[1m'
+
ueAction
+
' Failed
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m'
+
ueAction
+
' Failed
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
'<b>'
+
ueAction
+
' Failed</b>
\n
'
+
HTML
.
GethtmlUEFailureMsg
())
HTML
.
htmlUEFailureMsg
=
'<b>'
+
ueAction
+
' Failed</b>
\n
'
+
HTML
.
htmlUEFailureMsg
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
logStatus
,
'UE'
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
logStatus
,
'UE'
)
if
RAN
.
air_interface
==
'lte'
:
if
RAN
.
air_interface
==
'lte'
:
# In case of sniffing on commercial eNBs we have random results
# In case of sniffing on commercial eNBs we have random results
...
@@ -2764,7 +2764,7 @@ class OaiCiTest():
...
@@ -2764,7 +2764,7 @@ class OaiCiTest():
self
.
AutoTerminateUEandeNB
()
self
.
AutoTerminateUEandeNB
()
else
:
else
:
logging
.
debug
(
'
\u001B
[1m'
+
ueAction
+
' Completed
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m'
+
ueAction
+
' Completed
\u001B
[0m'
)
HTML
.
SethtmlUEFailureMsg
(
'<b>'
+
ueAction
+
' Completed</b>
\n
'
+
HTML
.
GethtmlUEFailureMsg
())
HTML
.
htmlUEFailureMsg
=
'<b>'
+
ueAction
+
' Completed</b>
\n
'
+
HTML
.
htmlUEFailureMsg
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
UELogFile
=
''
self
.
UELogFile
=
''
else
:
else
:
...
@@ -2773,31 +2773,31 @@ class OaiCiTest():
...
@@ -2773,31 +2773,31 @@ class OaiCiTest():
def
AutoTerminateUEandeNB
(
self
):
def
AutoTerminateUEandeNB
(
self
):
if
(
self
.
ADBIPAddress
!=
'none'
):
if
(
self
.
ADBIPAddress
!=
'none'
):
self
.
testCase_id
=
'AUTO-KILL-UE'
self
.
testCase_id
=
'AUTO-KILL-UE'
HTML
.
SettestCase_id
(
self
.
testCase_id
)
HTML
.
testCase_id
=
self
.
testCase_id
self
.
desc
=
'Automatic Termination of UE'
self
.
desc
=
'Automatic Termination of UE'
HTML
.
Setdesc
(
'Automatic Termination of UE'
)
HTML
.
desc
=
'Automatic Termination of UE'
self
.
ShowTestID
()
self
.
ShowTestID
()
self
.
TerminateUE
()
self
.
TerminateUE
()
if
(
self
.
Initialize_OAI_UE_args
!=
''
):
if
(
self
.
Initialize_OAI_UE_args
!=
''
):
self
.
testCase_id
=
'AUTO-KILL-OAI-UE'
self
.
testCase_id
=
'AUTO-KILL-OAI-UE'
HTML
.
SettestCase_id
(
self
.
testCase_id
)
HTML
.
testCase_id
=
self
.
testCase_id
self
.
desc
=
'Automatic Termination of OAI-UE'
self
.
desc
=
'Automatic Termination of OAI-UE'
HTML
.
Setdesc
(
'Automatic Termination of OAI-UE'
)
HTML
.
desc
=
'Automatic Termination of OAI-UE'
self
.
ShowTestID
()
self
.
ShowTestID
()
self
.
TerminateOAIUE
()
self
.
TerminateOAIUE
()
if
(
RAN
.
Initialize_eNB_args
!=
''
):
if
(
RAN
.
Initialize_eNB_args
!=
''
):
self
.
testCase_id
=
'AUTO-KILL-eNB'
self
.
testCase_id
=
'AUTO-KILL-eNB'
HTML
.
SettestCase_id
(
self
.
testCase_id
)
HTML
.
testCase_id
=
self
.
testCase_id
self
.
desc
=
'Automatic Termination of eNB'
self
.
desc
=
'Automatic Termination of eNB'
HTML
.
Setdesc
(
'Automatic Termination of eNB'
)
HTML
.
desc
=
'Automatic Termination of eNB'
self
.
ShowTestID
()
self
.
ShowTestID
()
RAN
.
eNB_instance
=
'0'
RAN
.
eNB_instance
=
'0'
RAN
.
TerminateeNB
()
RAN
.
TerminateeNB
()
if
RAN
.
flexranCtrlInstalled
and
RAN
.
flexranCtrlStarted
:
if
RAN
.
flexranCtrlInstalled
and
RAN
.
flexranCtrlStarted
:
self
.
testCase_id
=
'AUTO-KILL-flexran-ctl'
self
.
testCase_id
=
'AUTO-KILL-flexran-ctl'
HTML
.
SettestCase_id
(
self
.
testCase_id
)
HTML
.
testCase_id
=
self
.
testCase_id
self
.
desc
=
'Automatic Termination of FlexRan CTL'
self
.
desc
=
'Automatic Termination of FlexRan CTL'
HTML
.
Setdesc
(
'Automatic Termination of FlexRan CTL'
)
HTML
.
desc
=
'Automatic Termination of FlexRan CTL'
self
.
ShowTestID
()
self
.
ShowTestID
()
self
.
TerminateFlexranCtrl
()
self
.
TerminateFlexranCtrl
()
RAN
.
prematureExit
=
True
RAN
.
prematureExit
=
True
...
@@ -2807,7 +2807,7 @@ class OaiCiTest():
...
@@ -2807,7 +2807,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRow
(
str
(
self
.
idle_sleep_time
)
+
' sec'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
str
(
self
.
idle_sleep_time
)
+
' sec'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
X2_Status
(
self
,
idx
,
fileName
):
def
X2_Status
(
self
,
idx
,
fileName
):
cmd
=
"curl --silent http://"
+
EPC
.
GetIPAddress
()
+
":9999/stats | jq '.' > "
+
fileName
cmd
=
"curl --silent http://"
+
EPC
.
IPAddress
+
":9999/stats | jq '.' > "
+
fileName
message
=
cmd
+
'
\n
'
message
=
cmd
+
'
\n
'
logging
.
debug
(
cmd
)
logging
.
debug
(
cmd
)
subprocess
.
run
(
cmd
,
shell
=
True
)
subprocess
.
run
(
cmd
,
shell
=
True
)
...
@@ -2871,7 +2871,7 @@ class OaiCiTest():
...
@@ -2871,7 +2871,7 @@ class OaiCiTest():
eNB_cnt
=
self
.
x2NbENBs
eNB_cnt
=
self
.
x2NbENBs
cnt
=
0
cnt
=
0
while
cnt
<
eNB_cnt
:
while
cnt
<
eNB_cnt
:
cmd
=
"curl -XPOST http://"
+
EPC
.
GetIPAddress
()
+
":9999/rrc/x2_ho_net_control/enb/"
+
str
(
self
.
x2ENBBsIds
[
0
][
cnt
])
+
"/1"
cmd
=
"curl -XPOST http://"
+
EPC
.
IPAddress
+
":9999/rrc/x2_ho_net_control/enb/"
+
str
(
self
.
x2ENBBsIds
[
0
][
cnt
])
+
"/1"
logging
.
debug
(
cmd
)
logging
.
debug
(
cmd
)
fullMessage
+=
cmd
+
'
\n
'
fullMessage
+=
cmd
+
'
\n
'
subprocess
.
run
(
cmd
,
shell
=
True
)
subprocess
.
run
(
cmd
,
shell
=
True
)
...
@@ -2885,7 +2885,7 @@ class OaiCiTest():
...
@@ -2885,7 +2885,7 @@ class OaiCiTest():
while
cnt
<
eNB_cnt
:
while
cnt
<
eNB_cnt
:
ueIdx
=
0
ueIdx
=
0
while
ueIdx
<
len
(
self
.
x2ENBConnectedUEs
[
0
][
cnt
]):
while
ueIdx
<
len
(
self
.
x2ENBConnectedUEs
[
0
][
cnt
]):
cmd
=
"curl -XPOST http://"
+
EPC
.
Get
IPAddress
()
+
":9999/rrc/ho/senb/"
+
str
(
self
.
x2ENBBsIds
[
0
][
cnt
])
+
"/ue/"
+
str
(
self
.
x2ENBConnectedUEs
[
0
][
cnt
][
ueIdx
])
+
"/tenb/"
+
str
(
self
.
x2ENBBsIds
[
0
][
eNB_cnt
-
cnt
-
1
])
cmd
=
"curl -XPOST http://"
+
EPC
.
IPAddress
()
+
":9999/rrc/ho/senb/"
+
str
(
self
.
x2ENBBsIds
[
0
][
cnt
])
+
"/ue/"
+
str
(
self
.
x2ENBConnectedUEs
[
0
][
cnt
][
ueIdx
])
+
"/tenb/"
+
str
(
self
.
x2ENBBsIds
[
0
][
eNB_cnt
-
cnt
-
1
])
logging
.
debug
(
cmd
)
logging
.
debug
(
cmd
)
fullMessage
+=
cmd
+
'
\n
'
fullMessage
+=
cmd
+
'
\n
'
subprocess
.
run
(
cmd
,
shell
=
True
)
subprocess
.
run
(
cmd
,
shell
=
True
)
...
@@ -2936,8 +2936,8 @@ class OaiCiTest():
...
@@ -2936,8 +2936,8 @@ class OaiCiTest():
SSH
.
command
(
'zip build.log.zip build_log_*/*'
,
'\$'
,
60
)
SSH
.
command
(
'zip build.log.zip build_log_*/*'
,
'\$'
,
60
)
SSH
.
close
()
SSH
.
close
()
def
LogCollectPing
(
self
):
def
LogCollectPing
(
self
):
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cd '
+
EPC
.
GetSourceCodePath
()
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
SSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
SSH
.
command
(
'rm -f ping.log.zip'
,
'\$'
,
5
)
SSH
.
command
(
'rm -f ping.log.zip'
,
'\$'
,
5
)
SSH
.
command
(
'zip ping.log.zip ping*.log'
,
'\$'
,
60
)
SSH
.
command
(
'zip ping.log.zip ping*.log'
,
'\$'
,
60
)
...
@@ -2945,8 +2945,8 @@ class OaiCiTest():
...
@@ -2945,8 +2945,8 @@ class OaiCiTest():
SSH
.
close
()
SSH
.
close
()
def
LogCollectIperf
(
self
):
def
LogCollectIperf
(
self
):
SSH
.
open
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cd '
+
EPC
.
GetSourceCodePath
()
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
SSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
SSH
.
command
(
'rm -f iperf.log.zip'
,
'\$'
,
5
)
SSH
.
command
(
'rm -f iperf.log.zip'
,
'\$'
,
5
)
SSH
.
command
(
'zip iperf.log.zip iperf*.log'
,
'\$'
,
60
)
SSH
.
command
(
'zip iperf.log.zip iperf*.log'
,
'\$'
,
60
)
...
@@ -2964,13 +2964,13 @@ class OaiCiTest():
...
@@ -2964,13 +2964,13 @@ class OaiCiTest():
def
RetrieveSystemVersion
(
self
,
machine
):
def
RetrieveSystemVersion
(
self
,
machine
):
if
RAN
.
eNBIPAddress
==
'none'
or
self
.
UEIPAddress
==
'none'
:
if
RAN
.
eNBIPAddress
==
'none'
or
self
.
UEIPAddress
==
'none'
:
HTML
.
SetOsVersion
(
'Ubuntu 16.04.5 LTS'
,
0
)
HTML
.
OsVersion
[
0
]
=
'Ubuntu 16.04.5 LTS'
HTML
.
SetKernelVersion
(
'4.15.0-45-generic'
,
0
)
HTML
.
KernelVersion
[
0
]
=
'4.15.0-45-generic'
HTML
.
SetUhdVersion
(
'3.13.0.1-0'
,
0
)
HTML
.
UhdVersion
[
0
]
=
'3.13.0.1-0'
HTML
.
SetUsrpBoard
(
'B210'
,
0
)
HTML
.
UsrpBoard
[
0
]
=
'B210'
HTML
.
SetCpuNb
(
'4'
,
0
)
HTML
.
CpuNb
[
0
]
=
'4'
HTML
.
SetCpuModel
(
'Intel(R) Core(TM) i5-6200U'
,
0
)
HTML
.
CpuModel
[
0
]
=
'Intel(R) Core(TM) i5-6200U'
HTML
.
SetCpuMHz
(
'2399.996 MHz'
,
0
)
HTML
.
CpuMHz
[
0
]
=
'2399.996 MHz'
return
0
return
0
if
machine
==
'eNB'
:
if
machine
==
'eNB'
:
if
RAN
.
eNBIPAddress
!=
''
and
RAN
.
eNBUserName
!=
''
and
RAN
.
eNBPassword
!=
''
:
if
RAN
.
eNBIPAddress
!=
''
and
RAN
.
eNBUserName
!=
''
and
RAN
.
eNBPassword
!=
''
:
...
@@ -2995,7 +2995,7 @@ class OaiCiTest():
...
@@ -2995,7 +2995,7 @@ class OaiCiTest():
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
)
HTML
.
SetOsVersion
(
OsVersion
,
idx
)
HTML
.
OsVersion
[
idx
]
=
OsVersion
else
:
else
:
SSH
.
command
(
'hostnamectl'
,
'\$'
,
5
)
SSH
.
command
(
'hostnamectl'
,
'\$'
,
5
)
result
=
re
.
search
(
'Operating System: (?P<os_type>[a-zA-Z0-9\-\_\.\ ]+)'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'Operating System: (?P<os_type>[a-zA-Z0-9\-\_\.\ ]+)'
,
SSH
.
getBefore
())
...
@@ -3007,26 +3007,26 @@ class OaiCiTest():
...
@@ -3007,26 +3007,26 @@ class OaiCiTest():
if
result
is
not
None
:
if
result
is
not
None
:
OsVersion
=
OsVersion
.
replace
(
'7 '
,
result
.
group
(
'os_version'
))
OsVersion
=
OsVersion
.
replace
(
'7 '
,
result
.
group
(
'os_version'
))
logging
.
debug
(
'OS is: '
+
OsVersion
)
logging
.
debug
(
'OS is: '
+
OsVersion
)
HTML
.
SetOsVersion
(
OsVersion
,
idx
)
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
.
SetKernelVersion
(
KernelVersion
,
idx
)
HTML
.
KernelVersion
[
idx
]
=
KernelVersion
SSH
.
command
(
'dpkg --list | egrep --color=never libuhd003'
,
'\$'
,
5
)
SSH
.
command
(
'dpkg --list | egrep --color=never libuhd003'
,
'\$'
,
5
)
result
=
re
.
search
(
'libuhd003:amd64 *(?P<uhd_version>[0-9\.]+)'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'libuhd003: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
)
HTML
.
SetUhdVersion
(
UhdVersion
,
idx
)
HTML
.
UhdVersion
[
idx
]
=
UhdVersion
else
:
else
:
SSH
.
command
(
'uhd_config_info --version'
,
'\$'
,
5
)
SSH
.
command
(
'uhd_config_info --version'
,
'\$'
,
5
)
result
=
re
.
search
(
'UHD (?P<uhd_version>[a-zA-Z0-9\.\-]+)'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'UHD (?P<uhd_version>[a-zA-Z0-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
)
HTML
.
SetUhdVersion
(
UhdVersion
,
idx
)
HTML
.
UhdVersion
[
idx
]
=
UhdVersion
SSH
.
command
(
'echo '
+
Password
+
' | sudo -S uhd_find_devices'
,
'\$'
,
60
)
SSH
.
command
(
'echo '
+
Password
+
' | sudo -S uhd_find_devices'
,
'\$'
,
60
)
usrp_boards
=
re
.
findall
(
'product: ([0-9A-Za-z]+)
\\\\
r
\\\\
n'
,
SSH
.
getBefore
())
usrp_boards
=
re
.
findall
(
'product: ([0-9A-Za-z]+)
\\\\
r
\\\\
n'
,
SSH
.
getBefore
())
count
=
0
count
=
0
...
@@ -3038,19 +3038,19 @@ class OaiCiTest():
...
@@ -3038,19 +3038,19 @@ class OaiCiTest():
count
+=
1
count
+=
1
if
count
>
0
:
if
count
>
0
:
logging
.
debug
(
'USRP Board(s) : '
+
UsrpBoard
)
logging
.
debug
(
'USRP Board(s) : '
+
UsrpBoard
)
HTML
.
SetUsrpBoard
(
UsrpBoard
,
idx
)
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]+).*Model name: *(?P<model>[a-zA-Z0-9\-\_\.\ \(\)]+).*CPU MHz: *(?P<cpu_mhz>[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
.
SetCpuNb
(
CpuNb
,
idx
)
HTML
.
CpuNb
[
idx
]
=
CpuNb
CpuModel
=
result
.
group
(
'model'
)
CpuModel
=
result
.
group
(
'model'
)
logging
.
debug
(
'model: '
+
CpuModel
)
logging
.
debug
(
'model: '
+
CpuModel
)
HTML
.
SetCpuModel
(
CpuModel
,
idx
)
HTML
.
CpuModel
[
idx
]
=
CpuModel
CpuMHz
=
result
.
group
(
'cpu_mhz'
)
+
' MHz'
CpuMHz
=
result
.
group
(
'cpu_mhz'
)
+
' MHz'
logging
.
debug
(
'cpu_mhz: '
+
CpuMHz
)
logging
.
debug
(
'cpu_mhz: '
+
CpuMHz
)
HTML
.
SetCpuMHz
(
CpuMHz
,
idx
)
HTML
.
CpuMHz
[
idx
]
=
CpuMHz
SSH
.
close
()
SSH
.
close
()
#-----------------------------------------------------------
#-----------------------------------------------------------
...
@@ -3267,7 +3267,7 @@ EPC = epc.EPCManagement()
...
@@ -3267,7 +3267,7 @@ EPC = epc.EPCManagement()
RAN
=
ran
.
RANManagement
()
RAN
=
ran
.
RANManagement
()
HTML
=
html
.
HTMLManagement
()
HTML
=
html
.
HTMLManagement
()
EPC
.
SetHtmlObj
(
HTML
)
EPC
.
HtmlObj
=
HTML
RAN
.
HtmlObj
=
HTML
RAN
.
HtmlObj
=
HTML
RAN
.
EpcObj
=
EPC
RAN
.
EpcObj
=
EPC
...
@@ -3294,7 +3294,7 @@ while len(argvs) > 1:
...
@@ -3294,7 +3294,7 @@ while len(argvs) > 1:
matchReg
=
re
.
match
(
'^\-\-ranRepository=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-ranRepository=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
CiTestObj
.
ranRepository
=
matchReg
.
group
(
1
)
CiTestObj
.
ranRepository
=
matchReg
.
group
(
1
)
RAN
.
ranRepository
=
matchReg
.
group
(
1
)
RAN
.
ranRepository
=
matchReg
.
group
(
1
)
HTML
.
SetranRepository
(
matchReg
.
group
(
1
)
)
HTML
.
ranRepository
=
matchReg
.
group
(
1
)
ldpc
.
ranRepository
=
matchReg
.
group
(
1
)
ldpc
.
ranRepository
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNB_AllowMerge=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNB_AllowMerge=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
...
@@ -3306,7 +3306,7 @@ while len(argvs) > 1:
...
@@ -3306,7 +3306,7 @@ while len(argvs) > 1:
if
((
doMerge
==
'true'
)
or
(
doMerge
==
'True'
)):
if
((
doMerge
==
'true'
)
or
(
doMerge
==
'True'
)):
CiTestObj
.
ranAllowMerge
=
True
CiTestObj
.
ranAllowMerge
=
True
RAN
.
ranAllowMerge
=
True
RAN
.
ranAllowMerge
=
True
HTML
.
SetranAllowMerge
(
True
)
HTML
.
ranAllowMerge
=
True
elif
re
.
match
(
'^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNBBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-eNBBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
...
@@ -3314,7 +3314,7 @@ while len(argvs) > 1:
...
@@ -3314,7 +3314,7 @@ while len(argvs) > 1:
matchReg
=
re
.
match
(
'^\-\-ranBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-ranBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
CiTestObj
.
ranBranch
=
matchReg
.
group
(
1
)
CiTestObj
.
ranBranch
=
matchReg
.
group
(
1
)
RAN
.
ranBranch
=
matchReg
.
group
(
1
)
RAN
.
ranBranch
=
matchReg
.
group
(
1
)
HTML
.
SetranBranch
(
matchReg
.
group
(
1
)
)
HTML
.
ranBranch
=
matchReg
.
group
(
1
)
ldpc
.
ranBranch
=
matchReg
.
group
(
1
)
ldpc
.
ranBranch
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBCommitID=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBCommitID=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
...
@@ -3323,7 +3323,7 @@ while len(argvs) > 1:
...
@@ -3323,7 +3323,7 @@ while len(argvs) > 1:
matchReg
=
re
.
match
(
'^\-\-ranCommitID=(.*)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-ranCommitID=(.*)$'
,
myArgv
,
re
.
IGNORECASE
)
CiTestObj
.
ranCommitID
=
matchReg
.
group
(
1
)
CiTestObj
.
ranCommitID
=
matchReg
.
group
(
1
)
RAN
.
ranCommitID
=
matchReg
.
group
(
1
)
RAN
.
ranCommitID
=
matchReg
.
group
(
1
)
HTML
.
SetranCommitID
(
matchReg
.
group
(
1
)
)
HTML
.
ranCommitID
=
matchReg
.
group
(
1
)
ldpc
.
ranCommitID
=
matchReg
.
group
(
1
)
ldpc
.
ranCommitID
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBTargetBranch=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBTargetBranch=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
...
@@ -3332,7 +3332,7 @@ while len(argvs) > 1:
...
@@ -3332,7 +3332,7 @@ while len(argvs) > 1:
matchReg
=
re
.
match
(
'^\-\-ranTargetBranch=(.*)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-ranTargetBranch=(.*)$'
,
myArgv
,
re
.
IGNORECASE
)
CiTestObj
.
ranTargetBranch
=
matchReg
.
group
(
1
)
CiTestObj
.
ranTargetBranch
=
matchReg
.
group
(
1
)
RAN
.
ranTargetBranch
=
matchReg
.
group
(
1
)
RAN
.
ranTargetBranch
=
matchReg
.
group
(
1
)
HTML
.
SetranTargetBranch
(
matchReg
.
group
(
1
)
)
HTML
.
ranTargetBranch
=
matchReg
.
group
(
1
)
ldpc
.
ranTargetBranch
=
matchReg
.
group
(
1
)
ldpc
.
ranTargetBranch
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
...
@@ -3380,25 +3380,25 @@ while len(argvs) > 1:
...
@@ -3380,25 +3380,25 @@ while len(argvs) > 1:
RAN
.
eNB2SourceCodePath
=
matchReg
.
group
(
1
)
RAN
.
eNB2SourceCodePath
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-EPCIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-EPCIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-EPCIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-EPCIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
EPC
.
SetIPAddress
(
matchReg
.
group
(
1
)
)
EPC
.
IPAddress
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-EPCUserName=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-EPCUserName=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-EPCUserName=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-EPCUserName=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
EPC
.
SetUserName
(
matchReg
.
group
(
1
)
)
EPC
.
UserName
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-EPCPassword=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-EPCPassword=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-EPCPassword=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-EPCPassword=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
EPC
.
SetPassword
(
matchReg
.
group
(
1
)
)
EPC
.
Password
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-EPCSourceCodePath=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-EPCSourceCodePath=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-EPCSourceCodePath=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-EPCSourceCodePath=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
EPC
.
S
etSourceCodePath
(
matchReg
.
group
(
1
)
)
EPC
.
S
ourceCodePath
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-EPCType=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-EPCType=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-EPCType=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-EPCType=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
if
re
.
match
(
'OAI'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'ltebox'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'OAI-Rel14-CUPS'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'OAI-Rel14-Docker'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
):
if
re
.
match
(
'OAI'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'ltebox'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'OAI-Rel14-CUPS'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'OAI-Rel14-Docker'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
):
EPC
.
SetType
(
matchReg
.
group
(
1
)
)
EPC
.
Type
=
matchReg
.
group
(
1
)
else
:
else
:
sys
.
exit
(
'Invalid EPC Type: '
+
matchReg
.
group
(
1
)
+
' -- (should be OAI or ltebox or OAI-Rel14-CUPS or OAI-Rel14-Docker)'
)
sys
.
exit
(
'Invalid EPC Type: '
+
matchReg
.
group
(
1
)
+
' -- (should be OAI or ltebox or OAI-Rel14-CUPS or OAI-Rel14-Docker)'
)
elif
re
.
match
(
'^\-\-EPCContainerPrefix=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-EPCContainerPrefix=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-EPCContainerPrefix=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-EPCContainerPrefix=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
EPC
.
SetContainerPrefix
(
matchReg
.
group
(
1
)
)
EPC
.
ContainerPrefix
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-ADBIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-ADBIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-ADBIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-ADBIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
CiTestObj
.
ADBIPAddress
=
matchReg
.
group
(
1
)
CiTestObj
.
ADBIPAddress
=
matchReg
.
group
(
1
)
...
@@ -3420,8 +3420,8 @@ while len(argvs) > 1:
...
@@ -3420,8 +3420,8 @@ while len(argvs) > 1:
elif
re
.
match
(
'^\-\-XMLTestFile=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-XMLTestFile=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-XMLTestFile=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-XMLTestFile=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
CiTestObj
.
testXMLfiles
.
append
(
matchReg
.
group
(
1
))
CiTestObj
.
testXMLfiles
.
append
(
matchReg
.
group
(
1
))
HTML
.
SettestXMLfiles
(
matchReg
.
group
(
1
)
)
HTML
.
testXMLfiles
=
matchReg
.
group
(
1
)
HTML
.
SetnbTestXMLfiles
(
HTML
.
GetnbTestXMLfiles
()
+
1
)
HTML
.
nbTestXMLfiles
=
HTML
.
nbTestXMLfiles
+
1
elif
re
.
match
(
'^\-\-UEIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-UEIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-UEIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-UEIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
CiTestObj
.
UEIPAddress
=
matchReg
.
group
(
1
)
CiTestObj
.
UEIPAddress
=
matchReg
.
group
(
1
)
...
@@ -3464,17 +3464,17 @@ elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE):
...
@@ -3464,17 +3464,17 @@ elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE):
signal
.
signal
(
signal
.
SIGUSR1
,
receive_signal
)
signal
.
signal
(
signal
.
SIGUSR1
,
receive_signal
)
CiTestObj
.
TerminateOAIUE
()
CiTestObj
.
TerminateOAIUE
()
elif
re
.
match
(
'^TerminateHSS$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^TerminateHSS$'
,
mode
,
re
.
IGNORECASE
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetType
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
EPC
.
TerminateHSS
()
EPC
.
TerminateHSS
()
elif
re
.
match
(
'^TerminateMME$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^TerminateMME$'
,
mode
,
re
.
IGNORECASE
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetType
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
EPC
.
TerminateMME
()
EPC
.
TerminateMME
()
elif
re
.
match
(
'^TerminateSPGW$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^TerminateSPGW$'
,
mode
,
re
.
IGNORECASE
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetType
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
EPC
.
TerminateSPGW
()
EPC
.
TerminateSPGW
()
...
@@ -3489,27 +3489,27 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
...
@@ -3489,27 +3489,27 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
RAN
.
LogCollecteNB
()
RAN
.
LogCollecteNB
()
elif
re
.
match
(
'^LogCollectHSS$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^LogCollectHSS$'
,
mode
,
re
.
IGNORECASE
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetType
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
EPC
.
LogCollectHSS
()
EPC
.
LogCollectHSS
()
elif
re
.
match
(
'^LogCollectMME$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^LogCollectMME$'
,
mode
,
re
.
IGNORECASE
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetType
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
EPC
.
LogCollectMME
()
EPC
.
LogCollectMME
()
elif
re
.
match
(
'^LogCollectSPGW$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^LogCollectSPGW$'
,
mode
,
re
.
IGNORECASE
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetType
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
EPC
.
LogCollectSPGW
()
EPC
.
LogCollectSPGW
()
elif
re
.
match
(
'^LogCollectPing$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^LogCollectPing$'
,
mode
,
re
.
IGNORECASE
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
CiTestObj
.
LogCollectPing
()
CiTestObj
.
LogCollectPing
()
elif
re
.
match
(
'^LogCollectIperf$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^LogCollectIperf$'
,
mode
,
re
.
IGNORECASE
):
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
CiTestObj
.
LogCollectIperf
()
CiTestObj
.
LogCollectIperf
()
...
@@ -3533,21 +3533,21 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
...
@@ -3533,21 +3533,21 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
except
:
except
:
print
(
"Error while parsing file: "
+
xml_test_file
)
print
(
"Error while parsing file: "
+
xml_test_file
)
xmlRoot
=
xmlTree
.
getroot
()
xmlRoot
=
xmlTree
.
getroot
()
HTML
.
SethtmlTabRefs
(
xmlRoot
.
findtext
(
'htmlTabRef'
,
default
=
'test-tab-'
+
str
(
count
)))
HTML
.
htmlTabRefs
.
append
(
xmlRoot
.
findtext
(
'htmlTabRef'
,
default
=
'test-tab-'
+
str
(
count
)))
HTML
.
SethtmlTabNames
(
xmlRoot
.
findtext
(
'htmlTabName'
,
default
=
'test-tab-'
+
str
(
count
)))
HTML
.
htmlTabNames
.
append
(
xmlRoot
.
findtext
(
'htmlTabName'
,
default
=
'test-tab-'
+
str
(
count
)))
HTML
.
SethtmlTabIcons
(
xmlRoot
.
findtext
(
'htmlTabIcon'
,
default
=
'info-sign'
))
HTML
.
htmlTabIcons
.
append
(
xmlRoot
.
findtext
(
'htmlTabIcon'
,
default
=
'info-sign'
))
foundCount
+=
1
foundCount
+=
1
count
+=
1
count
+=
1
if
foundCount
!=
HTML
.
GetnbTestXMLfiles
()
:
if
foundCount
!=
HTML
.
nbTestXMLfiles
:
HTML
.
SetnbTestXMLfiles
(
foundCount
)
HTML
.
nbTestXMLfiles
=
foundCount
if
(
CiTestObj
.
ADBIPAddress
!=
'none'
):
if
(
CiTestObj
.
ADBIPAddress
!=
'none'
):
terminate_ue_flag
=
False
terminate_ue_flag
=
False
CiTestObj
.
GetAllUEDevices
(
terminate_ue_flag
)
CiTestObj
.
GetAllUEDevices
(
terminate_ue_flag
)
CiTestObj
.
GetAllCatMDevices
(
terminate_ue_flag
)
CiTestObj
.
GetAllCatMDevices
(
terminate_ue_flag
)
HTML
.
SethtmlUEConnected
(
len
(
CiTestObj
.
UEDevices
)
+
len
(
CiTestObj
.
CatMDevices
))
HTML
.
SethtmlUEConnected
(
len
(
CiTestObj
.
UEDevices
)
+
len
(
CiTestObj
.
CatMDevices
))
HTML
.
SethtmlNb_Smartphones
(
len
(
CiTestObj
.
UEDevices
)
)
HTML
.
htmlNb_Smartphones
=
len
(
CiTestObj
.
UEDevices
)
HTML
.
SethtmlNb_CATM_Modules
(
len
(
CiTestObj
.
CatMDevices
)
)
HTML
.
htmlNb_CATM_Modules
=
len
(
CiTestObj
.
CatMDevices
)
HTML
.
CreateHtmlHeader
(
CiTestObj
.
ADBIPAddress
)
HTML
.
CreateHtmlHeader
(
CiTestObj
.
ADBIPAddress
)
elif
re
.
match
(
'^FinalizeHtml$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^FinalizeHtml$'
,
mode
,
re
.
IGNORECASE
):
logging
.
debug
(
'
\u001B
[1m----------------------------------------
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m----------------------------------------
\u001B
[0m'
)
...
@@ -3561,17 +3561,17 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -3561,17 +3561,17 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
if
re
.
match
(
'^TesteNB$'
,
mode
,
re
.
IGNORECASE
):
if
re
.
match
(
'^TesteNB$'
,
mode
,
re
.
IGNORECASE
):
if
RAN
.
eNBIPAddress
==
''
or
RAN
.
ranRepository
==
''
or
RAN
.
ranBranch
==
''
or
RAN
.
eNBUserName
==
''
or
RAN
.
eNBPassword
==
''
or
RAN
.
eNBSourceCodePath
==
''
or
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
or
CiTestObj
.
ADBIPAddress
==
''
or
CiTestObj
.
ADBUserName
==
''
or
CiTestObj
.
ADBPassword
==
''
:
if
RAN
.
eNBIPAddress
==
''
or
RAN
.
ranRepository
==
''
or
RAN
.
ranBranch
==
''
or
RAN
.
eNBUserName
==
''
or
RAN
.
eNBPassword
==
''
or
RAN
.
eNBSourceCodePath
==
''
or
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
or
CiTestObj
.
ADBIPAddress
==
''
or
CiTestObj
.
ADBUserName
==
''
or
CiTestObj
.
ADBPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
if
EPC
.
GetIPAddress
()
==
''
or
EPC
.
GetUserName
()
==
''
or
EPC
.
GetPassword
()
==
''
or
EPC
.
GetSourceCodePath
()
==
''
or
EPC
.
GetType
()
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
or
EPC
.
Type
==
''
:
HELP
.
EPCSrvHelp
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
(),
EPC
.
GetSourceCodePath
(),
EPC
.
GetType
()
)
HELP
.
EPCSrvHelp
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
,
EPC
.
Type
)
if
RAN
.
ranRepository
==
''
:
if
RAN
.
ranRepository
==
''
:
HELP
.
GitSrvHelp
(
RAN
.
ranRepository
,
RAN
.
ranBranch
,
RAN
.
ranCommitID
,
RAN
.
ranAllowMerge
,
RAN
.
ranTargetBranch
)
HELP
.
GitSrvHelp
(
RAN
.
ranRepository
,
RAN
.
ranBranch
,
RAN
.
ranCommitID
,
RAN
.
ranAllowMerge
,
RAN
.
ranTargetBranch
)
if
RAN
.
eNBIPAddress
==
''
or
RAN
.
eNBUserName
==
''
or
RAN
.
eNBPassword
==
''
or
RAN
.
eNBSourceCodePath
==
''
:
if
RAN
.
eNBIPAddress
==
''
or
RAN
.
eNBUserName
==
''
or
RAN
.
eNBPassword
==
''
or
RAN
.
eNBSourceCodePath
==
''
:
HELP
.
eNBSrvHelp
(
RAN
.
eNBIPAddress
,
RAN
.
eNBUserName
,
RAN
.
eNBPassword
,
RAN
.
eNBSourceCodePath
)
HELP
.
eNBSrvHelp
(
RAN
.
eNBIPAddress
,
RAN
.
eNBUserName
,
RAN
.
eNBPassword
,
RAN
.
eNBSourceCodePath
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
if
(
EPC
.
GetIPAddress
()
!=
''
)
and
(
EPC
.
GetIPAddress
()
!=
'none'
):
if
(
EPC
.
IPAddress
!=
''
)
and
(
EPC
.
IPAddress
!=
'none'
):
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
,
cwd
+
"/tcp_iperf_stats.awk"
,
"/tmp"
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
cwd
+
"/tcp_iperf_stats.awk"
,
"/tmp"
)
SSH
.
copyout
(
EPC
.
GetIPAddress
(),
EPC
.
GetUserName
(),
EPC
.
GetPassword
()
,
cwd
+
"/active_net_interfaces.awk"
,
"/tmp"
)
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
cwd
+
"/active_net_interfaces.awk"
,
"/tmp"
)
else
:
else
:
if
CiTestObj
.
UEIPAddress
==
''
or
CiTestObj
.
ranRepository
==
''
or
CiTestObj
.
ranBranch
==
''
or
CiTestObj
.
UEUserName
==
''
or
CiTestObj
.
UEPassword
==
''
or
CiTestObj
.
UESourceCodePath
==
''
:
if
CiTestObj
.
UEIPAddress
==
''
or
CiTestObj
.
ranRepository
==
''
or
CiTestObj
.
ranBranch
==
''
or
CiTestObj
.
UEUserName
==
''
or
CiTestObj
.
UEPassword
==
''
or
CiTestObj
.
UESourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
...
@@ -3579,7 +3579,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -3579,7 +3579,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
#read test_case_list.xml file
#read test_case_list.xml file
# if no parameters for XML file, use default value
# if no parameters for XML file, use default value
if
(
HTML
.
GetnbTestXMLfiles
()
!=
1
):
if
(
HTML
.
nbTestXMLfiles
!=
1
):
xml_test_file
=
cwd
+
"/test_case_list.xml"
xml_test_file
=
cwd
+
"/test_case_list.xml"
else
:
else
:
xml_test_file
=
cwd
+
"/"
+
CiTestObj
.
testXMLfiles
[
0
]
xml_test_file
=
cwd
+
"/"
+
CiTestObj
.
testXMLfiles
[
0
]
...
@@ -3589,9 +3589,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -3589,9 +3589,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
exclusion_tests
=
xmlRoot
.
findtext
(
'TestCaseExclusionList'
,
default
=
''
)
exclusion_tests
=
xmlRoot
.
findtext
(
'TestCaseExclusionList'
,
default
=
''
)
requested_tests
=
xmlRoot
.
findtext
(
'TestCaseRequestedList'
,
default
=
''
)
requested_tests
=
xmlRoot
.
findtext
(
'TestCaseRequestedList'
,
default
=
''
)
if
(
HTML
.
GetnbTestXMLfiles
()
==
1
):
if
(
HTML
.
nbTestXMLfiles
==
1
):
HTML
.
SethtmlTabRefs
(
xmlRoot
.
findtext
(
'htmlTabRef'
,
default
=
'test-tab-0'
))
HTML
.
htmlTabRefs
.
append
(
xmlRoot
.
findtext
(
'htmlTabRef'
,
default
=
'test-tab-0'
))
HTML
.
SethtmlTabNames
(
xmlRoot
.
findtext
(
'htmlTabName'
,
default
=
'Test-0'
))
HTML
.
htmlTabNames
.
append
(
xmlRoot
.
findtext
(
'htmlTabName'
,
default
=
'Test-0'
))
repeatCount
=
xmlRoot
.
findtext
(
'repeatCount'
,
default
=
'1'
)
repeatCount
=
xmlRoot
.
findtext
(
'repeatCount'
,
default
=
'1'
)
CiTestObj
.
repeatCounts
.
append
(
int
(
repeatCount
))
CiTestObj
.
repeatCounts
.
append
(
int
(
repeatCount
))
all_tests
=
xmlRoot
.
findall
(
'testCase'
)
all_tests
=
xmlRoot
.
findall
(
'testCase'
)
...
@@ -3619,7 +3619,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -3619,7 +3619,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
else
:
else
:
logging
.
debug
(
'ERROR: requested test is invalidly formatted: '
+
test
)
logging
.
debug
(
'ERROR: requested test is invalidly formatted: '
+
test
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
(
EPC
.
GetIPAddress
()
!=
''
)
and
(
EPC
.
GetIPAddress
()
!=
'none'
):
if
(
EPC
.
IPAddress
!=
''
)
and
(
EPC
.
IPAddress
!=
'none'
):
CiTestObj
.
CheckFlexranCtrlInstallation
()
CiTestObj
.
CheckFlexranCtrlInstallation
()
EPC
.
SetMmeIPAddress
()
EPC
.
SetMmeIPAddress
()
...
@@ -3645,7 +3645,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -3645,7 +3645,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CiTestObj
.
FailReportCnt
=
0
CiTestObj
.
FailReportCnt
=
0
RAN
.
prematureExit
=
True
RAN
.
prematureExit
=
True
HTML
.
SetstartTime
(
int
(
round
(
time
.
time
()
*
1000
)
))
HTML
.
startTime
=
int
(
round
(
time
.
time
()
*
1000
))
while
CiTestObj
.
FailReportCnt
<
CiTestObj
.
repeatCounts
[
0
]
and
RAN
.
prematureExit
:
while
CiTestObj
.
FailReportCnt
<
CiTestObj
.
repeatCounts
[
0
]
and
RAN
.
prematureExit
:
RAN
.
prematureExit
=
False
RAN
.
prematureExit
=
False
# At every iteratin of the retry loop, a separator will be added
# At every iteratin of the retry loop, a separator will be added
...
@@ -3661,10 +3661,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -3661,10 +3661,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
if
test_case_id
!=
id
:
if
test_case_id
!=
id
:
continue
continue
CiTestObj
.
testCase_id
=
id
CiTestObj
.
testCase_id
=
id
HTML
.
SettestCase_id
(
CiTestObj
.
testCase_id
)
HTML
.
testCase_id
=
CiTestObj
.
testCase_id
EPC
.
SetTestCase_id
(
CiTestObj
.
testCase_id
)
EPC
.
testCase_id
=
CiTestObj
.
testCase_id
CiTestObj
.
desc
=
test
.
findtext
(
'desc'
)
CiTestObj
.
desc
=
test
.
findtext
(
'desc'
)
HTML
.
Setdesc
(
CiTestObj
.
desc
)
HTML
.
desc
=
CiTestObj
.
desc
action
=
test
.
findtext
(
'class'
)
action
=
test
.
findtext
(
'class'
)
if
(
CheckClassValidity
(
action
,
id
)
==
False
):
if
(
CheckClassValidity
(
action
,
id
)
==
False
):
continue
continue
...
...
ci-scripts/ran.py
View file @
dc9211ae
...
@@ -92,143 +92,143 @@ class RANManagement():
...
@@ -92,143 +92,143 @@ class RANManagement():
self
.
epcObj
=
None
self
.
epcObj
=
None
"""
#-----------------------------------------------------------
#-----------------------------------------------------------
# Setters and Getters on Public members
# Setters and Getters on Public members
#-----------------------------------------------------------
#-----------------------------------------------------------
def SetHtmlObj(self, obj):
# def SetHtmlObj(self, obj):
self.htmlObj = obj
# self.htmlObj = obj
def SetEpcObj(self, obj):
# def SetEpcObj(self, obj):
self.epcObj = obj
# self.epcObj = obj
#
def SetflexranCtrlInstalled(self,fxrctin):
# def SetflexranCtrlInstalled(self,fxrctin):
self.flexranCtrlInstalled = fxrctin
# self.flexranCtrlInstalled = fxrctin
def GetflexranCtrlInstalled(self):
# def GetflexranCtrlInstalled(self):
return self.flexranCtrlInstalled
# return self.flexranCtrlInstalled
def SetflexranCtrlStarted(self,fxrctst):
# def SetflexranCtrlStarted(self,fxrctst):
self.flexranCtrlStarted = fxrctst
# self.flexranCtrlStarted = fxrctst
def GetflexranCtrlStarted(self):
# def GetflexranCtrlStarted(self):
return self.flexranCtrlStarted
# return self.flexranCtrlStarted
def SetpStatus(self, pSt):
# def SetpStatus(self, pSt):
self.pStatus = pSt
# self.pStatus = pSt
def SetranRepository(self, repository):
# def SetranRepository(self, repository):
self.ranRepository = repository
# self.ranRepository = repository
def GetranRepository(self):
# def GetranRepository(self):
return self.ranRepository
# return self.ranRepository
def SetranBranch(self, branch):
# def SetranBranch(self, branch):
self.ranBranch = branch
# self.ranBranch = branch
def GetranBranch(self):
# def GetranBranch(self):
return self.ranBranch
# return self.ranBranch
def SetranCommitID(self, commitid):
# def SetranCommitID(self, commitid):
self.ranCommitID = commitid
# self.ranCommitID = commitid
def GetranCommitID(self):
# def GetranCommitID(self):
return self.ranCommitID
# return self.ranCommitID
def SeteNB_serverId(self, enbsrvid):
# def SeteNB_serverId(self, enbsrvid):
self.eNB_serverId = enbsrvid
# self.eNB_serverId = enbsrvid
def GeteNB_serverId(self):
# def GeteNB_serverId(self):
return self.eNB_serverId
# return self.eNB_serverId
def SeteNBIPAddress(self, enbip):
# def SeteNBIPAddress(self, enbip):
self.eNBIPAddress = enbip
# self.eNBIPAddress = enbip
def GeteNBIPAddress(self):
# def GeteNBIPAddress(self):
return self.eNBIPAddress
# return self.eNBIPAddress
def SeteNBUserName(self, enbusr):
# def SeteNBUserName(self, enbusr):
self.eNBUserName = enbusr
# self.eNBUserName = enbusr
def GeteNBUserName(self):
# def GeteNBUserName(self):
return self.eNBUserName
# return self.eNBUserName
def SeteNBPassword(self, enbpw):
# def SeteNBPassword(self, enbpw):
self.eNBPassword = enbpw
# self.eNBPassword = enbpw
def GeteNBPassword(self):
# def GeteNBPassword(self):
return self.eNBPassword
# return self.eNBPassword
def SeteNBSourceCodePath(self, enbcodepath):
# def SeteNBSourceCodePath(self, enbcodepath):
self.eNBSourceCodePath = enbcodepath
# self.eNBSourceCodePath = enbcodepath
def GeteNBSourceCodePath(self):
# def GeteNBSourceCodePath(self):
return self.eNBSourceCodePath
# return self.eNBSourceCodePath
def SetranAllowMerge(self, merge):
# def SetranAllowMerge(self, merge):
self.ranAllowMerge = merge
# self.ranAllowMerge = merge
def GetranAllowMerge(self):
# def GetranAllowMerge(self):
return self.ranAllowMerge
# return self.ranAllowMerge
def SetranTargetBranch(self, tbranch):
# def SetranTargetBranch(self, tbranch):
self.ranTargetBranch = tbranch
# self.ranTargetBranch = tbranch
def GetranTargetBranch(self):
# def GetranTargetBranch(self):
return self.ranTargetBranch
# return self.ranTargetBranch
def SetBuild_eNB_args(self, enbbuildarg):
# def SetBuild_eNB_args(self, enbbuildarg):
self.Build_eNB_args = enbbuildarg
# self.Build_eNB_args = enbbuildarg
def GetBuild_eNB_args(self):
# def GetBuild_eNB_args(self):
return self.Build_eNB_args
# return self.Build_eNB_args
def SetInitialize_eNB_args(self, initenbarg):
# def SetInitialize_eNB_args(self, initenbarg):
self.Initialize_eNB_args = initenbarg
# self.Initialize_eNB_args = initenbarg
def GetInitialize_eNB_args(self):
# def GetInitialize_eNB_args(self):
return self.Initialize_eNB_args
# return self.Initialize_eNB_args
def SetbackgroundBuild(self, bkbuild):
# def SetbackgroundBuild(self, bkbuild):
self.backgroundBuild = bkbuild
# self.backgroundBuild = bkbuild
def GetbackgroundBuild(self):
# def GetbackgroundBuild(self):
return self.backgroundBuild
# return self.backgroundBuild
def SetbackgroundBuildTestId(self, bkbuildid):
# def SetbackgroundBuildTestId(self, bkbuildid):
self.backgroundBuildTestId = bkbuildid
# self.backgroundBuildTestId = bkbuildid
def GetbackgroundBuildTestId(self):
# def GetbackgroundBuildTestId(self):
return self.backgroundBuildTestId
# return self.backgroundBuildTestId
def SetBuild_eNB_forced_workspace_cleanup(self, fcdwspclean):
# def SetBuild_eNB_forced_workspace_cleanup(self, fcdwspclean):
self.Build_eNB_forced_workspace_cleanup = fcdwspclean
# self.Build_eNB_forced_workspace_cleanup = fcdwspclean
def GetBuild_eNB_forced_workspace_cleanup(self):
# def GetBuild_eNB_forced_workspace_cleanup(self):
return self.Build_eNB_forced_workspace_cleanup
# return self.Build_eNB_forced_workspace_cleanup
def Setair_interface(self, airif):
# def Setair_interface(self, airif):
self.air_interface = airif
# self.air_interface = airif
def Getair_interface(self):
# def Getair_interface(self):
return self.air_interface
# return self.air_interface
def SeteNB_instance(self, enbinst):
# def SeteNB_instance(self, enbinst):
self.eNB_instance = enbinst
# self.eNB_instance = enbinst
def GeteNB_instance(self):
# def GeteNB_instance(self):
return self.eNB_instance
# return self.eNB_instance
#
def SeteNBLogFile(self, enblog, idx):
# def SeteNBLogFile(self, enblog, idx):
self.eNBLogFiles[idx] = enblog
# self.eNBLogFiles[idx] = enblog
def GeteNBLogFile(self, idx):
# def GeteNBLogFile(self, idx):
return self.eNBLogFiles[idx]
# return self.eNBLogFiles[idx]
#
def GeteNBmbmsEnable(self, idx):
# def GeteNBmbmsEnable(self, idx):
return self.eNBmbmsEnables[idx]
# return self.eNBmbmsEnables[idx]
#
def SeteNB1IPAddress(self,enb1ip):
# def SeteNB1IPAddress(self,enb1ip):
self.eNB1IPAddress = enb1ip
# self.eNB1IPAddress = enb1ip
def GeteNB1IPAddress(self):
# def GeteNB1IPAddress(self):
return self.eNB1IPAddress
# return self.eNB1IPAddress
def SeteNB1UserName(self, enb1usr):
# def SeteNB1UserName(self, enb1usr):
self.eNB1UserName = enb1usr
# self.eNB1UserName = enb1usr
def GeteNB1UserName(self):
# def GeteNB1UserName(self):
return self.eNB1UserName
# return self.eNB1UserName
def SeteNB1Password(self, enb1pw):
# def SeteNB1Password(self, enb1pw):
self.eNB1Password = enb1pw
# self.eNB1Password = enb1pw
def GeteNB1Password(self):
# def GeteNB1Password(self):
return self.eNB1Password
# return self.eNB1Password
def SeteNB1SourceCodePath(self, enb1codepath):
# def SeteNB1SourceCodePath(self, enb1codepath):
self.eNB1SourceCodePath = enb1codepath
# self.eNB1SourceCodePath = enb1codepath
def GeteNB1SourceCodePath(self):
# def GeteNB1SourceCodePath(self):
return self.eNB1SourceCodePath
# return self.eNB1SourceCodePath
#
def SeteNB2IPAddress(self, enb2ip):
# def SeteNB2IPAddress(self, enb2ip):
self.eNB2IPAddress = enb2ip
# self.eNB2IPAddress = enb2ip
def GeteNB2IPAddress(self):
# def GeteNB2IPAddress(self):
return self.eNB2IPAddress
# return self.eNB2IPAddress
def SeteNB2UserName(self, enb2usr):
# def SeteNB2UserName(self, enb2usr):
self.eNB2UserName = enb2usr
# self.eNB2UserName = enb2usr
def GeteNB2UserName(self):
# def GeteNB2UserName(self):
return self.eNB2UserName
# return self.eNB2UserName
def SeteNB2Password(self, enb2pw):
# def SeteNB2Password(self, enb2pw):
self.eNB2Password = enb2pw
# self.eNB2Password = enb2pw
def GeteNB2Password(self):
# def GeteNB2Password(self):
return self.eNB2Password
# return self.eNB2Password
def SeteNB2SourceCodePath(self, enb2codepath):
# def SeteNB2SourceCodePath(self, enb2codepath):
self.eNB2SourceCodePath = enb2codepath
# self.eNB2SourceCodePath = enb2codepath
def GeteNB2SourceCodePath(self):
# def GeteNB2SourceCodePath(self):
return self.eNB2SourceCodePath
# return self.eNB2SourceCodePath
#
# def SetprematureExit(self, premex):
# self.prematureExit = premex
# def GetprematureExit(self):
# return self.prematureExit
def SetprematureExit(self, premex):
self.prematureExit = premex
def GetprematureExit(self):
return self.prematureExit
"""
#-----------------------------------------------------------
#-----------------------------------------------------------
# RAN management functions
# RAN management functions
...
...
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