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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
86225c3b
Commit
86225c3b
authored
Jun 21, 2021
by
Remi Hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement optional Qlog trace
parent
0d3b4246
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
34 deletions
+52
-34
ci-scripts/Jenkinsfile-trig-nsa
ci-scripts/Jenkinsfile-trig-nsa
+17
-8
ci-scripts/cls_module_ue.py
ci-scripts/cls_module_ue.py
+26
-22
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+5
-2
ci-scripts/main.py
ci-scripts/main.py
+3
-2
ci-scripts/xml_files/fr1_nsa_quectel.xml
ci-scripts/xml_files/fr1_nsa_quectel.xml
+1
-0
No files found.
ci-scripts/Jenkinsfile-trig-nsa
View file @
86225c3b
...
...
@@ -55,14 +55,23 @@ pipeline {
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
TARGET_BRANCH
)),
booleanParam
(
name:
'eNB_AllowMergeRequestProcess'
,
value:
Boolean
.
valueOf
(
ALLOW_MERGE
))
]
//calling Benetel sub job
//build job: "RAN-CI-BENETEL", wait : false, propagate : false, parameters: [
// string(name: 'eNB_MR', value: String.valueOf(MR)),
// string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
// string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
// string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
// booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
//]
//calling NSA long sub job
build
job:
"RAN-NSA-Mini-Module-Long"
,
wait
:
false
,
propagate
:
false
,
parameters:
[
string
(
name:
'eNB_MR'
,
value:
String
.
valueOf
(
MR
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
SRC_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
COMMIT_ID
)),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
TARGET_BRANCH
)),
booleanParam
(
name:
'eNB_AllowMergeRequestProcess'
,
value:
Boolean
.
valueOf
(
ALLOW_MERGE
))
]
//calling NSA attach/detach job
build
job:
"RAN-NSA-Mini-Module-Attach-Detach"
,
wait
:
false
,
propagate
:
false
,
parameters:
[
string
(
name:
'eNB_MR'
,
value:
String
.
valueOf
(
MR
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
SRC_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
COMMIT_ID
)),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
TARGET_BRANCH
)),
booleanParam
(
name:
'eNB_AllowMergeRequestProcess'
,
value:
Boolean
.
valueOf
(
ALLOW_MERGE
))
]
}
}
}
...
...
ci-scripts/cls_module_ue.py
View file @
86225c3b
...
...
@@ -50,7 +50,8 @@ class Module_UE:
setattr
(
self
,
k
,
v
)
self
.
UEIPAddress
=
""
#dictionary linking command names and related module scripts
self
.
cmd_dict
=
{
"wup"
:
self
.
WakeupScript
,
"detach"
:
self
.
DetachScript
}
#dictionary of function scripts
self
.
cmd_dict
=
{
"wup"
:
self
.
WakeupScript
,
"detach"
:
self
.
DetachScript
}
#dictionary of function scripts
self
.
ue_trace
=
''
...
...
@@ -130,13 +131,14 @@ class Module_UE:
return
-
1
def
EnableTrace
(
self
):
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
#delete old artifacts
mySSH
.
command
(
'echo '
+
self
.
HostPassword
+
' | sudo -S rm -rf ci_qlog'
,
'\$'
,
5
)
#start Trace, artifact is created in home dir
mySSH
.
command
(
'echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &'
,
'\$'
,
5
)
mySSH
.
close
()
if
self
.
ue_trace
==
"yes"
:
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
#delete old artifacts
mySSH
.
command
(
'echo '
+
self
.
HostPassword
+
' | sudo -S rm -rf ci_qlog'
,
'\$'
,
5
)
#start Trace, artifact is created in home dir
mySSH
.
command
(
'echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &'
,
'\$'
,
5
)
mySSH
.
close
()
def
DisableTrace
(
self
):
mySSH
=
sshconnection
.
SSHConnection
()
...
...
@@ -153,18 +155,20 @@ class Module_UE:
def
LogCollect
(
self
):
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
#archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix
now
=
datetime
.
now
()
now_string
=
now
.
strftime
(
"%Y%m%d-%H%M"
)
source
=
'ci_qlog'
destination
=
'/media/usb-drive/ci_qlogs/ci_qlog_'
+
now_string
+
'.zip'
#qlog artifact is zipped into the target folder
mySSH
.
command
(
'echo $USER; echo '
+
self
.
HostPassword
+
' | nohup sudo -S zip -r '
+
destination
+
' '
+
source
+
' &'
,
'\$'
,
10
)
mySSH
.
close
()
#post action : log cleaning to make sure enough space is reserved for the next run
Log_Mgt
=
cls_log_mgt
.
Log_Mgt
(
self
.
HostIPAddress
,
self
.
HostPassword
,
"/media/usb-drive/ci_qlogs"
)
Log_Mgt
.
LogRotation
()
if
self
.
ue_trace
==
"yes"
:
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
#archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix
now
=
datetime
.
now
()
now_string
=
now
.
strftime
(
"%Y%m%d-%H%M"
)
source
=
'ci_qlog'
destination
=
'/media/usb-drive/ci_qlogs/ci_qlog_'
+
now_string
+
'.zip'
#qlog artifact is zipped into the target folder
mySSH
.
command
(
'echo $USER; echo '
+
self
.
HostPassword
+
' | nohup sudo -S zip -r '
+
destination
+
' '
+
source
+
' &'
,
'\$'
,
10
)
mySSH
.
close
()
#post action : log cleaning to make sure enough space is reserved for the next run
Log_Mgt
=
cls_log_mgt
.
Log_Mgt
(
self
.
HostIPAddress
,
self
.
HostPassword
,
"/media/usb-drive/ci_qlogs"
)
Log_Mgt
.
LogRotation
()
else
:
destination
=
""
return
destination
ci-scripts/cls_oaicitest.py
View file @
86225c3b
...
...
@@ -160,6 +160,7 @@ class OaiCiTest():
self
.
air_interface
=
''
self
.
expectedNbOfConnectedUEs
=
0
self
.
ue_id
=
''
#used for module identification
self
.
ue_trace
=
''
#used to enable QLog trace for Module UE, passed to Module UE object at InitializeUE()
def
BuildOAIUE
(
self
,
HTML
):
...
...
@@ -367,7 +368,7 @@ class OaiCiTest():
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
InitializeUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
def
InitializeUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
ue_trace
):
if
self
.
ue_id
==
''
:
#no ID specified, then it is a COTS controlled by ADB
if
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
...
...
@@ -386,6 +387,7 @@ class OaiCiTest():
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
#RH
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
Module_UE
.
ue_trace
=
ue_trace
is_module
=
Module_UE
.
CheckCMProcess
()
if
is_module
:
Module_UE
.
EnableTrace
()
...
...
@@ -3102,7 +3104,7 @@ class OaiCiTest():
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
TerminateUE
(
self
,
HTML
,
COTS_UE
):
def
TerminateUE
(
self
,
HTML
,
COTS_UE
,
InfraUE
,
ue_trace
):
if
self
.
ue_id
==
''
:
#no ID specified, then it is a COTS controlled by ADB
terminate_ue_flag
=
False
self
.
GetAllUEDevices
(
terminate_ue_flag
)
...
...
@@ -3119,6 +3121,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
Module_UE
.
ue_trace
=
ue_trace
Module_UE
.
Command
(
"detach"
)
Module_UE
.
DisableTrace
()
Module_UE
.
DisableCM
()
...
...
ci-scripts/main.py
View file @
86225c3b
...
...
@@ -197,6 +197,7 @@ def GetParametersFromXML(action):
elif
action
==
'Initialize_UE'
:
ue_id
=
test
.
findtext
(
'id'
)
CiTestObj
.
ue_trace
=
test
.
findtext
(
'UE_Trace'
)
#temporary variable, to be passed to Module_UE in Initialize_UE call
if
(
ue_id
is
None
):
CiTestObj
.
ue_id
=
""
else
:
...
...
@@ -727,9 +728,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif
action
==
'Terminate_eNB'
:
RAN
.
TerminateeNB
(
HTML
,
EPC
)
elif
action
==
'Initialize_UE'
:
CiTestObj
.
InitializeUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
CiTestObj
.
InitializeUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
CiTestObj
.
ue_trace
)
elif
action
==
'Terminate_UE'
:
CiTestObj
.
TerminateUE
(
HTML
,
COTS_UE
)
CiTestObj
.
TerminateUE
(
HTML
,
COTS_UE
,
InfraUE
,
CiTestObj
.
ue_trace
)
elif
action
==
'Attach_UE'
:
CiTestObj
.
AttachUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
elif
action
==
'Detach_UE'
:
...
...
ci-scripts/xml_files/fr1_nsa_quectel.xml
View file @
86225c3b
...
...
@@ -48,6 +48,7 @@
<class>
Initialize_UE
</class>
<desc>
Initialize Quectel
</desc>
<id>
idefix
</id>
<UE_Trace>
yes
</UE_Trace>
</testCase>
...
...
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