Skip to content

Commit

Permalink
ci: This PR is to trigger periodic CI testing
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 9, 2023
1 parent a4bd034 commit 881ab80
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions tests/callback_plugins/dump_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,19 @@ def __init__(self, *args, **kwargs):
def v2_runner_on_ok(self, result):
fields = result._task_fields
if fields["action"] == "package" and fields["args"].get("state") != "absent":
if isinstance(fields["args"]["name"], list):
packages = " ".join(fields["args"]["name"])
else:
packages = fields["args"]["name"]
self._display.display("lsrpackages: " + packages)
packages = set()
if "invocation" in result._result:
results = [result._result]
elif "results" in result._result and isinstance(
result._result["results"], list
):
results = result._result["results"]
for item in results:
pkgs = item["invocation"]["module_args"]["name"]
if isinstance(pkgs, list):
for ii in pkgs:
packages.add(ii)
else:
packages.add(pkgs)

self._display.display("lsrpackages: " + " ".join(sorted(list(packages))))

0 comments on commit 881ab80

Please sign in to comment.