From 3071d63b1a056c291cb353a7ad2ee9ff7c7874ee Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Sun, 18 May 2025 08:23:45 +0200 Subject: [PATCH] implemented wait build handler. does nothing but waits 1 second for compilation and testing --- src/utils/handlers.py | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/utils/handlers.py b/src/utils/handlers.py index 96f4d72..48ca468 100644 --- a/src/utils/handlers.py +++ b/src/utils/handlers.py @@ -580,6 +580,50 @@ def get_coverage_for_file(xml_file: str, target_fully_qualified_class: str, base return -1 +class WaitBuildHander(BuildHandler): + def compile_repo(self) -> None: + time.sleep(1) + + def test_repo(self) -> None: + time.sleep(1) + + def get_type(self) -> str: + ... + + def compile_cmd(self) -> str: + ... + + def test_cmd(self) -> str: + ... + + def extract_test_numbers(self, output: str) -> None: + ... + + def clean_cmd(self) -> str: + ... + + def inject_changes(self, changes: dict[str, str]): + ... + + def generate_coverage_report_cmd(self) -> str: + ... + + def get_jacoco_report_paths(self) -> Iterable[str]: + ... + + def container_name(self) -> str: + ... + + def _try_to_inject_jacoco(self, build_file_path: str) -> None: + ... + + def __enter__(self): + ... + + def __exit__(self, *args): + ... + + def get_build_handler(root: str, repo: str, verbose: bool = False) -> BuildHandler: """ Get a BuildHandler for a repository, where `repo` .tar.gz/.tgz file in @@ -589,6 +633,7 @@ def get_build_handler(root: str, repo: str, verbose: bool = False) -> BuildHandl an instance of GradleHandler or MavenHandler """ path = os.path.join(root, repo) + return WaitBuildHander("NO REPO PATH", "NO BUILD FILE", {}) # 1) If it's a tarball, extract it if os.path.isfile(path) and tarfile.is_tarfile(path):