From 1bd822af0b3d6c4bf857df0eb0f57afc2b42c71e Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Thu, 20 Mar 2025 09:50:27 +0100 Subject: [PATCH] for maven (and prolly would work with gradle), now yielding any file called 'jacoco.xml' --- handlers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/handlers.py b/handlers.py index 6c65f86..d180e00 100644 --- a/handlers.py +++ b/handlers.py @@ -204,8 +204,11 @@ class MavenHandler(BuildHandler): self.updates["n_tests_passed"] += (tests_run - (failures + errors)) # Calculate passed tests def get_jacoco_report_paths(self) -> Iterable[str]: - yield os.path.join(self.path, "target/site/jacoco-aggregate/jacoco.xml") - + # yield os.path.join(self.path, "target/site/jacoco-aggregate/jacoco.xml") + for root, _, files in os.walk(os.path.join(self.path, "target", "site")): + for file in files: + if file == "jacoco.xml": + yield os.path.join(root, file) class GradleHandler(BuildHandler): def __init__(self, repo_path: str, build_file: str, updates: dict) -> None: super().__init__(repo_path, build_file, updates)