Skip to content
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
5 changes: 4 additions & 1 deletion scripts/kani.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def run_cmd(
debug=False,
scanners=[],
dry_run=False,
run_output_transformer=False,
output_style=kani_flags.OutputStyle.DEFAULT
):
# If this a dry run, we emulate running a successful process whose output is the command itself
Expand Down Expand Up @@ -192,7 +193,7 @@ def run_cmd(
# Write to stdout if specified, or if failure, or verbose or debug
if (output_to == "stdout" or process.returncode != EXIT_CODE_SUCCESS or verbose or debug) and not quiet:
# By Default, the flag passed is the old output style
if (label == "cbmc" and output_style != kani_flags.OutputStyle.OLD and not dry_run):
if (run_output_transformer and not dry_run):
try:
returncode = cbmc_json_parser.transform_cbmc_output(stdout, output_style)
except BaseException:
Expand Down Expand Up @@ -341,6 +342,7 @@ def run_cbmc(
unwind_asserts_pattern = ".*unwinding assertion.*: FAILURE"
unwind_asserts_scanner = Scanner(unwind_asserts_pattern, append_unwind_tip)
scanners.append(unwind_asserts_scanner)
run_output_transformer = output_style != kani_flags.OutputStyle.OLD
return run_cmd(
cbmc_cmd,
label="cbmc",
Expand All @@ -349,6 +351,7 @@ def run_cbmc(
quiet=quiet,
scanners=scanners,
dry_run=dry_run,
run_output_transformer=run_output_transformer,
output_style=output_style)


Expand Down