]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
Remove from site.pyconf the test variables
authorSRE <serge.rehbinder@cea.fr>
Wed, 24 May 2017 08:32:52 +0000 (10:32 +0200)
committerSRE <serge.rehbinder@cea.fr>
Wed, 24 May 2017 08:32:52 +0000 (10:32 +0200)
commands/package.py
commands/test.py
src/test_module.py

index c2d0d4789397c51db7fbf561d33c087d9dee99b2..aa49bb5086df8766bd3cbbd97430c0ce4c6b4b62 100644 (file)
@@ -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 :
index b0df42ed86a19fc729e22137e5ac6e87691b3bcd..393d7ba4d9bbe08a2bab2ec86ab9fd7060bf871e 100644 (file)
@@ -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
index fe9d7d704b4f9db8dfdac510a4aaba11b7384272..56c2e0a9ac4be30ed07adebf37db9cf072b5e457 100644 (file)
@@ -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')