mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[sancov] Fix broken links and displaced coloring in coverage-report-server.py
This patch fixes two issues: * Fixed relative links to source files * Enumeration of lines in source files starts from 1 instead of 0 to align with .symcov files generated by sancov -symbolize Patch by Dmitiriy Nikiforov. Differential Revision: https://reviews.llvm.org/D31038 llvm-svn: 298250
This commit is contained in:
parent
e2a69f0bd9
commit
3460d90331
@ -138,7 +138,7 @@ class ServerHandler(http.server.BaseHTTPRequestHandler):
|
|||||||
if not file_coverage:
|
if not file_coverage:
|
||||||
continue
|
continue
|
||||||
filelist.append(
|
filelist.append(
|
||||||
"<tr><td><a href=\"/{name}\">{name}</a></td>"
|
"<tr><td><a href=\"./{name}\">{name}</a></td>"
|
||||||
"<td>{coverage}%</td></tr>".format(
|
"<td>{coverage}%</td></tr>".format(
|
||||||
name=html.escape(filename, quote=True),
|
name=html.escape(filename, quote=True),
|
||||||
coverage=format_pct(file_coverage)))
|
coverage=format_pct(file_coverage)))
|
||||||
@ -165,7 +165,7 @@ class ServerHandler(http.server.BaseHTTPRequestHandler):
|
|||||||
["<span class='{cls}'>{line} </span>".format(
|
["<span class='{cls}'>{line} </span>".format(
|
||||||
line=html.escape(line.rstrip()),
|
line=html.escape(line.rstrip()),
|
||||||
cls=linemap.get(line_no, ""))
|
cls=linemap.get(line_no, ""))
|
||||||
for line_no, line in enumerate(f)])
|
for line_no, line in enumerate(f, start=1)])
|
||||||
|
|
||||||
response = string.Template(CONTENT_PAGE_TMPL).safe_substitute(
|
response = string.Template(CONTENT_PAGE_TMPL).safe_substitute(
|
||||||
path=self.path[1:],
|
path=self.path[1:],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user