Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: create the compatibility -imp symlinks only once #126

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions py/common/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,6 @@ def finalize_results(js_file, results, props):
# generate *-all{.err,.html,-summary.txt}
transform_results(all_js_file, results)

# create `-imp` symlinks for compatibility
for suffix in [".err", ".html", "-summary.txt"]:
src = f"scan-results{suffix}"
dst = os.path.join(results.resdir, f"scan-results-imp{suffix}")
results.exec_cmd(["ln", "-s", src, dst])

(err_file, _) = transform_results(js_file, results)

if props.print_defects:
Expand Down Expand Up @@ -366,6 +360,13 @@ def apply_result_filters(props, results, supp_filters=[]):
finalize_results(js_supp, results, props)
finalize_results(js_file, results, props)

# create `-imp` symlinks for compatibility (if important defects were filtered)
if props.imp_checker_set:
for suffix in [".err", ".html", ".js", "-summary.txt"]:
src = f"scan-results{suffix}"
dst = os.path.join(results.resdir, f"scan-results-imp{suffix}")
results.exec_cmd(["ln", "-s", src, dst])


def handle_known_fp_list(props, results):
"""Update props.result_filters based on props.known_false_positives"""
Expand Down