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
spbro
OpenXG-RAN
Commits
9fa353b7
Commit
9fa353b7
authored
Sep 23, 2021
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ci): better handling of logs
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
8c55ccc9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+12
-6
ci-scripts/xml_files/container_5g_f1_rfsim.xml
ci-scripts/xml_files/container_5g_f1_rfsim.xml
+2
-2
ci-scripts/xml_files/container_5g_f1_rfsim_down.xml
ci-scripts/xml_files/container_5g_f1_rfsim_down.xml
+1
-1
No files found.
ci-scripts/cls_containerize.py
View file @
9fa353b7
...
...
@@ -606,6 +606,8 @@ class Containerize():
def
UndeployGenObject
(
self
,
HTML
):
self
.
exitStatus
=
0
ymlPath
=
self
.
yamlPath
[
0
].
split
(
'/'
)
logPath
=
'../cmake_targets/log/'
+
ymlPath
[
1
]
if
(
self
.
ranAllowMerge
):
cmd
=
'cd '
+
self
.
yamlPath
[
0
]
+
' && sed -e "s@develop@ci-temp@" docker-compose.y*ml > docker-compose-ci.yml'
...
...
@@ -633,7 +635,7 @@ class Containerize():
logging
.
debug
(
cmd
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
10
)
if
anyLogs
:
cmd
=
'mkdir -p
../cmake_targets/log && mv '
+
self
.
yamlPath
[
0
]
+
'/*.log ../cmake_targets/log'
cmd
=
'mkdir -p
'
+
logPath
+
' && mv '
+
self
.
yamlPath
[
0
]
+
'/*.log '
+
logPath
logging
.
debug
(
cmd
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
10
)
...
...
@@ -653,10 +655,12 @@ class Containerize():
def
PingFromContainer
(
self
,
HTML
):
self
.
exitStatus
=
0
cmd
=
'mkdir -p ../cmake_targets/log'
ymlPath
=
self
.
yamlPath
[
0
].
split
(
'/'
)
logPath
=
'../cmake_targets/log/'
+
ymlPath
[
1
]
cmd
=
'mkdir -p '
+
logPath
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
10
)
cmd
=
'docker exec '
+
self
.
pingContName
+
' /bin/bash -c "ping '
+
self
.
pingOptions
+
'" 2>&1 | tee
../cmake_targets/log
/ping_'
+
HTML
.
testCase_id
+
'.log'
cmd
=
'docker exec '
+
self
.
pingContName
+
' /bin/bash -c "ping '
+
self
.
pingOptions
+
'" 2>&1 | tee
'
+
logPath
+
'
/ping_'
+
HTML
.
testCase_id
+
'.log'
logging
.
debug
(
cmd
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
100
)
...
...
@@ -718,7 +722,9 @@ class Containerize():
def
IperfFromContainer
(
self
,
HTML
):
self
.
exitStatus
=
0
cmd
=
'mkdir -p ../cmake_targets/log'
ymlPath
=
self
.
yamlPath
[
0
].
split
(
'/'
)
logPath
=
'../cmake_targets/log/'
+
ymlPath
[
1
]
cmd
=
'mkdir -p '
+
logPath
logStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
10
)
# Start the server process
...
...
@@ -728,7 +734,7 @@ class Containerize():
time
.
sleep
(
5
)
# Start the client process
cmd
=
'docker exec '
+
self
.
cliContName
+
' /bin/bash -c "iperf '
+
self
.
cliOptions
+
'" 2>&1 | tee
../cmake_targets/log
/iperf_client_'
+
HTML
.
testCase_id
+
'.log'
cmd
=
'docker exec '
+
self
.
cliContName
+
' /bin/bash -c "iperf '
+
self
.
cliOptions
+
'" 2>&1 | tee
'
+
logPath
+
'
/iperf_client_'
+
HTML
.
testCase_id
+
'.log'
logging
.
debug
(
cmd
)
clientStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
100
)
...
...
@@ -737,7 +743,7 @@ class Containerize():
logging
.
debug
(
cmd
)
serverStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
10
)
time
.
sleep
(
5
)
cmd
=
'docker cp '
+
self
.
svrContName
+
':/tmp/iperf_server.log
../cmake_targets/log
/iperf_server_'
+
HTML
.
testCase_id
+
'.log'
cmd
=
'docker cp '
+
self
.
svrContName
+
':/tmp/iperf_server.log
'
+
logPath
+
'
/iperf_server_'
+
HTML
.
testCase_id
+
'.log'
logging
.
debug
(
cmd
)
serverStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
10
)
...
...
ci-scripts/xml_files/container_5g_f1_rfsim.xml
View file @
9fa353b7
...
...
@@ -21,8 +21,8 @@
-->
<testCaseList>
<htmlTabRef>
rfsim-5gnr
</htmlTabRef>
<htmlTabName>
Testing 5G NR RF sim in containers
</htmlTabName>
<htmlTabRef>
rfsim-5gnr
-f1
</htmlTabRef>
<htmlTabName>
Testing 5G NR RF sim in containers (CU/DU)
</htmlTabName>
<htmlTabIcon>
wrench
</htmlTabIcon>
<TestCaseRequestedList>
100021
...
...
ci-scripts/xml_files/container_5g_f1_rfsim_down.xml
View file @
9fa353b7
...
...
@@ -21,7 +21,7 @@
-->
<testCaseList>
<htmlTabRef>
rfsim-5gnr-down
</htmlTabRef>
<htmlTabRef>
rfsim-5gnr-down
-f1
</htmlTabRef>
<htmlTabName>
CleanUp 5G RF
</htmlTabName>
<htmlTabIcon>
trash
</htmlTabIcon>
<TestCaseRequestedList>
...
...
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