Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
3099b7c5
Commit
3099b7c5
authored
Dec 16, 2019
by
Gabriele Perrone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main.py mods: coloured rows between retries and variable cnt become an object (FailReportCnt)
parent
2668cfd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
ci-scripts/main.py
ci-scripts/main.py
+15
-6
No files found.
ci-scripts/main.py
View file @
3099b7c5
...
@@ -93,6 +93,7 @@ logging.basicConfig(
...
@@ -93,6 +93,7 @@ logging.basicConfig(
#-----------------------------------------------------------
#-----------------------------------------------------------
class
SSHConnection
():
class
SSHConnection
():
def
__init__
(
self
):
def
__init__
(
self
):
self
.
FailReportCnt
=
0
self
.
prematureExit
=
False
self
.
prematureExit
=
False
self
.
ranRepository
=
''
self
.
ranRepository
=
''
self
.
ranBranch
=
''
self
.
ranBranch
=
''
...
@@ -4213,6 +4214,12 @@ class SSHConnection():
...
@@ -4213,6 +4214,12 @@ class SSHConnection():
self
.
htmlFile
.
write
(
'</html>
\n
'
)
self
.
htmlFile
.
write
(
'</html>
\n
'
)
self
.
htmlFile
.
close
()
self
.
htmlFile
.
close
()
def
CreateHtmlRetrySeparator
(
self
):
if
((
not
self
.
htmlFooterCreated
)
and
(
self
.
htmlHeaderCreated
)):
self
.
htmlFile
.
write
(
' <tr bgcolor = "#33CCFF" >
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
5
+
self
.
htmlUEConnected
)
+
'>Try Run #'
+
str
(
self
.
FailReportCnt
)
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
def
CreateHtmlTestRow
(
self
,
options
,
status
,
processesStatus
,
machine
=
'eNB'
):
def
CreateHtmlTestRow
(
self
,
options
,
status
,
processesStatus
,
machine
=
'eNB'
):
if
((
not
self
.
htmlFooterCreated
)
and
(
self
.
htmlHeaderCreated
)):
if
((
not
self
.
htmlFooterCreated
)
and
(
self
.
htmlHeaderCreated
)):
currentTime
=
int
(
round
(
time
.
time
()
*
1000
))
-
self
.
startTime
currentTime
=
int
(
round
(
time
.
time
()
*
1000
))
-
self
.
startTime
...
@@ -4814,11 +4821,13 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -4814,11 +4821,13 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
SSH
.
CreateHtmlTabHeader
()
SSH
.
CreateHtmlTabHeader
()
c
nt
=
0
SSH
.
FailReportC
nt
=
0
SSH
.
prematureExit
=
True
SSH
.
prematureExit
=
True
SSH
.
startTime
=
int
(
round
(
time
.
time
()
*
1000
))
SSH
.
startTime
=
int
(
round
(
time
.
time
()
*
1000
))
while
c
nt
<
SSH
.
repeatCounts
[
0
]
and
SSH
.
prematureExit
:
while
SSH
.
FailReportC
nt
<
SSH
.
repeatCounts
[
0
]
and
SSH
.
prematureExit
:
SSH
.
prematureExit
=
False
SSH
.
prematureExit
=
False
# At every iteratin of the retry loop, a separator will be added
SSH
.
CreateHtmlRetrySeparator
()
for
test_case_id
in
todo_tests
:
for
test_case_id
in
todo_tests
:
if
SSH
.
prematureExit
:
if
SSH
.
prematureExit
:
break
break
...
@@ -4905,13 +4914,13 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -4905,13 +4914,13 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
SSH
.
Perform_X2_Handover
()
SSH
.
Perform_X2_Handover
()
else
:
else
:
sys
.
exit
(
'Invalid action'
)
sys
.
exit
(
'Invalid action'
)
c
nt
+=
1
SSH
.
FailReportC
nt
+=
1
if
c
nt
==
SSH
.
repeatCounts
[
0
]
and
SSH
.
prematureExit
:
if
SSH
.
FailReportC
nt
==
SSH
.
repeatCounts
[
0
]
and
SSH
.
prematureExit
:
logging
.
debug
(
'Testsuite failed '
+
str
(
c
nt
)
+
' time(s)'
)
logging
.
debug
(
'Testsuite failed '
+
str
(
SSH
.
FailReportC
nt
)
+
' time(s)'
)
SSH
.
CreateHtmlTabFooter
(
False
)
SSH
.
CreateHtmlTabFooter
(
False
)
sys
.
exit
(
'Failed Scenario'
)
sys
.
exit
(
'Failed Scenario'
)
else
:
else
:
logging
.
info
(
'Testsuite passed after '
+
str
(
c
nt
)
+
' time(s)'
)
logging
.
info
(
'Testsuite passed after '
+
str
(
SSH
.
FailReportC
nt
)
+
' time(s)'
)
SSH
.
CreateHtmlTabFooter
(
True
)
SSH
.
CreateHtmlTabFooter
(
True
)
else
:
else
:
Usage
()
Usage
()
...
...
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