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
alex037yang
OpenXG-RAN
Commits
8857905a
Commit
8857905a
authored
Jun 14, 2019
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: fix cosmetics on HTML report
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
aff80ba1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
ci-scripts/Jenkinsfile-poll-gNB-UE
ci-scripts/Jenkinsfile-poll-gNB-UE
+1
-1
ci-scripts/main.py
ci-scripts/main.py
+28
-5
No files found.
ci-scripts/Jenkinsfile-poll-gNB-UE
View file @
8857905a
...
...
@@ -296,7 +296,7 @@ pipeline {
}
if
(
fileExists
(
"ci-scripts/test_results.html"
))
{
sh
"mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
sh
"sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
sh
"sed -i -e 's#TEMPLATE_
BUILD_TIME#${JOB_TIMESTAMP}#' -e 's#TEMPLATE_
JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
archiveArtifacts
"test_results-${JOB_NAME}.html"
}
}
...
...
ci-scripts/main.py
View file @
8857905a
...
...
@@ -2638,6 +2638,17 @@ class SSHConnection():
if
result
is
not
None
:
self
.
OsVersion
=
result
.
group
(
'os_type'
)
logging
.
debug
(
'OS is: '
+
self
.
OsVersion
)
else
:
self
.
command
(
'hostnamectl'
,
'\$'
,
5
)
result
=
re
.
search
(
'Operating System: (?P<os_type>[a-zA-Z0-9\-\_\.\ ]+)'
,
str
(
self
.
ssh
.
before
))
if
result
is
not
None
:
self
.
OsVersion
=
result
.
group
(
'os_type'
)
if
self
.
OsVersion
==
'CentOS Linux 7 '
:
self
.
command
(
'cat /etc/redhat-release'
,
'\$'
,
5
)
result
=
re
.
search
(
'CentOS Linux release (?P<os_version>[0-9\.]+)'
,
str
(
self
.
ssh
.
before
))
if
result
is
not
None
:
self
.
OsVersion
=
self
.
OsVersion
.
replace
(
'7 '
,
result
.
group
(
'os_version'
))
logging
.
debug
(
'OS is: '
+
self
.
OsVersion
)
self
.
command
(
'uname -r'
,
'\$'
,
5
)
result
=
re
.
search
(
'uname -r
\\\\
r
\\\\
n(?P<kernel_version>[a-zA-Z0-9\-\_\.]+)'
,
str
(
self
.
ssh
.
before
))
if
result
is
not
None
:
...
...
@@ -2648,11 +2659,23 @@ class SSHConnection():
if
result
is
not
None
:
self
.
UhdVersion
=
result
.
group
(
'uhd_version'
)
logging
.
debug
(
'UHD Version is: '
+
self
.
UhdVersion
)
self
.
command
(
'echo '
+
Password
+
' | sudo -S uhd_find_devices'
,
'\$'
,
12
)
result
=
re
.
search
(
'product: (?P<usrp_board>[0-9A-Za-z]+)
\\\\
r
\\\\
n'
,
str
(
self
.
ssh
.
before
))
else
:
self
.
command
(
'uhd_config_info --version'
,
'\$'
,
5
)
result
=
re
.
search
(
'UHD (?P<uhd_version>[a-zA-Z0-9\.\-]+)'
,
str
(
self
.
ssh
.
before
))
if
result
is
not
None
:
self
.
UsrpBoard
=
result
.
group
(
'usrp_board'
)
logging
.
debug
(
'USRP Board is: '
+
self
.
UsrpBoard
)
self
.
UhdVersion
=
result
.
group
(
'uhd_version'
)
logging
.
debug
(
'UHD Version is: '
+
self
.
UhdVersion
)
self
.
command
(
'echo '
+
Password
+
' | sudo -S uhd_find_devices'
,
'\$'
,
12
)
usrp_boards
=
re
.
findall
(
'product: ([0-9A-Za-z]+)
\\\\
r
\\\\
n'
,
str
(
self
.
ssh
.
before
))
count
=
0
for
board
in
usrp_boards
:
if
count
==
0
:
self
.
UsrpBoard
=
board
else
:
self
.
UsrpBoard
+=
','
+
board
count
+=
1
if
count
>
0
:
logging
.
debug
(
'USRP Board(s) : '
+
self
.
UsrpBoard
)
self
.
command
(
'lscpu'
,
'\$'
,
5
)
result
=
re
.
search
(
'CPU\(s\): *(?P<nb_cpus>[0-9]+).*Model name: *(?P<model>[a-zA-Z0-9\-\_\.\ \(\)]+).*CPU MHz: *(?P<cpu_mhz>[0-9\.]+)'
,
str
(
self
.
ssh
.
before
))
if
result
is
not
None
:
...
...
@@ -2840,7 +2863,7 @@ class SSHConnection():
self
.
htmlFile
.
write
(
' <td><span class="label label-default">'
+
self
.
KernelVersion
+
'</span></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td>UHD Version</td>
\n
'
)
self
.
htmlFile
.
write
(
' <td><span class="label label-default">'
+
self
.
UhdVersion
+
'</span></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td>USRP Board</td>
\n
'
)
self
.
htmlFile
.
write
(
' <td>USRP Board
(s)
</td>
\n
'
)
self
.
htmlFile
.
write
(
' <td><span class="label label-default">'
+
self
.
UsrpBoard
+
'</span></td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
...
...
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