Skip to content

Commit

Permalink
post-process: fix coverage link (#308)
Browse files Browse the repository at this point in the history
Fixes: #307
  • Loading branch information
DavidKorczynski authored Jun 7, 2022
1 parent 8741a06 commit 8ae38a6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions post-processing/analyses/fuzz_optimal_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def analysis_func(
html_string += self.get_optimal_target_section(
optimal_target_functions,
toc_list,
tables
tables,
coverage_url
)

# Create section for how the state of the project will be if
Expand Down Expand Up @@ -209,7 +210,8 @@ def get_optimal_target_section(
self,
optimal_target_functions: List[fuzz_data_loader.FunctionProfile],
toc_list: List[Tuple[str, str, int]],
tables: List[str]
tables: List[str],
coverage_url: str
) -> str:
# Table with details about optimal target functions
html_string = fuzz_html_helpers.html_add_header_with_link(
Expand Down Expand Up @@ -242,8 +244,13 @@ def get_optimal_target_section(
]
)
for fd in optimal_target_functions:
func_cov_url = "%s%s.html#L%d" % (
coverage_url,
fd.function_source_file,
fd.function_linenumber
)
html_func_row = (
f"<a href=\"#\"><code class='language-clike'>"
f"<a href=\"{ func_cov_url }\"><code class='language-clike'>"
f"{fuzz_utils.demangle_cpp_func(fd.function_name)}"
f"</code></a>"
)
Expand Down

0 comments on commit 8ae38a6

Please sign in to comment.