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
c3405d39
Commit
c3405d39
authored
Oct 25, 2023
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ci): cosmetic fix for parallel display
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
65549745
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+9
-3
No files found.
ci-scripts/cls_oaicitest.py
View file @
c3405d39
...
...
@@ -43,7 +43,7 @@ import logging
import
datetime
import
signal
import
statistics
as
stat
from
multiprocessing
import
SimpleQueue
from
multiprocessing
import
SimpleQueue
,
Lock
import
concurrent.futures
#import our libs
...
...
@@ -494,7 +494,7 @@ class OaiCiTest():
messages
=
[
f
.
result
()
for
f
in
futures
]
HTML
.
CreateHtmlTestRowQueue
(
'NA'
,
'OK'
,
messages
)
def
Ping_common
(
self
,
EPC
,
ue
,
RAN
):
def
Ping_common
(
self
,
EPC
,
ue
,
RAN
,
printLock
):
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
ping_status
=
0
ueIP
=
ue
.
getIP
()
...
...
@@ -551,6 +551,8 @@ class OaiCiTest():
avg_msg
=
f'RTT(Avg) :
{
rtt_avg
}
ms'
max_msg
=
f'RTT(Max) :
{
rtt_max
}
ms'
# adding a lock for cleaner display in command line
printLock
.
acquire
()
logging
.
info
(
f'
\u001B
[1;37;44m ping result for
{
ue_header
}
\u001B
[0m'
)
logging
.
info
(
f'
\u001B
[1;34m
{
pal_msg
}
\u001B
[0m'
)
logging
.
info
(
f'
\u001B
[1;34m
{
min_msg
}
\u001B
[0m'
)
...
...
@@ -563,6 +565,7 @@ class OaiCiTest():
if
float
(
packetloss
)
>
float
(
self
.
ping_packetloss_threshold
):
message
+=
'
\n
Packet Loss too high'
logging
.
error
(
f'
\u001B
[1;37;41m Packet Loss too high; Target:
{
self
.
ping_packetloss_threshold
}
%
\u001B
[0m'
)
printLock
.
release
()
return
(
False
,
message
)
elif
float
(
packetloss
)
>
0
:
message
+=
'
\n
Packet Loss is not 0%'
...
...
@@ -573,7 +576,9 @@ class OaiCiTest():
ping_rttavg_error_msg
=
f'RTT(Avg) too high:
{
rtt_avg
}
ms; Target:
{
self
.
ping_rttavg_threshold
}
ms'
message
+=
f'
\n
{
ping_rttavg_error_msg
}
'
logging
.
error
(
'
\u001B
[1;37;41m'
+
ping_rttavg_error_msg
+
'
\u001B
[0m'
)
printLock
.
release
()
return
(
False
,
message
)
printLock
.
release
()
return
(
True
,
message
)
...
...
@@ -587,8 +592,9 @@ class OaiCiTest():
ues
=
[
cls_module_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
logging
.
debug
(
ues
)
pingLock
=
Lock
()
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
futures
=
[
executor
.
submit
(
self
.
Ping_common
,
EPC
,
ue
,
RAN
)
for
ue
in
ues
]
futures
=
[
executor
.
submit
(
self
.
Ping_common
,
EPC
,
ue
,
RAN
,
pingLock
)
for
ue
in
ues
]
results
=
[
f
.
result
()
for
f
in
futures
]
# each result in results is a tuple, first member goes to successes, second to messages
successes
,
messages
=
map
(
list
,
zip
(
*
results
))
...
...
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