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
a42716d5
Commit
a42716d5
authored
Oct 18, 2022
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ci): the first tab in HTML report is now open
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
28fb8fbd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
ci-scripts/cls_oai_html.py
ci-scripts/cls_oai_html.py
+14
-1
No files found.
ci-scripts/cls_oai_html.py
View file @
a42716d5
...
...
@@ -33,6 +33,7 @@
#-----------------------------------------------------------
import
sys
# arg
import
re
# reg
import
fileinput
import
logging
import
os
import
time
...
...
@@ -195,6 +196,9 @@ class HTMLManagement():
self
.
htmlFile
.
write
(
' <ul class="nav nav-pills">
\n
'
)
count
=
0
while
(
count
<
self
.
nbTestXMLfiles
):
if
count
==
0
:
pillMsg
=
' <li class="active"><a data-toggle="pill" href="#'
else
:
pillMsg
=
' <li><a data-toggle="pill" href="#'
pillMsg
+=
self
.
htmlTabRefs
[
count
]
pillMsg
+=
'">'
...
...
@@ -269,6 +273,15 @@ class HTMLManagement():
def
CreateHtmlFooter
(
self
,
passStatus
):
if
(
os
.
path
.
isfile
(
'test_results.html'
)):
# Tagging the 1st tab as active so it is automatically opened.
firstTabFound
=
False
for
line
in
fileinput
.
FileInput
(
"test_results.html"
,
inplace
=
1
):
if
re
.
search
(
'tab-pane fade'
,
line
)
and
not
firstTabFound
:
firstTabFound
=
True
print
(
line
.
replace
(
'tab-pane fade'
,
'tab-pane fade in active'
),
end
=
''
)
else
:
print
(
line
,
end
=
''
)
self
.
htmlFile
=
open
(
'test_results.html'
,
'a'
)
self
.
htmlFile
.
write
(
'</div>
\n
'
)
self
.
htmlFile
.
write
(
' <p></p>
\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