# directories not considered as test grids
C_IGNORE_GRIDS = ['.git', '.svn', 'RESSOURCES']
+DEFAULT_TIMEOUT = 150
+
# Get directory to be used for the temporary files.
#
def getTmpDirDEFAULT():
cmd = cmd % { 'user': user,
'base': testbase_base,
'dir': testbase_name }
-
+
+ # Get the application environment
+ self.logger.write(_("Set the application environment\n"), 5)
+ env_appli = src.environment.SalomeEnviron(self.config,
+ src.environment.Environ(dict(os.environ)))
+ env_appli.set_application_env(self.logger)
+
self.logger.write("> %s\n" % cmd, 5)
if src.architecture.is_windows():
# preexec_fn not supported on windows platform
shell=True,
preexec_fn=set_signal,
stdout=self.logger.logTxtFile,
- stderr=subprocess.PIPE)
+ stderr=subprocess.PIPE,
+ env=env_appli.environ.environ,)
if res != 0:
raise src.SatException(_("Error: unable to get test base '%(nam"
test_base_info.info.base,
self.config.APPLICATION.test_base.tag)
elif test_base_info.get_sources == "svn":
- svn_user = src.get_cfg_param(test_base_info.svn_info,
+ svn_user = src.get_cfg_param(test_base_info.info,
"svn_user",
self.config.USER.svn_user)
self.prepare_testbase_from_svn(svn_user,
launcherDir = os.path.dirname(self.launcher)
if launcherName == 'runAppli':
# Old application
- cmd = "for i in " + launcherDir + "/env.d/*.sh; do source ${i};"
- " done ; echo $KERNEL_ROOT_DIR"
+ cmd = ("for i in " + launcherDir + "/env.d/*.sh; do source ${i};"
+ " done ; echo $KERNEL_ROOT_DIR")
else:
# New application
cmd = ("echo -e 'import os\nprint os.environ[\"KERNEL_" +
# Case where SALOME has NOT the launcher that uses the SalomeContext API
if VersionSalome < 730:
- binSalome = os.path.join(self.config.APPLI.grid_appli_install_dir,
+ binSalome = os.path.join(self.config.APPLICATION.workdir,
appdir,
"runAppli")
binPython = "python"
return binSalome, binPython, killSalome
# Case where SALOME has the launcher that uses the SalomeContext API
- if VersionSalome >= 730:
- if 'profile' not in self.config.APPLICATION:
- # Before revision of application concept
- launcher_name = self.config.APPLI.launch_alias_name
- binSalome = os.path.join(self.config.APPLICATION.workdir,
- appdir,
- launcher_name)
- else:
- # After revision of application concept
- launcher_name = self.config.APPLICATION.profile.launcher_name
- binSalome = os.path.join(self.config.APPLICATION.workdir,
- launcher_name)
+ else:
+ launcher_name = src.get_launcher_name(config)
+ binSalome = os.path.join(self.config.APPLICATION.workdir,
+ launcher_name)
- if src.architecture.is_windows():
- binSalome += '.bat'
-
binPython = binSalome + ' shell'
killSalome = binSalome + ' killall'
return binSalome, binPython, killSalome
self.currentsession)
sessionname = "%s/%s" % (self.currentgrid, self.currentsession)
time_out = self.get_test_timeout(sessionname,
- self.config.SITE.test.timeout)
+ DEFAULT_TIMEOUT)
- time_out_salome = src.get_cfg_param(self.config.SITE.test,
- "timeout_app",
- self.config.SITE.test.timeout)
+ time_out_salome = DEFAULT_TIMEOUT
# generate wrapper script
script_path = os.path.join(out_path, 'wrapperScript.py')
self.settings.clear()
# read known failures pyconf
- if "testerror" in self.config.SITE:
+ if "testerror" in self.config.LOCAL:
#import testerror
#self.known_errors = testerror.read_test_failures(
# self.config.TOOLS.testerror.file_path,