def __init__(self,
config,
logger,
+ product_name,
product_info,
options = src.options.OptResult(),
check_src=True):
self.config = config
self.logger = logger
self.options = options
+ self.product_name = product_name
self.product_info = product_info
self.build_dir = src.Path(self.product_info.build_dir)
self.source_dir = src.Path(self.product_info.source_dir)
##
# 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
# add products in depend and opt_depend list recursively
environ_info = src.product.get_product_dependencies(self.config,
+ self.product_name,
self.product_info)
#environ_info.append(self.product_info.name)
self.build_environ.silent = (self.config.USER.output_verbose_level < 5)
self.build_environ.set_full_environ(self.logger, environ_info)
+ if add_env_launch:
# create runtime environment
- self.launch_environ = src.environment.SalomeEnviron(self.config,
+ 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)
+ 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)
# in order for the compilation script to take it into account
if src.product.product_is_hpc(self.product_info):
self.build_environ.set("SAT_HPC", "1")
+ if self.debug_mode:
+ self.build_environ.set("SAT_DEBUG", "1")
+ if self.verbose_mode:
+ self.build_environ.set("SAT_VERBOSE", "1")
+
def do_batch_script_build(self, script, nb_proc):