Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
39a5ddf5
Commit
39a5ddf5
authored
Apr 21, 2020
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: cleanup
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
9758abf9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
65 deletions
+24
-65
ci-scripts/constants.py
ci-scripts/constants.py
+1
-1
ci-scripts/epc.py
ci-scripts/epc.py
+2
-5
ci-scripts/helpreadme.py
ci-scripts/helpreadme.py
+1
-1
ci-scripts/html.py
ci-scripts/html.py
+15
-35
ci-scripts/main.py
ci-scripts/main.py
+1
-6
ci-scripts/ran.py
ci-scripts/ran.py
+2
-14
ci-scripts/sshconnection.py
ci-scripts/sshconnection.py
+2
-3
No files found.
ci-scripts/constants.py
View file @
39a5ddf5
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
...
...
ci-scripts/epc.py
View file @
39a5ddf5
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
...
...
@@ -27,7 +28,6 @@
# pexpect
#---------------------------------------------------------------------
#-----------------------------------------------------------
# Import
#-----------------------------------------------------------
...
...
@@ -124,7 +124,7 @@ class EPCManagement():
mySSH
.
command
(
'if [ -d '
+
self
.
SourceCodePath
+
'/scripts ]; then echo '
+
self
.
Password
+
' | sudo -S rm -Rf '
+
self
.
SourceCodePath
+
'/scripts ; fi'
,
'\$'
,
5
)
mySSH
.
command
(
'mkdir -p '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'cd /opt/hss_sim0609'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S rm -f hss.log
daemon.log
'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S rm -f hss.log'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S echo "Starting sudo session" && sudo su -c "screen -dm -S simulated_hss ./starthss"'
,
'\$'
,
5
)
else
:
logging
.
error
(
'This option should not occur!'
)
...
...
@@ -198,7 +198,6 @@ class EPCManagement():
if
self
.
htmlObj
is
not
None
:
self
.
htmlObj
.
CreateHtmlTestRow
(
self
.
Type
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
CheckHSSProcess
(
self
,
status_queue
):
try
:
mySSH
=
SSH
.
SSHConnection
()
...
...
@@ -267,7 +266,6 @@ class EPCManagement():
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
TerminateHSS
(
self
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
...
...
@@ -349,7 +347,6 @@ class EPCManagement():
if
self
.
htmlObj
is
not
None
:
self
.
htmlObj
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
LogCollectHSS
(
self
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
...
...
ci-scripts/helpreadme.py
View file @
39a5ddf5
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
...
...
@@ -27,7 +28,6 @@
# pexpect
#---------------------------------------------------------------------
#-----------------------------------------------------------
# Functions Declaration
#-----------------------------------------------------------
...
...
ci-scripts/html.py
View file @
39a5ddf5
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
...
...
@@ -27,7 +28,6 @@
# pexpect
#---------------------------------------------------------------------
#-----------------------------------------------------------
# Import
#-----------------------------------------------------------
...
...
@@ -39,6 +39,8 @@ import time
import
subprocess
from
multiprocessing
import
Process
,
Lock
,
SimpleQueue
import
constants
as
CONST
#-----------------------------------------------------------
# Class Declaration
#-----------------------------------------------------------
...
...
@@ -87,11 +89,6 @@ class HTMLManagement():
def
SetHmleNBFailureMsg
(
self
,
msg
):
self
.
htmleNBFailureMsg
=
msg
def
SetreseNB
(
self
,
rsenb
):
self
.
reseNB
=
rsenb
def
SetresUE
(
self
,
rsue
):
self
.
resUE
=
rsue
def
Setdesc
(
self
,
dsc
):
self
.
desc
=
dsc
...
...
@@ -105,35 +102,19 @@ class HTMLManagement():
def
SetranRepository
(
self
,
repository
):
self
.
ranRepository
=
repository
def
GetranRepository
(
self
):
return
self
.
ranRepository
def
SetranAllowMerge
(
self
,
merge
):
self
.
ranAllowMerge
=
merge
def
GetranAllowMerge
(
self
):
return
self
.
ranAllowMerge
def
SetranBranch
(
self
,
branch
):
self
.
ranBranch
=
branch
def
GetranBranch
(
self
):
return
self
.
ranBranch
def
SetranCommitID
(
self
,
commitid
):
self
.
ranCommitID
=
commitid
def
GetranCommitID
(
self
):
return
self
.
ranCommitID
def
SetranTargetBranch
(
self
,
tbranch
):
self
.
ranTargetBranch
=
tbranch
def
GetranTargetBranch
(
self
):
return
self
.
ranTargetBranch
def
SethtmlUEConnected
(
self
,
nbUEs
):
self
.
htmlUEConnected
=
nbUEs
def
SethtmlNb_Smartphones
(
self
,
nbUEs
):
self
.
htmlNb_Smartphones
=
nbUEs
def
SethtmlNb_CATM_Modules
(
self
,
nbUEs
):
self
.
htmlNb_CATM_Modules
=
nbUEs
...
...
@@ -400,29 +381,29 @@ class HTMLManagement():
elif
(
str
(
status
)
==
'KO'
):
if
(
processesStatus
==
0
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >'
+
str
(
status
)
+
'</td>
\n
'
)
elif
(
processesStatus
==
ENB_PROCESS_FAILED
):
elif
(
processesStatus
==
CONST
.
ENB_PROCESS_FAILED
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - eNB process not found</td>
\n
'
)
elif
(
processesStatus
==
OAI_UE_PROCESS_FAILED
):
elif
(
processesStatus
==
CONST
.
OAI_UE_PROCESS_FAILED
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - OAI UE process not found</td>
\n
'
)
elif
(
processesStatus
==
ENB_PROCESS_SEG_FAULT
)
or
(
processesStatus
==
OAI_UE_PROCESS_SEG_FAULT
):
elif
(
processesStatus
==
CONST
.
ENB_PROCESS_SEG_FAULT
)
or
(
processesStatus
==
CONST
.
OAI_UE_PROCESS_SEG_FAULT
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - '
+
machine
+
' process ended in Segmentation Fault</td>
\n
'
)
elif
(
processesStatus
==
ENB_PROCESS_ASSERTION
)
or
(
processesStatus
==
OAI_UE_PROCESS_ASSERTION
):
elif
(
processesStatus
==
CONST
.
ENB_PROCESS_ASSERTION
)
or
(
processesStatus
==
CONST
.
OAI_UE_PROCESS_ASSERTION
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - '
+
machine
+
' process ended in Assertion</td>
\n
'
)
elif
(
processesStatus
==
ENB_PROCESS_REALTIME_ISSUE
):
elif
(
processesStatus
==
CONST
.
ENB_PROCESS_REALTIME_ISSUE
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - '
+
machine
+
' process faced Real Time issue(s)</td>
\n
'
)
elif
(
processesStatus
==
ENB_PROCESS_NOLOGFILE_TO_ANALYZE
)
or
(
processesStatus
==
OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE
):
elif
(
processesStatus
==
CONST
.
ENB_PROCESS_NOLOGFILE_TO_ANALYZE
)
or
(
processesStatus
==
CONST
.
OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE
):
self
.
htmlFile
.
write
(
' <td bgcolor = "orange" >OK?</td>
\n
'
)
elif
(
processesStatus
==
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
):
elif
(
processesStatus
==
CONST
.
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - '
+
machine
+
' Slave RRU could not synch</td>
\n
'
)
elif
(
processesStatus
==
OAI_UE_PROCESS_COULD_NOT_SYNC
):
elif
(
processesStatus
==
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - UE could not sync</td>
\n
'
)
elif
(
processesStatus
==
HSS_PROCESS_FAILED
):
elif
(
processesStatus
==
CONST
.
HSS_PROCESS_FAILED
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - HSS process not found</td>
\n
'
)
elif
(
processesStatus
==
MME_PROCESS_FAILED
):
elif
(
processesStatus
==
CONST
.
MME_PROCESS_FAILED
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - MME process not found</td>
\n
'
)
elif
(
processesStatus
==
SPGW_PROCESS_FAILED
):
elif
(
processesStatus
==
CONST
.
SPGW_PROCESS_FAILED
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - SPGW process not found</td>
\n
'
)
elif
(
processesStatus
==
UE_IP_ADDRESS_ISSUE
):
elif
(
processesStatus
==
CONST
.
UE_IP_ADDRESS_ISSUE
):
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >KO - Could not retrieve UE IP address</td>
\n
'
)
else
:
self
.
htmlFile
.
write
(
' <td bgcolor = "lightcoral" >'
+
str
(
status
)
+
'</td>
\n
'
)
...
...
@@ -491,4 +472,3 @@ class HTMLManagement():
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
close
()
ci-scripts/main.py
View file @
39a5ddf5
...
...
@@ -104,8 +104,6 @@ class OaiCiTest():
self
.
Initialize_OAI_UE_args
=
''
self
.
clean_repository
=
True
self
.
expectedNbOfConnectedUEs
=
0
self
.
startTime
=
0
def
BuildOAIUE
(
self
):
if
self
.
UEIPAddress
==
''
or
RAN
.
GetranRepository
()
==
''
or
RAN
.
GetranBranch
()
==
''
or
self
.
UEUserName
==
''
or
self
.
UEPassword
==
''
or
self
.
UESourceCodePath
==
''
:
...
...
@@ -1901,7 +1899,6 @@ class OaiCiTest():
def
Iperf_common
(
self
,
lock
,
UE_IPAddress
,
device_id
,
idx
,
ue_num
,
statusQueue
):
try
:
logging
.
debug
(
'entring Iperf_common'
)
# Single-UE profile -- iperf only on one UE
if
self
.
iperf_profile
==
'single-ue'
and
idx
!=
0
:
return
...
...
@@ -2239,7 +2236,6 @@ class OaiCiTest():
ue_num
=
len
(
self
.
UEIPAddresses
)
lock
=
Lock
()
status_queue
=
SimpleQueue
()
logging
.
debug
(
'ue_num = '
+
str
(
ue_num
))
for
UE_IPAddress
in
self
.
UEIPAddresses
:
device_id
=
self
.
UEDevices
[
i
]
p
=
Process
(
target
=
self
.
Iperf_common
,
args
=
(
lock
,
UE_IPAddress
,
device_id
,
i
,
ue_num
,
status_queue
,))
...
...
@@ -3559,8 +3555,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CiTestObj
.
FailReportCnt
=
0
RAN
.
SetprematureExit
(
True
)
CiTestObj
.
startTime
=
int
(
round
(
time
.
time
()
*
1000
))
HTML
.
SetstartTime
(
CiTestObj
.
startTime
)
HTML
.
SetstartTime
(
int
(
round
(
time
.
time
()
*
1000
))
while
CiTestObj
.
FailReportCnt
<
CiTestObj
.
repeatCounts
[
0
]
and
RAN
.
GetprematureExit
():
RAN
.
SetprematureExit
(
False
)
# At every iteratin of the retry loop, a separator will be added
...
...
ci-scripts/ran.py
View file @
39a5ddf5
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
...
...
@@ -28,7 +28,6 @@
# pexpect
#---------------------------------------------------------------------
#-----------------------------------------------------------
# Import
#-----------------------------------------------------------
...
...
@@ -233,8 +232,6 @@ class RANManagement():
# RAN management functions
#-----------------------------------------------------------
def
BuildeNB
(
self
):
if
self
.
ranRepository
==
''
or
self
.
ranBranch
==
''
or
self
.
ranCommitID
==
''
:
GenericHelp
(
Version
)
...
...
@@ -347,8 +344,6 @@ class RANManagement():
mySSH
.
close
()
self
.
checkBuildeNB
(
lIpAddr
,
lUserName
,
lPassWord
,
lSourcePath
,
self
.
testCase_id
)
def
WaitBuildeNBisFinished
(
self
):
if
self
.
eNB_serverId
==
'0'
:
lIpAddr
=
self
.
eNBIPAddress
...
...
@@ -444,7 +439,6 @@ class RANManagement():
self
.
htmlObj
.
CreateHtmlTabFooter
(
False
)
sys
.
exit
(
1
)
def
InitializeeNB
(
self
):
if
self
.
eNB_serverId
==
'0'
:
lIpAddr
=
self
.
eNBIPAddress
...
...
@@ -638,8 +632,6 @@ class RANManagement():
self
.
htmlObj
.
CreateHtmlTestRow
(
'-O '
+
config_file
+
extra_options
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
logging
.
debug
(
'
\u001B
[1m Initialize eNB Completed
\u001B
[0m'
)
def
CheckeNBProcess
(
self
,
status_queue
):
try
:
# At least the instance 0 SHALL be on!
...
...
@@ -672,8 +664,6 @@ class RANManagement():
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
TerminateeNB
(
self
):
if
self
.
eNB_serverId
==
'0'
:
lIpAddr
=
self
.
eNBIPAddress
...
...
@@ -780,7 +770,6 @@ class RANManagement():
self
.
eNBmbmsEnables
[
int
(
self
.
eNB_instance
)]
=
False
self
.
eNBstatuses
[
int
(
self
.
eNB_instance
)]
=
-
1
def
LogCollecteNB
(
self
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
eNBIPAddress
,
self
.
eNBUserName
,
self
.
eNBPassword
)
...
...
@@ -791,7 +780,6 @@ class RANManagement():
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt'
,
'\$'
,
5
)
mySSH
.
close
()
def
AnalyzeLogFile_eNB
(
self
,
eNBlogFile
):
if
(
not
os
.
path
.
isfile
(
'./'
+
eNBlogFile
)):
return
-
1
...
...
@@ -1043,7 +1031,7 @@ class RANManagement():
if
foundRealTimeIssue
:
logging
.
debug
(
'
\u001B
[1;37;41m '
+
nodeB_prefix
+
'NB faced real time issues!
\u001B
[0m'
)
htmleNBFailureMsg
+=
nodeB_prefix
+
'NB faced real time issues!
\n
'
#return ENB_PROCESS_REALTIME_ISSUE
#return
CONST.
ENB_PROCESS_REALTIME_ISSUE
if
rlcDiscardBuffer
>
0
:
rlcMsg
=
nodeB_prefix
+
'NB RLC discarded '
+
str
(
rlcDiscardBuffer
)
+
' buffer(s)'
logging
.
debug
(
'
\u001B
[1;37;41m '
+
rlcMsg
+
'
\u001B
[0m'
)
...
...
ci-scripts/sshconnection.py
View file @
39a5ddf5
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
...
...
@@ -28,7 +28,6 @@
# pexpect
#---------------------------------------------------------------------
#-----------------------------------------------------------
# Import
#-----------------------------------------------------------
...
...
@@ -36,6 +35,7 @@ import pexpect # pexpect
import
logging
import
time
# sleep
import
re
#-----------------------------------------------------------
# Class Declaration
#-----------------------------------------------------------
...
...
@@ -89,7 +89,6 @@ class SSHConnection():
else
:
sys
.
exit
(
'SSH Connection Failed'
)
def
command
(
self
,
commandline
,
expectedline
,
timeout
):
logging
.
debug
(
commandline
)
self
.
ssh
.
timeout
=
timeout
...
...
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