From bbed3558d3200b39a0dd56939424fbb6d0b4a162 Mon Sep 17 00:00:00 2001 From: crouzet Date: Thu, 21 Oct 2021 13:44:51 +0200 Subject: [PATCH] evite la construction de l'environnement launch, saus pour la commande sat check --- commands/check.py | 2 +- src/compilation.py | 15 ++++++++------- src/environment.py | 6 ------ 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/commands/check.py b/commands/check.py index ffb31af..366a137 100644 --- a/commands/check.py +++ b/commands/check.py @@ -137,7 +137,7 @@ def check_product(p_name_info, config, logger): # Prepare the environment log_step(logger, header, "PREPARE ENV") - res_prepare = builder.prepare() + res_prepare = builder.prepare(add_env_launch=True) log_res_step(logger, res_prepare) len_end_line = 20 diff --git a/src/compilation.py b/src/compilation.py index 210eb52..e9eb26f 100644 --- a/src/compilation.py +++ b/src/compilation.py @@ -73,7 +73,7 @@ class Builder: ## # Prepares the environment. # Build two environment: one for building and one for testing (launch). - def prepare(self): + def prepare(self, add_env_launch=False): if not self.build_dir.exists(): # create build dir @@ -96,12 +96,13 @@ class Builder: self.build_environ.silent = (self.config.USER.output_verbose_level < 5) self.build_environ.set_full_environ(self.logger, environ_info) - # create runtime environment - self.launch_environ = src.environment.SalomeEnviron(self.config, - src.environment.Environ(dict(os.environ)), - False) - self.launch_environ.silent = True # no need to show here - self.launch_environ.set_full_environ(self.logger, environ_info) + if add_env_launch: + # create runtime environment + self.launch_environ = src.environment.SalomeEnviron(self.config, + src.environment.Environ(dict(os.environ)), + False) + self.launch_environ.silent = True # no need to show here + self.launch_environ.set_full_environ(self.logger, environ_info) for ee in C_COMPILE_ENV_LIST: vv = self.build_environ.get(ee) diff --git a/src/environment.py b/src/environment.py index 8da1705..3bf34cb 100644 --- a/src/environment.py +++ b/src/environment.py @@ -639,12 +639,6 @@ class SalomeEnviron: logger.write("licence file found for product %s : %s\n" % (pi.name, licence_file_name), 5) self.set("LICENCE_FILE", licence_file_name) - # these infos may be needed for the environment of some products - if "debug" in pi and pi.debug == "yes": - self.set("SAT_DEBUG", "1") - if "verbose" in pi and pi.verbose == "yes": - self.set("SAT_VERBOSE", "1") - if src.product.product_is_cpp(pi): # set a specific environment for cpp modules self.set_salome_minimal_product_env(pi, logger) -- 2.39.2