Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shweta Shrivastava
openairinterface5G
Commits
6b6215e6
Commit
6b6215e6
authored
Jul 27, 2021
by
Raphael Defosseux
Browse files
fix(ci): adding detection of timed-out run on the physims on cluster
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
a9ffbc6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
ci-scripts/cls_physim1.py
View file @
6b6215e6
...
@@ -245,7 +245,7 @@ class PhySim:
...
@@ -245,7 +245,7 @@ class PhySim:
isFinished
=
False
isFinished
=
False
# doing a deep copy!
# doing a deep copy!
tmpPodNames
=
podNames
.
copy
()
tmpPodNames
=
podNames
.
copy
()
while
(
count
<
2
8
and
isFinished
==
False
):
while
(
count
<
3
2
and
isFinished
==
False
):
time
.
sleep
(
60
)
time
.
sleep
(
60
)
for
podName
in
tmpPodNames
:
for
podName
in
tmpPodNames
:
mySSH
.
command2
(
f
'oc logs --tail=1
{
podName
}
2>&1'
,
6
,
silent
=
True
)
mySSH
.
command2
(
f
'oc logs --tail=1
{
podName
}
2>&1'
,
6
,
silent
=
True
)
...
@@ -257,6 +257,8 @@ class PhySim:
...
@@ -257,6 +257,8 @@ class PhySim:
count
+=
1
count
+=
1
if
isFinished
:
if
isFinished
:
logging
.
debug
(
'
\u001B
[1m PhySim test is Complete
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m PhySim test is Complete
\u001B
[0m'
)
else
:
logging
.
error
(
'
\u001B
[1m PhySim test Timed-out!
\u001B
[0m'
)
# Getting the logs of each executables running in individual pods
# Getting the logs of each executables running in individual pods
for
podName
in
podNames
:
for
podName
in
podNames
:
...
@@ -279,15 +281,18 @@ class PhySim:
...
@@ -279,15 +281,18 @@ class PhySim:
mySSH
.
command
(
'oc logout'
,
'\$'
,
6
)
mySSH
.
command
(
'oc logout'
,
'\$'
,
6
)
mySSH
.
close
()
mySSH
.
close
()
self
.
AnalyzeLogFile_phySim
(
HTML
)
self
.
AnalyzeLogFile_phySim
(
HTML
)
if
self
.
testStatus
:
if
self
.
testStatus
and
isFinished
:
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRowPhySimTestResult
(
self
.
testSummary
,
self
.
testResult
)
HTML
.
CreateHtmlTestRowPhySimTestResult
(
self
.
testSummary
,
self
.
testResult
)
logging
.
info
(
'
\u001B
[1m Physical Simulator Pass
\u001B
[0m'
)
logging
.
info
(
'
\u001B
[1m Physical Simulator Pass
\u001B
[0m'
)
else
:
else
:
RAN
.
prematureExit
=
True
RAN
.
prematureExit
=
True
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
if
isFinished
:
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
else
:
HTML
.
CreateHtmlTestRow
(
'Some test(s) timed-out!'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRowPhySimTestResult
(
self
.
testSummary
,
self
.
testResult
)
HTML
.
CreateHtmlTestRowPhySimTestResult
(
self
.
testSummary
,
self
.
testResult
)
logging
.
info
(
'
\u001B
[1m Physical Simulator Fail
\u001B
[0m'
)
logging
.
error
(
'
\u001B
[1m Physical Simulator Fail
\u001B
[0m'
)
def
AnalyzeLogFile_phySim
(
self
,
HTML
):
def
AnalyzeLogFile_phySim
(
self
,
HTML
):
lIpAddr
=
self
.
eNBIPAddress
lIpAddr
=
self
.
eNBIPAddress
...
...
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