From ba6939e99912cdc498949a31d01f9745ee45804d Mon Sep 17 00:00:00 2001
From: Mathieu Courtois <mathieu.courtois@edf.fr>
Date: Tue, 24 Dec 2024 07:17:19 +0100
Subject: [PATCH] [#34305] cancel if c4che infos are not provided

---
 lib/hgaster/hooks/codeaster.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/hgaster/hooks/codeaster.py b/lib/hgaster/hooks/codeaster.py
index 59f96f0..9f4a510 100644
--- a/lib/hgaster/hooks/codeaster.py
+++ b/lib/hgaster/hooks/codeaster.py
@@ -134,6 +134,9 @@ def run_ctest_minimal(repopath):
         target = "debug"
     wafc4che = osp.join(builddir, "c4che", target + "_cache.py")
     c4che = read_waf_parameters(wafc4che)
+    if not c4che:
+        logger.warning("Can not find installation directory. Cancelled.")
+        return OK
     run_ctest = Path(c4che["BINDIR"]) / "run_ctest"
 
     logger.info("NB: This version will be used: %s", run_ctest)
-- 
GitLab