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
c326785d
Commit
c326785d
authored
Apr 24, 2019
by
Boris Djalal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding list of modes in the Jenkins script.
Signed-off-by:
Boris Djalal
<
boris.djalal@eurecom.fr
>
parent
400dfb57
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
ci-scripts/main.py
ci-scripts/main.py
+7
-7
ci-scripts/test-boris-Jenkinsfile
ci-scripts/test-boris-Jenkinsfile
+9
-8
No files found.
ci-scripts/main.py
View file @
c326785d
...
...
@@ -3021,8 +3021,8 @@ def Usage():
print
(
' --XMLTestFile=[XML Test File to be run]'
)
print
(
'------------------------------------------------------------'
)
def
GetModeFromXML
():
SSH
.
mode
=
test
.
findtext
(
'mode'
)
#
def GetModeFromXML():
#
SSH.mode = test.findtext('mode')
def
CheckClassValidity
(
action
,
id
):
if
action
!=
'Build_eNB'
and
action
!=
'Initialize_eNB'
and
action
!=
'Terminate_eNB'
and
action
!=
'Initialize_UE'
and
action
!=
'Terminate_UE'
and
action
!=
'Attach_UE'
and
action
!=
'Detach_UE'
and
action
!=
'Build_OAI_UE'
and
action
!=
'Initialize_OAI_UE'
and
action
!=
'Terminate_OAI_UE'
and
action
!=
'Initialize_OAI_eNB'
and
action
!=
'Ping'
and
action
!=
'Iperf'
and
action
!=
'Reboot_UE'
and
action
!=
'Initialize_HSS'
and
action
!=
'Terminate_HSS'
and
action
!=
'Initialize_MME'
and
action
!=
'Terminate_MME'
and
action
!=
'Initialize_SPGW'
and
action
!=
'Terminate_SPGW'
and
action
!=
'Initialize_CatM_module'
and
action
!=
'Terminate_CatM_module'
and
action
!=
'Attach_CatM_module'
and
action
!=
'Detach_CatM_module'
and
action
!=
'Ping_CatM_module'
and
action
!=
'IdleSleep'
:
...
...
@@ -3142,12 +3142,11 @@ while len(argvs) > 1:
Usage
()
sys
.
exit
(
0
)
elif
re
.
match
(
'^\-\-mode=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
mode
=
GetModeFromXML
()
print
(
'mode: '
+
mode
)
#print('mode: ' + mode)
matchReg
=
re
.
match
(
'^\-\-mode=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
if
matchReg
and
mode
is
not
None
:
print
(
'Warning: the mode is defined in both xml file and command line'
)
print
(
'ignoring the mode defined in the xml file'
)
#
if matchReg and mode is not None:
#
print('Warning: the mode is defined in both xml file and command line')
#
print('ignoring the mode defined in the xml file')
print
(
'mode: '
+
mode
)
mode
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNBIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
...
...
@@ -3406,6 +3405,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
SSH
.
testCase_id
=
id
SSH
.
desc
=
test
.
findtext
(
'desc'
)
action
=
test
.
findtext
(
'class'
)
mode
=
test
.
findtext
(
'mode'
)
if
(
CheckClassValidity
(
action
,
id
)
==
False
):
continue
SSH
.
ShowTestID
()
...
...
ci-scripts/test-boris-Jenkinsfile
View file @
c326785d
...
...
@@ -53,6 +53,8 @@ def eNB_TargetBranch
def
PROJECT_NAME
=
"test-boris"
def
GIT_COMMIT_AUTHOR
def
GIT_COMMIT_EMAIL
def
modeList
=
[
'TesteNB'
,
'TestUE'
,
'TesteNB'
]
// Global Parameters not to break the main.py command line and code.
def
ADB_IPAddress
=
"none"
def
ADB_Username
=
"none"
...
...
@@ -221,17 +223,16 @@ pipeline {
sh
"python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --ADBIPAddress=${ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} ${mainPythonAllXmlFiles}"
String
[]
myXmlTestSuite
=
testXMLFile
.
split
(
"\\r?\\n"
)
for
(
xmlFile
in
myXmlTestSuite
)
{
mode
=
modeList
.
pop
()
if
(
fileExists
(
xmlFile
))
{
try
{
sh
"python3 main.py --mode=TesteNB
--eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBBranch=${eNB_Branch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNBRepository=${eNB_Repository} --eNBCommitID=${eNB_CommitID} --ADBIPAddress=${ADB_IPAddress} --EPCIPAddress=${EPC_IPAddress} --XMLTestFile=${xmlFile}"
}
catch
(
Exception
e
)
{
currentBuild
.
result
=
'FAILURE'
BUILD_STAGE_STATUS
=
false
}
try
{
sh
"python3 main.py --mode=${mode}
--eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBBranch=${eNB_Branch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNBRepository=${eNB_Repository} --eNBCommitID=${eNB_CommitID} --ADBIPAddress=${ADB_IPAddress} --EPCIPAddress=${EPC_IPAddress} --XMLTestFile=${xmlFile}"
}
catch
(
Exception
e
)
{
currentBuild
.
result
=
'FAILURE'
BUILD_STAGE_STATUS
=
false
}
}
}
sh
"python3 main.py --mode=FinalizeHtml --finalStatus=${BUILD_STAGE_STATUS} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
...
...
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