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

Enhance the output of the Perun #174

Merged
merged 25 commits into from
Feb 12, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix minor issues with formatting strings
tfiedor committed Feb 12, 2024
commit 43ce3eeada1d2701082474b75562c5fc53ec2665
22 changes: 11 additions & 11 deletions perun/fuzz/factory.py
Original file line number Diff line number Diff line change
@@ -211,31 +211,31 @@ def print_results(
"""
log.major_info("Summary of Fuzzing")
log.minor_info(
f"Fuzzing time", status=f"{fuzzing_report.end_time - fuzzing_report.start_time:.2f}s"
"Fuzzing time", status=f"{fuzzing_report.end_time - fuzzing_report.start_time:.2f}s"
)
log.minor_info(f"Coverage testing", status=f"{fuzzing_config.coverage_testing}")
log.minor_info("Coverage testing", status=f"{fuzzing_config.coverage_testing}")
log.increase_indent()
if fuzzing_config.coverage_testing:
log.minor_info(
f"Program executions for coverage testing", status=f"{fuzzing_report.cov_execs}"
"Program executions for coverage testing", status=f"{fuzzing_report.cov_execs}"
)
log.minor_info(
f"Program executions for performance testing", status=f"{fuzzing_report.perun_execs}"
"Program executions for performance testing", status=f"{fuzzing_report.perun_execs}"
)
log.minor_info(
f"Total program tests",
"Total program tests",
status=f"{fuzzing_report.perun_execs + fuzzing_report.cov_execs}",
)
log.minor_info(f"Maximum coverage ratio", status=f"{fuzzing_report.max_cov}")
log.minor_info("Maximum coverage ratio", status=f"{fuzzing_report.max_cov}")
else:
log.minor_info(
f"Program executions for performance testing", status=f"{fuzzing_report.perun_execs}"
"Program executions for performance testing", status=f"{fuzzing_report.perun_execs}"
)
log.decrease_indent()
log.minor_info(f"Founded degradation mutations", status=f"{fuzzing_report.degradations}")
log.minor_info(f"Hangs", status=f"{fuzzing_report.hangs}")
log.minor_info(f"Faults", status=f"{fuzzing_report.faults}")
log.minor_info(f"Worst-case mutation", status=f"{log.path_style(fuzzing_report.worst_case)}")
log.minor_info("Founded degradation mutations", status=f"{fuzzing_report.degradations}")
log.minor_info("Hangs", status=f"{fuzzing_report.hangs}")
log.minor_info("Faults", status=f"{fuzzing_report.faults}")
log.minor_info("Worst-case mutation", status=f"{log.path_style(fuzzing_report.worst_case)}")
print_legend(rule_set)


4 changes: 2 additions & 2 deletions perun/utils/common/cli_kit.py
Original file line number Diff line number Diff line change
@@ -486,7 +486,7 @@ def lookup_any_profile_callback(_: click.Context, __: click.Argument, value: str
return profile_from_index

log.minor_info(f"file '{value}'", status=f"{log.failed_highlight('not found in index')}")
log.minor_info(f"Checking filesystem.", end="\n")
log.minor_info("Checking filesystem.", end="\n")
# 2) Else lookup filenames and load the profile
abs_path = lookup_profile_in_filesystem(value)
if not os.path.exists(abs_path):
@@ -780,7 +780,7 @@ def split_requirement(requirement: str) -> str:

with open(dump_file, "w") as dump_handle:
dump_handle.write(output)
log.minor_info(f"Saved dump", status=f"{log.path_style(dump_file)}")
log.minor_info("Saved dump", status=f"{log.path_style(dump_file)}")


def set_optimization(_: click.Context, param: click.Argument, value: str) -> str:
4 changes: 2 additions & 2 deletions perun/utils/common/script_kit.py
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ def template_name_filter(template_name: str) -> bool:
successfully_created_files.append(os.path.join(perun_dev_dir, template_type, "../__init__.py"))
if template_type in ("postprocess", "collect", "view"):
successfully_created_files.append(os.path.join(perun_dev_dir, "utils", "../__init__.py"))
log.minor_info(f"New module has to be registered at", end=":\n")
log.minor_info("New module has to be registered at", end=":\n")
log.increase_indent()
log.minor_info(log.path_style(f"{os.path.join(template_type, '__init.py')}"), end="\n")
log.minor_info(log.path_style(f"{os.path.join('utils', '__init.py')}"), end="\n")
@@ -104,7 +104,7 @@ def template_name_filter(template_name: str) -> bool:
# Unless specified in other way, open all of the files in the w.r.t the general.editor key
if not no_edit:
editor = config.lookup_key_recursively("general.editor")
log.minor_info(f"Opening the files in", status=f"{log.cmd_style(editor)}")
log.minor_info("Opening the files in", status=f"{log.cmd_style(editor)}")
try:
commands.run_external_command([editor] + successfully_created_files[::-1])
except Exception as inner_exception: