From: SRE Date: Wed, 24 May 2017 08:32:52 +0000 (+0200) Subject: Remove from site.pyconf the test variables X-Git-Tag: V8_3_0rc1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=580ea287761291a015b3062932ea8e3338d07200;p=tools%2Fsat.git Remove from site.pyconf the test variables --- diff --git a/commands/package.py b/commands/package.py index c2d0d47..aa49bb5 100644 --- a/commands/package.py +++ b/commands/package.py @@ -68,12 +68,6 @@ SITE : { log_dir : $USER.workdir + "/LOGS" } - test :{ - tmp_dir_with_application : '/tmp' + $VARS.sep + $VARS.user + """ -"""$VARS.sep + $APPLICATION.name + $VARS.sep + 'test' - tmp_dir : '/tmp' + $VARS.sep + $VARS.user + $VARS.sep + 'test' - timeout : 150 - } } PROJECTS : diff --git a/commands/test.py b/commands/test.py index b0df42e..393d7ba 100644 --- a/commands/test.py +++ b/commands/test.py @@ -590,9 +590,12 @@ def run(args, runner, logger): # initialization ################# if with_application: - tmp_dir = runner.cfg.SITE.test.tmp_dir_with_application + tmp_dir = os.path.join(runner.cfg.VARS.tmp_root, + runner.cfg.APPLICATION.name, + "test") else: - tmp_dir = runner.cfg.SITE.test.tmp_dir + tmp_dir = os.path.join(runner.cfg.VARS.tmp_root, + "test") # remove previous tmp dir if os.access(tmp_dir, os.F_OK): @@ -653,7 +656,7 @@ def run(args, runner, logger): src.printcolors.print_value(logger, _('Display'), os.environ['DISPLAY'], 2) src.printcolors.print_value(logger, _('Timeout'), - runner.cfg.SITE.test.timeout, 2) + src.test_module.DEFAULT_TIMEOUT, 2) src.printcolors.print_value(logger, _("Working dir"), base_dir, 3) # create the test object diff --git a/src/test_module.py b/src/test_module.py index fe9d7d7..56c2e0a 100644 --- a/src/test_module.py +++ b/src/test_module.py @@ -40,6 +40,8 @@ import src # 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(): @@ -560,11 +562,11 @@ class Test: 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) + DEFAULT_TIMEOUT) # generate wrapper script script_path = os.path.join(out_path, 'wrapperScript.py')