Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
canbus
CTU CAN FD IP Core
Commits
26d94315
Commit
26d94315
authored
Jan 27, 2019
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testfw: strip PSL html filename to keep it in the same directory
parent
e196b54c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
test/testfw/test_parse_psl_coverage.py
test/testfw/test_parse_psl_coverage.py
+7
-4
No files found.
test/testfw/test_parse_psl_coverage.py
View file @
26d94315
...
...
@@ -154,13 +154,15 @@ def create_psl_file_page(filename, psl_points):
"""
Create HTML file with list of PSL coverage statements.
"""
html_cov_path
=
os
.
path
.
join
(
func_cov_dir
,
"{}.html"
.
format
(
filename
))
parsed_file_name
=
os
.
path
.
basename
(
filename
)
html_cov_path
=
os
.
path
.
join
(
func_cov_dir
,
"{}.html"
.
format
(
parsed_file_name
))
html_file
=
open
(
html_cov_path
,
'w'
)
doc
,
tag
,
text
=
Doc
().
tagtext
()
# Add Common header
add_psl_html_header
(
doc
,
tag
,
text
,
filename
,
psl_points
)
add_psl_html_header
(
doc
,
tag
,
text
,
parsed_
file
_
name
,
psl_points
)
# Add "Cover" and "Assertion" points
psl_types
=
[{
"name"
:
"Cover Points"
,
"type"
:
"cover"
},
\
...
...
@@ -189,8 +191,9 @@ def create_psl_file_refs_table(doc, tag, text, psl_by_files):
for
file_name
,
psl_list
in
psl_by_files
.
items
():
with
tag
(
'tr'
):
with
tag
(
'td'
):
with
tag
(
'a'
,
href
=
file_name
+
".html"
):
text
(
file_name
)
name
=
os
.
path
.
basename
(
file_name
)
with
tag
(
'a'
,
href
=
name
+
".html"
):
text
(
name
)
coverage_types
=
[
"cover"
,
"assertion"
]
for
coverage_type
in
coverage_types
:
[
ok
,
nok
]
=
calc_coverage_results
(
psl_list
,
coverage_type
)
...
...
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