Skip to content

Commit

Permalink
group reports
Browse files Browse the repository at this point in the history
  • Loading branch information
ericLemanissier committed Apr 25, 2024
1 parent ceacaca commit 2f1a8ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions hooks/conan-center.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,9 +964,9 @@ def test(out):
patch_file_name = patch_file_name[8:]
if patch_file_name in unused_patches:
unused_patches.remove(patch_file_name)
for patch in unused_patches:
out.error(f"Following patch file is not referenced in conandata.yml: patches/{patch}")
if unused_patches:
patches_str = ", ".join(f"patches/{patch}" for patch in unused_patches)
out.error(f"Following patch file(s) are/is not referenced in conandata.yml: {patches_str}")


@raise_if_error_output
Expand Down
4 changes: 2 additions & 2 deletions tests/test_hooks/conan-center/test_conan-center.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,12 +1258,12 @@ def test_dangling_patches(self):

tools.save(os.path.join("all", "conandata.yml"), content=conandata)
output = self.conan(['export', 'all', 'name/version@user/test'])
self.assertNotIn("Following patch file is not referenced in conandata.yml",
self.assertNotIn("Following patch file(s) are/is not referenced in conandata.yml",
output)

tools.save(os.path.join("all", "patches", "patch.diff"), content="")
output = self.conan(['export', 'all', 'name/version@user/test'])
self.assertIn("Following patch file is not referenced in conandata.yml: patches/patch.diff",
self.assertIn("Following patch file(s) are/is not referenced in conandata.yml: patches/patch.diff",
output)


0 comments on commit 2f1a8ec

Please sign in to comment.