write_step(logger, _("Creating environment files"))
status = src.KO_STATUS
+
+ VersionSalome = src.get_salome_version(config)
+ if VersionSalome>=820:
+ # for salome 8+ we use a salome context file for the virtual app
+ app_shell="cfg"
+ env_ext="cfg"
+ else:
+ app_shell="bash"
+ env_ext="sh"
+
try:
import environ
# generate only shells the user wants (by default bash, csh, batch)
# with the current system.
environ.write_all_source_files(config,
logger,
+ shells=[app_shell],
silent=True)
status = src.OK_STATUS
finally:
logger.write(src.printcolors.printc(status) + "\n", 2, False)
# build the application (the name depends upon salome version
- # for salome 8 we use a salome context file
- VersionSalome = src.get_salome_version(config)
- env_ext="cfg" if VersionSalome>=820 else "sh"
- env_file = os.path.join(config.APPLICATION.workdir, "env_launch.cfg")
+ env_file = os.path.join(config.APPLICATION.workdir, "env_launch." + env_ext)
write_step(logger, _("Building application"), level=2)
cf = create_config_file(config, l_SALOME_modules, env_file, logger)
'''
(options, args) = parse_option(args, runner.cfg)
+ # the test base is specified either by the application, or by the --base option
with_application = False
if runner.cfg.VARS.application != 'None':
logger.write(_('Running tests on application %s\n') %
raise src.SatException(_('A test base is required. Use the --base '
'option'))
+ # the launcher is specified either by the application, or by the --launcher option
if with_application:
# check if environment is loaded
if 'KERNEL_ROOT_DIR' in os.environ:
lib_path = os.path.join(envcompo_root_dir, 'lib', 'salome')
l_binpath_libpath.append( (bin_path, lib_path) )
- bin_path = os.path.join(env_root_dir, 'bin', 'salome')
if src.get_property_in_product_cfg(pi, "fhs"):
lib_path = os.path.join(env_root_dir, 'lib')
pylib1_path = os.path.join(env_root_dir, self.python_lib0)
pylib2_path = os.path.join(env_root_dir, self.python_lib1)
+ bin_path = os.path.join(env_root_dir, 'bin')
else:
lib_path = os.path.join(env_root_dir, 'lib', 'salome')
pylib1_path = os.path.join(env_root_dir, self.python_lib0, 'salome')
pylib2_path = os.path.join(env_root_dir, self.python_lib1, 'salome')
+ bin_path = os.path.join(env_root_dir, 'bin', 'salome')
# Construct the paths to prepend to PATH and LD_LIBRARY_PATH and
# PYTHONPATH