Skip to content

Commit

Permalink
Merge pull request #14 from jpopelka/custom-results
Browse files Browse the repository at this point in the history
We need a list of dicts, not a dict
  • Loading branch information
jpopelka authored Dec 18, 2023
2 parents 74e8145 + 70f5c08 commit d961339
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions rpmdeplint_runner/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,13 @@ def save_results_and_exit(
tmt_exit_code: TmtExitCodes, log_name: Optional[str] = None
) -> None:
if getenv("TMT_TEST_DATA"):
results = {
"name": "/rpmdeplint",
"result": TmtResult.from_exit_code(tmt_exit_code).value,
"log": ["../output.txt", log_name] if log_name else ["../output.txt"],
}
results = [
{
"name": "/rpmdeplint",
"result": TmtResult.from_exit_code(tmt_exit_code).value,
"log": ["../output.txt", log_name] if log_name else ["../output.txt"],
}
]
with open(f"{getenv('TMT_TEST_DATA')}/results.yaml", "w") as file:
yaml.dump(results, file)
sys.exit(0)
Expand Down

0 comments on commit d961339

Please sign in to comment.