Skip to content

Commit 32a45ae

Browse files
authored
Merge pull request diffblue#286 from diffblue/bugfix/slicer_debug_HTML_output
SEC-164: Bugfix: debug HTML output of slicing-tasks and the full-slicer.
2 parents 3bea9cf + 697c415 commit 32a45ae

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

driver/presentation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def build_HTML_interface_to_slicing_tasks(root_dir,sub_dir,ofile):
337337
ofile.write(" <td align=\"center\"><a href=\"./" + os.path.join(sub_dir,dir_name,"symbol_table.html") +
338338
"\">here</a></td>\n")
339339
ofile.write(" <td align=\"center\"><a href=\"./" +
340-
os.path.relpath(os.path.splitext(slicing_task["goto_binary_file"])[0] + ".stats.json", root_dir) +
340+
os.path.splitext(slicing_task["goto_binary_file"])[0] + ".stats.json" +
341341
"\">here</a></td>\n")
342342
ofile.write(" <td>" + escape_text_to_HTML(slicing_task["goto_binary_file"]) + "</td>\n")
343343
ofile.write(" </tr>\n")
@@ -365,8 +365,8 @@ def build_HTML_interface_to_the_slicer(root_dir,sub_dir,ofile):
365365
src_idx_name = int(src_plain_fname[src_plain_fname.rfind("_")+1:])
366366
dst_goto_program_fname = os.path.join(os.path.dirname(cfg["goto_binary_file"]),
367367
"sliced_goto_program_" + str(src_idx_name) + ".gbf")
368-
src_goto_stats_fname = os.path.splitext(cfg["goto_binary_file"])[0] + ".stats.json"
369-
dst_goto_stats_fname = os.path.join(os.path.dirname(cfg["goto_binary_file"]),
368+
src_goto_stats_fname = os.path.join(root_dir, os.path.splitext(cfg["goto_binary_file"])[0] + ".stats.json")
369+
dst_goto_stats_fname = os.path.join(root_dir, os.path.dirname(cfg["goto_binary_file"]),
370370
"sliced_goto_program_" + str(src_idx_name) + ".stats.json")
371371
ofile.write("<table>\n"
372372
"<caption>Result #" + str(src_idx_name) + ".</caption>\n"
@@ -417,8 +417,8 @@ def make_reduction_string(orig_value, reduced_value, add_percentage=True):
417417
ofile.write(" <td>Reduced GOTO binary size [bytes]</td>\n")
418418
ofile.write(" <td>" + (
419419
make_reduction_string(
420-
os.stat(cfg["goto_binary_file"]).st_size,
421-
os.stat(dst_goto_program_fname).st_size
420+
os.stat(os.path.join(root_dir, cfg["goto_binary_file"])).st_size,
421+
os.stat(os.path.join(root_dir, dst_goto_program_fname)).st_size
422422
)
423423
if stats_available else "NOT AVAILABLE"
424424
) + "</td>\n")

0 commit comments

Comments
 (0)