From 576310ef2c8bbb38d1ad6b735b84d3da91899e80 Mon Sep 17 00:00:00 2001 From: crouzet Date: Wed, 17 Apr 2019 13:22:53 +0200 Subject: [PATCH] =?utf8?q?ajout=20d'une=20balise=20check=5Finstall=20pour?= =?utf8?q?=20v=C3=A9rifier=20la=20bonne=20installation=20de=20fichiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/compilation.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/compilation.py b/src/compilation.py index 4da9566..3fa13ee 100644 --- a/src/compilation.py +++ b/src/compilation.py @@ -302,12 +302,30 @@ CC=\\"hack_libtool\\"%g" libtool''' stdout=self.logger.logTxtFile, stderr=subprocess.STDOUT) + res_check=self.check_install() + if res_check > 0 : + self.log_command("Error in sat check install - some files are not installed!") self.put_txt_log_in_appli_log_dir("makeinstall") + + res+=res_check if res == 0: return res else: return 1 + def check_install(self): + res=0 + if "check_install" in self.product_info: + self.log_command("Check installation of files") + for f in self.product_info.check_install: + complete_path=os.path.join(self.product_info.install_dir, f) + self.log_command(" -> check %s" % complete_path) + if os.path.isfile(complete_path) == False : + res+=1 + self.logger.write("Error, sat check install failed for file %s\n" % complete_path, 1) + self.log_command("Error, sat check install failed for file %s" % complete_path) + return res + ## # Runs 'make_check'. def check(self, command=""): @@ -460,7 +478,12 @@ CC=\\"hack_libtool\\"%g" libtool''' cwd=str(self.build_dir), env=self.build_environ.environ.environ) + res_check=self.check_install() + if res_check > 0 : + self.log_command("Error in sat check install - some files are not installed!") + self.put_txt_log_in_appli_log_dir("script") + res += res_check if res == 0: return res else: -- 2.39.2