Salome HOME
Merge remote branch 'origin/V7_dev'
authorvsr <vsr@opencascade.com>
Thu, 14 Apr 2016 07:29:11 +0000 (10:29 +0300)
committervsr <vsr@opencascade.com>
Thu, 14 Apr 2016 07:29:11 +0000 (10:29 +0300)
54 files changed:
CMakeLists.txt
CTestTestfileInstall.cmake.in
SalomeKERNELConfig.cmake.in
bin/CMakeLists.txt
bin/PortManager.py
bin/appli_clean.sh
bin/appli_gen.py
bin/appliskel/CMakeLists.txt
bin/appliskel/runAppli [deleted file]
bin/appliskel/runConsole [deleted file]
bin/appliskel/runSalomeScript [deleted file]
bin/appliskel/runSession [deleted file]
bin/appliskel/tests/concurrentSession/CTestTestfileInstall.cmake
bin/appliskel/tests/salomeCommand/CTestTestfileInstall.cmake
bin/appliskel/tests/salomeInstance/CTestTestfileInstall.cmake
bin/runSalome [deleted file]
bin/runTests.py
bin/salomeContext.py
bin/searchFreePort.py
doc/salome/main.dox
doc/salome/running_salome.dox [changed mode: 0755->0644]
doc/salome/salome_application.dox
doc/salome/salome_command.dox
idl/SALOME_Launcher.idl
salome_adm/cmake_files/CMakeLists.txt
salome_adm/cmake_files/SalomeSetupPlatform.cmake
salome_adm/cmake_files/deprecated/am2cmake.py
src/AppQuickStart/app-template/CMakeLists.txt
src/AppQuickStart/app-template/src/resources/CMakeLists.txt
src/Basics/Basics_Utils.hxx
src/KernelHelpers/Test/CTestTestfileInstall.cmake
src/Launcher/BatchTest.cxx
src/Launcher/Launcher_Job_YACSFile.cxx
src/Launcher/Launcher_Job_YACSFile.hxx
src/Launcher/Test/CTestTestfileInstall.cmake
src/Launcher/Test/test_launcher.py
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx
src/LifeCycleCORBA/Test/CTestTestfileInstall.cmake
src/LifeCycleCORBA_SWIG/Test/CMakeLists.txt
src/LifeCycleCORBA_SWIG/Test/CTestTestfileInstall.cmake
src/LifeCycleCORBA_SWIG/Test/testcontainermanager.py
src/NamingService/Test/CTestTestfileInstall.cmake
src/SALOMEDS/Test/CTestTestfileInstall.cmake
src/SALOMEDS/Test/SALOMEDSTest_AttributeComment.cxx
src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx
src/SALOMEDS/Test/SALOMEDSTest_Study.cxx
src/SALOMEDS/Test/SALOMEDSTest_StudyManager.cxx
src/SALOMEDS/Test/TestSALOMEDS.cxx
src/SALOMEDSImpl/Test/CTestTestfileInstall.cmake
src/SALOMELocalTrace/Test/CTestTestfileInstall.cmake
src/SALOMESDS/CTestTestfileInstall.cmake
src/SALOMETraceCollector/Test/CTestTestfileInstall.cmake
src/UnitTests/CTestTestfileInstall.cmake
src/Utils/Test/CTestTestfileInstall.cmake

index 6721f74e260433293cc02d16ae366fb202ffaca9..166c73b4a1175bec033966cb3b2db2f18d6a858f 100755 (executable)
@@ -29,8 +29,8 @@ CMAKE_POLICY(SET CMP0003 NEW)
 # Project name, upper case
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
-SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 7)
+SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 0)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
@@ -60,12 +60,11 @@ OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF)
 OPTION(SALOME_USE_LIBBATCH "Use LibBatch in KERNEL" OFF)
 CMAKE_DEPENDENT_OPTION(SALOME_PACO_PARALLEL "Build with PACO (implies SALOME_USE_MPI)" OFF
                        "NOT SALOME_LIGHT_ONLY" OFF)
-OPTION(SALOME_USE_PORTMANAGER "Add PortManager support" ON)
 CMAKE_DEPENDENT_OPTION(SALOME_USE_MPI "Use MPI containers" OFF
                        "NOT SALOME_PACO_PARALLEL" ON)
 CMAKE_DEPENDENT_OPTION(SALOME_USE_MPI "Use MPI containers" ${SALOME_USE_MPI}
                        "NOT SALOME_LIGHT_ONLY" OFF)
-MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_LIBBATCH SALOME_PACO_PARALLEL SALOME_USE_PORTMANAGER)
+MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_LIBBATCH SALOME_PACO_PARALLEL)
 
 # Required prerequisites
 #   Find "big" prerequisites first - they reference themselves many others
@@ -104,9 +103,6 @@ ENDIF()
 IF(SALOME_PACO_PARALLEL)
   FIND_PACKAGE(SalomePaco REQUIRED)
 ENDIF()
-IF(SALOME_USE_PORTMANAGER)
-  ADD_DEFINITIONS(-DWITH_PORTMANAGER)
-ENDIF()
 IF(SALOME_BUILD_TESTS)
   ENABLE_TESTING()
   FIND_PACKAGE(SalomeCppUnit)
index 4136a32bc045889d9aad3b012711d4dd47895ce3..254fb82f1e3e0701a287b3998271dfd3eaefcc2d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -21,7 +21,7 @@
 SET(SALOME_TEST_DRIVER "@CMAKE_INSTALL_PREFIX@/bin/salome/appliskel/salome_test_driver.py")
 
 SET(COMPONENT_NAME KERNEL)
-SET(TIMEOUT        500)
+SET(TIMEOUT        200)
 
 SET(KERNEL_TEST_LIB "@CMAKE_INSTALL_PREFIX@/@KERNEL_TEST_LIB@")
 
index 199308d3c424b680791dfbfb48621f56580cb3e3..463578ff99636b970b21957b02a7a3b22cad5ddb 100644 (file)
@@ -67,11 +67,6 @@ SET(SALOME_KERNEL_BUILD_TESTS @SALOME_BUILD_TESTS@)
 SET(SALOME_KERNEL_LIGHT_ONLY  @SALOME_LIGHT_ONLY@)
 SET(SALOME_USE_LIBBATCH       @SALOME_USE_LIBBATCH@)
 
-SET(SALOME_USE_PORTMANAGER     @SALOME_USE_PORTMANAGER@)
-IF(SALOME_USE_PORTMANAGER)
-  LIST(APPEND KERNEL_DEFINITIONS "-DWITH_PORTMANAGER")
-ENDIF()
-
 # Prerequisites:
 IF(SALOME_KERNEL_BUILD_TESTS)
   SET_AND_CHECK(CPPUNIT_ROOT_DIR_EXP  "@PACKAGE_CPPUNIT_ROOT_DIR@")
index b8e97065a6e1cbc3fa1291b33d01a1d9a516a42b..587e841fda1a987fc310657d622d7ff22366d8fd 100755 (executable)
@@ -44,7 +44,7 @@ SET(SCRIPTS
   orbmodule.py
   ORBConfigFile.py
   parseConfigFile.py
-  runSalome
+  PortManager.py
   runSalome.py
   runSession.py
   runConsole.py
@@ -64,11 +64,4 @@ SET(SCRIPTS
   waitNS.py
   )
 
-IF(SALOME_USE_PORTMANAGER)
-  SET(PORTMANAGER_SCRIPTS
-    PortManager.py
-    )
-  LIST(APPEND SCRIPTS ${PORTMANAGER_SCRIPTS})
-ENDIF()
-
 SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_SCRIPTS})
index 999166106bffc0923c2fdc7760553b431d2b28b5..d324bdebc4735bc13a51c005f599dc942b3f649f 100644 (file)
@@ -44,7 +44,7 @@ def createLogger():
 logger = createLogger()
 
 #------------------------------------
-# A file locker (Linux only)
+# A file locker
 def __acquire_lock(lock):
   if sys.platform == "win32":
     import msvcrt
@@ -62,6 +62,7 @@ def __release_lock(lock):
     import fcntl
     fcntl.flock(lock, fcntl.LOCK_UN)
 #
+#------------------------------------
 
 def _getConfigurationFilename():
   omniorbUserPath = os.getenv("OMNIORB_USER_PATH")
@@ -89,7 +90,10 @@ def __isNetworkConnectionActiveOnPort(port):
   #        netstat options -l and -t are unavailable
   #        grep command is unavailable
   from subprocess import Popen, PIPE
-  stdout, _ = Popen(['netstat','-an'], stdout=PIPE).communicate()
+  if sys.platform == "win32":
+    stdout, _ = Popen(['netstat','-a','-n','-p tcp'], stdout=PIPE).communicate()
+  else:
+    stdout, _ = Popen(['netstat','-ant'], stdout=PIPE).communicate()
   import StringIO
   buf = StringIO.StringIO(stdout)
   ports = buf.readlines()
@@ -102,6 +106,7 @@ def __isNetworkConnectionActiveOnPort(port):
       if p == port: return True
     except:
       pass
+  return False
 #
 
 def getPort(preferedPort=None):
@@ -200,7 +205,7 @@ def releasePort(port):
     __release_lock(lock)
 
     logger.debug("released port port: %s"%str(port))
-  
+
   os.umask(oldmask)
 #
 
index 023bd64565ec7cd8430d4b306a3412305935999f..619ba1cb8ca092785f77ec45ee53cbc515c9e525 100644 (file)
@@ -23,7 +23,7 @@
 
 #clean appli
 
-DELCOM="rm -rf bin lib share doc idl env.d envd USERS getAppliPath.py runAppli runConsole runSession runRemote.sh SalomeApp.xml runSalomeScript update_catalogs.py kill_remote_containers.py salome *.pyc *~ .bashrc"
+DELCOM="rm -rf bin lib share doc idl env.d envd USERS getAppliPath.py runRemote.sh SalomeApp.xml update_catalogs.py kill_remote_containers.py salome *.pyc *~ .bashrc"
 DOIT="false"
 
 if [ $# -gt 0 ]
index 838046cb4f521a539a6e54ab4fec6c2fd7be7cf1..4c64c7a79b8a234254d55d6ee4ba961521a7ad48 100644 (file)
@@ -227,16 +227,18 @@ def install(prefix, config_file, verbose=0):
             pass
         pass
 
+    # Generate CTestCustom.cmake to handle long output
+    ctest_custom = os.path.join(home_dir, 'bin', 'salome', 'test', "CTestCustom.cmake")
+    with open(ctest_custom, 'w') as f:
+      f.write("SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1048576) # 1MB\n")
+      f.write("SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 1048576) # 1MB\n")
+
     appliskel_dir = os.path.join(home_dir, 'bin', 'salome', 'appliskel')
 
     for fn in ('envd',
                'getAppliPath.py',
                'kill_remote_containers.py',
-               'runAppli',           # OBSOLETE (replaced by salome)
-               'runConsole',         # OBSOLETE (replaced by salome)
                'runRemote.sh',
-               'runSalomeScript',    # OBSOLETE (replaced by salome)
-               'runSession',         # OBSOLETE (replaced by salome)
                'salome',
                'update_catalogs.py',
                '.bashrc',
index 8be859e644944a2eee4ba17f2eaa41bb0941d632..f3e2e73dd394c74581a616cae0e8d4941e9fd44d 100755 (executable)
@@ -28,10 +28,6 @@ ADD_SUBDIRECTORY(tests)
 SET(SCRIPTS
   envd
   runRemote.sh
-  runAppli
-  runConsole
-  runSession
-  runSalomeScript
   .bashrc
   getAppliPath.py
   update_catalogs.py
diff --git a/bin/appliskel/runAppli b/bin/appliskel/runAppli
deleted file mode 100755 (executable)
index 14a6405..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-
-###############################################
-############### IMPORTANT NOTE ################
-###############################################
-# The runAppli script is obsolete.           #
-# Please consider the new salome launcher.    #
-###############################################
-
-
-#APPLI_HOME=`dirname $0`
-APPLI_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
-
-export APPLI=`${APPLI_HOME}/getAppliPath.py`
-
-# --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
-
-. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
-
-#export OMNIORB_USER_PATH="${HOME}/.salomeConfig/USERS"
-export OMNIORB_USER_PATH="${HOME}/${APPLI}/USERS"
-
-# --- if mpi lam, start lam (seems safe to be done several times)
-#     (manual stop with lamhalt)
-
-if [ "$LAMBHOST" ]; then
-  lamboot
-fi
-
-# --- run SALOME
-#    (default arguments defined in local SalomeApp.xml could be completed
-#     by arguments to this command)
-
-if [ $# -ne 0 ] ; then
-    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $*
-
-else
-    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py
-fi
diff --git a/bin/appliskel/runConsole b/bin/appliskel/runConsole
deleted file mode 100755 (executable)
index e7b4ed0..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-
-###############################################
-############### IMPORTANT NOTE ################
-###############################################
-# The runConsole script is obsolete.          #
-# Please consider the new salome launcher.    #
-###############################################
-
-
-APPLI_HOME=`dirname $0`
-
-# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
-
-export APPLI=`${APPLI_HOME}/getAppliPath.py`
-
-# --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
-
-. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
-
-#export OMNIORB_USER_PATH="${HOME}/.salomeConfig/USERS"
-export OMNIORB_USER_PATH="${HOME}/${APPLI}/USERS"
-
-# --- open a Python interpreter with SALOME environment
-
-${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python -i ${KERNEL_ROOT_DIR}/bin/salome/salomeConsole.py $*
diff --git a/bin/appliskel/runSalomeScript b/bin/appliskel/runSalomeScript
deleted file mode 100755 (executable)
index 0a3f935..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-#!/usr/bin/env python
-#  -*- coding: utf-8 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-###############################################
-############### IMPORTANT NOTE ################
-###############################################
-# The runSalomeScript script is obsolete.     #
-# Please consider the new salome launcher.    #
-###############################################
-
-import os,sys,optparse
-import socket,shutil
-import re
-
-usage="""
-        Connect to a SALOME session (local or remote) and execute a Python script with data files in argument (optional)
-
-        Usage: %prog [ options ] script
-
-          script           : The Python script to execute in the SALOME session
-
-        SALOME SESSION
-        --------------
-        If PORT and MACHINE are not given, try to connect to the last active session on the local machine
-        If PORT and MACHINE are given, try to connect to the remote session associated with PORT on MACHINE
-        If MACHINE is not given, try to connect to the session associated to PORT on the local machine
-        If PORT is not given, try to connect to the remote session associated to port 2810 on MACHINE
-
-        If MACHINE isn't localhost or hostname, USER is needed
-
-        If Salome isn't installed on the local machine, use APPLI_DIST to execute a distant session
-
-
-        INPUTS AND OUPUTS
-        -----------------
-        script is needed in all case
-        INPUT and OUTPUT are used only when Salome isn't on local machine. It defines a list of script (full path, blank separated)
-        Actions done with these two lists are :
-        - adjustment of path in a temporary script file
-        - copy of the input files and script file on the distant machine
-
-"""
-
-appli_local=os.path.realpath(os.path.dirname(__file__))
-
-def get_hostname():
-  return socket.gethostname().split('.')[0]
-
-def vararg_callback(option, opt_str, value, parser):
-  """optparse callback for variable length arguments"""
-  assert value is None
-
-  done = 0
-  value = []
-  rargs = parser.rargs
-  while rargs:
-    arg = rargs[0]
-
-    # Stop if we hit an arg like "--foo", "-a", "-fx", "--file=f",
-    # etc.  Note that this also stops on "-3" or "-3.0", so if
-    # your option takes numeric values, you will need to handle this.
-    if ((arg[:2] == "--" and len(arg) > 2) or
-        (arg[:1] == "-" and len(arg) > 1 and arg[1] != "-")):
-      break
-    else:
-      value.append(arg)
-      del rargs[0]
-
-  setattr(parser.values, option.dest, value)
-
-def parse_args():
-  """parse arguments, check validity and set defaults"""
-  parser = optparse.OptionParser(usage=usage)
-  parser.add_option('-p','--port', dest="port", default='', help="The port to connect to")
-  parser.add_option('-m','--machine', dest="machine", default='', help="The computer to connect to")
-  parser.add_option('-d','--directory', dest="directory", help="[Distant Mode] The APPLI_HOME path on the distant machine (must be used if Salome isn't on the local machine)")
-  parser.add_option('-u','--user', dest="user", default='', help="[Distant Mode] The user on the computer to connect to")
-  parser.add_option('-i','--infiles', dest="infiles", default=[], action="callback", callback=vararg_callback,
-                    help="[Distant Mode] The list of input files (blank separated) used in the Python script")
-  parser.add_option('-o','--outfiles', dest="outfiles", default=[], action="callback", callback=vararg_callback,
-                    help="[Distant Mode] The list of output files (blank separated) generated by the Python script")
-
-  args=sys.argv[1:]
-
-  script=""
-  if args:
-    script=args.pop()
-
-  options, args = parser.parse_args(args)
-
-  #check the arguments
-  if not os.path.exists(script):
-    print "ERROR: the script file is mandatory"
-    sys.exit(1)
-
-  machine=options.machine
-  port=options.port
-  user=options.user
-  infiles = options.infiles
-  outfiles = options.outfiles
-  directory=options.directory
-
-  mode="local"
-
-  if machine:
-    here=get_hostname()
-    if machine != here and machine != "localhost":
-      #SALOME server is on a remote computer
-      mode="remote"
-
-      if not user:
-        print "ERROR: the remote execution needs -u user argument"
-        sys.exit(1)
-
-      if not os.path.exists(os.path.join(appli_local,"runSession")):
-        if not directory:
-          print "ERROR: the remote execution without SALOME installation needs -d directory argument"
-          sys.exit(1)
-
-  return mode,user,machine,port,directory,infiles,outfiles,script
-
-def copy_files(user,machine,script,infiles,outfiles,directory):
-  """modify script, copy files to remote computer and return lists of copied files"""
-
-  namescript=os.path.basename(script)
-  import getpass
-  logname = getpass.getuser()
-  tmp_script="/tmp/%s_%s_%s" % (logname,os.getpid(),namescript)
-  with open(script, 'r') as fscript:
-    script_text=fscript.read()
-
-  list_infiles=[]
-  list_outfiles=[]
-
-  n=0
-  for infile in infiles:
-    # generate a temporary file name
-    namefile=os.path.basename(infile)
-    tmp_file="/tmp/%s_%s_i%s_%s" % (logname,os.getpid(),n,namefile)
-
-    #modify the salome script
-    script_text = re.sub(infile,tmp_file,script_text)
-
-    # copy the infile to the remote server
-    cmd="scp %s %s@%s:%s" % (infile,user,machine,tmp_file)
-    print "[  SCP  ]",cmd
-    os.system(cmd)
-
-    list_infiles.append(tmp_file)
-    n=n+1
-
-  n=0
-  for outfile in outfiles:
-    # generate a temporary file name
-    namefile=os.path.basename(outfile)
-    tmp_file="/tmp/%s_%s_o%s_%s" % (logname,os.getpid(),n,namefile)
-
-    #modify the salome script
-    script_text = re.sub(outfile,tmp_file,script_text)
-
-    list_outfiles.append(tmp_file)
-    n=n+1
-
-  with open(tmp_script,'w') as fscript:
-    fscript.write(script_text)
-
-  if directory:
-    #copy the salome script on the remote server
-    cmd="scp %s %s@%s:%s" % (tmp_script,user,machine,tmp_script)
-    print "[  SCP  ]",cmd
-    os.system(cmd)
-
-  return list_infiles, list_outfiles, tmp_script
-
-def main():
-
-  mode,user,machine,port,directory,infiles,outfiles,script = parse_args()
-
-  tmp_script=script
-
-  if mode == "remote":
-    list_infiles, list_outfiles, tmp_script = copy_files(user,machine,script,infiles,outfiles,directory)
-
-  #################################################
-  #          Execution                            #
-  #################################################
-  if mode == "remote":
-    print "[ REMOTE ]"
-
-    # execute runSession from the remote SALOME application
-    cmd="ssh %s@%s %s/runSession " % (user,machine,directory)
-    if port:
-      cmd=cmd+"-p %s "%port
-    cmd = cmd +"python " + tmp_script
-    print '[  SSH   ] ' + cmd
-    os.system(cmd)
-
-  else:
-    print "[ LOCAL ]"
-
-    # execute runSession from the local SALOME application
-    cmd="%s/runSession " % appli_local
-    if machine:
-      cmd=cmd+"-m %s "%machine
-    if port:
-      cmd=cmd+"-p %s "%port
-    cmd = cmd +"python " + tmp_script
-    print '[  SH   ] ' + cmd
-    os.system(cmd)
-
-  #################################################
-  #          Get remote files and clean           #
-  #################################################
-  if mode == "remote":
-    temp_files=list_infiles+list_outfiles+[tmp_script]
-
-    #get the outfiles
-    for outfile in outfiles:
-      remote_outfile=list_outfiles.pop(0)
-      cmd="scp %s@%s:%s %s" %(user,machine,remote_outfile,outfile)
-      print "[  SCP  ] "+cmd
-      os.system(cmd)
-
-    #clean temporary files
-    cmd="ssh %s@%s \\rm -f %s" % (user,machine," ".join(temp_files))
-    print '[  SSH   ] ' + cmd
-    os.system(cmd)
-    os.remove(tmp_script)
-
-if __name__ == '__main__':
-  main()
diff --git a/bin/appliskel/runSession b/bin/appliskel/runSession
deleted file mode 100755 (executable)
index 55abbd5..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/bin/bash
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# Useful shell to run executable progs or shells under Salome env
-# Use it with args to run a program : runSession python -i myprog.py
-# Use it without args to run an interactive shell under Salome env
-
-
-###############################################
-############### IMPORTANT NOTE ################
-###############################################
-# The runSession script is obsolete.          #
-# Please consider the new salome launcher.    #
-###############################################
-
-
-APPLI_HOME=`dirname $0`
-
-NSPORT=last
-NSHOST=localhost
-
-usage()
-{
-        echo "Connect to a SALOME session (local or remote)"
-        echo ""
-        echo "Usage: $(basename $0) [ -p PORT ] [ -m MACHINE ] [ -h ] [command]"
-        echo ""
-        echo "  -p PORT          : The port to connect to "
-        echo "  -m MACHINE       : The machine to connect to "
-        echo "  -h               : Print this message"
-        echo "  command          : The command to execute in the SALOME session"
-        echo ""
-        echo "If the command is not given a shell is opened"
-        echo "If PORT and MACHINE are not given, try to connect to the last active session on the local machine"
-        echo "If PORT and MACHINE are given, try to connect to the remote session associated with PORT on MACHINE"
-        echo "If MACHINE is not given, try to connect to the session associated to PORT on the local machine"
-        echo "If PORT is not given, try to connect to the remote session associated to port 2810 on MACHINE"
-        echo ""
-}
-
-while getopts 'm:p:h' OPTION
-  do
-    case $OPTION in
-      m)NSHOST="$OPTARG" ;;
-      p)NSPORT="$OPTARG" ;;
-      h|?) usage
-          exit 1 ;;
-    esac
-  done
-shift $(($OPTIND - 1))
-
-# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
-
-export APPLI=`${APPLI_HOME}/getAppliPath.py`
-
-# --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
-
-. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
-
-#export OMNIORB_USER_PATH="${HOME}/.salomeConfig/USERS"
-export OMNIORB_USER_PATH="${HOME}/${APPLI}/USERS"
-
-# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
-# Usage: writeConfigFile PORT HOST
-function writeConfigFile
-{
-  if [ $# -ne 2 ]; then
-    echo "Usage: $0 PORT HOST"
-    return
-  fi
-  export NSPORT=$1
-  export NSHOST=$2
-
-  # Get (in bash) the configuration filename from (Python) ORBConfigFile return values
-  RETURN_VALUES=$(${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/ORBConfigFile.py ${OMNIORB_USER_PATH} ${NSHOST} ${NSPORT} with_username=${USER})
-  export OMNIORB_CONFIG=$(echo ${RETURN_VALUES} | cut -d' ' -f1)
-}
-
-
-if test "x${NSPORT}" == "xlast"; then
-  #PORT is not given
-  if test "x${NSHOST}" == "xlocalhost"; then
-    #MACHINE and PORT are not given
-    # --- set omniORB configuration to current session if any
-    fileOmniConfig=${OMNIORB_USER_PATH}/.omniORB_${USER}_last.cfg
-    if [ -f $fileOmniConfig ]; then
-      export OMNIORB_CONFIG=${OMNIORB_USER_PATH}/.omniORB_${USER}_last.cfg
-      # --- set environment variables for port and hostname of NamingService
-      export NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host`
-      export NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
-    fi
-  else
-    #MACHINE is given PORT is not given
-    writeConfigFile 2810 ${NSHOST}
-  fi
-else
-  #PORT is given
-  if test "x${NSHOST}" == "xlocalhost"; then
-    #MACHINE is not given PORT is given
-      NSHOST=`hostname`
-  fi
-  writeConfigFile ${NSPORT} ${NSHOST}
-fi
-
-# --- invoke shell with or without args
-
-if [ $# -ne 0 ] ; then
-  ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py -exec $*
-else
-  ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
-fi
index 59600adeda5874302a92342fa95b117f4eedee92..5c90495c81b40fa6c2f462e59413c274bfe6d7d0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -23,7 +23,7 @@ SET(TEST_NAMES
   )
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME SALOME_CONCURRENT_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_SALOME_CONCURRENT_${tfile})
   ADD_TEST(${TEST_NAME} python ${tfile}.py)
-  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()
index f38992b786cc5e6427fe5ad4e20e5f189957c2e4..eb69a0d20f42eb7fc1edc6c6832d2a4b965622ea 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -23,7 +23,7 @@ SET(TEST_NAMES
   )
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME SALOME_COMMAND_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_SALOME_COMMAND_${tfile})
   ADD_TEST(${TEST_NAME} python ${tfile}.py)
-  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()
index 9e5b9d2574b2033669b48436ad66dc4465373e16..c8cbb1e245dfb76199ccb9a7f20b39585b7b3a2a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -20,7 +20,7 @@
 SET(TEST_NAMES instances)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME SALOME_INSTANCE_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_SALOME_INSTANCE_${tfile})
   ADD_TEST(${TEST_NAME} python ${tfile}.py)
-  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()
diff --git a/bin/runSalome b/bin/runSalome
deleted file mode 100755 (executable)
index 0a384c8..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-
-###############################################
-############### IMPORTANT NOTE ################
-###############################################
-# The runSalome script is obsolete.           #
-# Please consider the new salome launcher.    #
-###############################################
-
-
-# **********************************************************
-# This file is used by m4 files in many modules to detect SALOME KERNEL.
-# Its initial purpose (starting salome) can be replaced by new salome command.
-# When definitively switching from autotools to Cmake, this file may be removed.
-# **********************************************************
-
-
-
-${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $*
-
-
-
-
-# -----------------------------------------------------------------------------
-# examples:
-# ---------
-#  $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome
-#
-#     - parameters for launching are taken from SalomeApp.xml;
-#     - if the config file does not exist, it is created with default values.
-#
-#  $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,MED --embedded=registry,study,moduleCatalog --standalone=cppContainer --xterm --killall
-#
-#     - parameters from command line supersede those from SalomeApp.xml
-#
-#     Some CORBA servers can be launched in the SALOME_Session_Server's process
-#     (embedded = same process) or in a separate process (standalone).
-#     In above example, Registry, Study and Module Catalog servers are started
-#     in the embedded mode; default C++ container (FactoryServer) is started in
-#     the standalone mode.
-#
-# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome -h
-#
-#    - print help on the runSalome command
-# -----------------------------------------------------------------------------
-#
-# The -i option starts Python interpreter after launching SALOME session
-# (see runSalome.py script).
-# Logger server is optional.
-#
-# -----------------------------------------------------------------------------
index 23ccb38180eed21d603b61a55c940ea0714a7cd4..0013129ea3e6144a331aeebdcd8257a5df042e6e 100644 (file)
@@ -82,7 +82,7 @@ def __runTest(command, workdir):
 
   while True:
     reads = [p.stdout.fileno(), p.stderr.fileno()]
-    ret = select.select(reads, [], [])
+    ret = select.select(reads, [], [], 0)
 
     for fd in ret[0]:
       if fd == p.stdout.fileno():
@@ -97,7 +97,8 @@ def __runTest(command, workdir):
         pass
       pass
 
-    if p.poll() != None:
+    returncode = p.poll()
+    if not returncode is None:
       break
     pass
 
index 68d018ca37a8eb9973e77f60e0b58b38044ec0d9..00ded0acfdc8db4204a5a33f3022f22742a5a35a 100644 (file)
@@ -429,6 +429,7 @@ class SalomeContext:
             p.start()
             p.join()
     except ImportError:
+      # :TODO: should be declared obsolete
       from killSalome import killAllPorts
       killAllPorts()
       pass
index 8a5dc4e918b0f59d2d3c946f874c6357625d8de3..cdf304eba8e60a085a5c649bb443b24c57df2fcc 100755 (executable)
@@ -64,65 +64,6 @@ def __setup_config(nsport, args, save_config):
   #
 #
 
-def searchFreePort_withoutPortManager(args={}, save_config=1, use_port=None):
-  # :NOTE: Under windows:
-  #        netstat options -l and -t are unavailable
-  #        grep command is unavailable
-  from subprocess import Popen, PIPE
-  (stdout, stderr) = Popen(['netstat','-an'], stdout=PIPE).communicate()
-  import StringIO
-  buf = StringIO.StringIO(stdout)
-  ports = buf.readlines()
-
-  #
-  def portIsUsed(port, data):
-    import re
-    regObj = re.compile( ".*tcp.*:([0-9]+).*:.*listen", re.IGNORECASE );
-    for item in data:
-      try:
-        p = int(regObj.match(item).group(1))
-        if p == port: return True
-        pass
-      except:
-        pass
-      pass
-    return False
-  #
-
-  if use_port:
-    print "Check if port can be used: %d" % use_port,
-    if not portIsUsed(use_port, ports):
-      print "- OK"
-      __setup_config(use_port, args, save_config)
-      return
-    else:
-      print "- KO: port is busy"
-    pass
-  #
-
-  print "Searching for a free port for naming service:",
-  #
-
-  NSPORT=2810
-  limit=NSPORT+100
-  #
-
-  while 1:
-    if not portIsUsed(NSPORT, ports):
-      print "%s - OK"%(NSPORT)
-      __setup_config(NSPORT, args, save_config)
-      break
-    print "%s"%(NSPORT),
-    if NSPORT == limit:
-      msg  = "\n"
-      msg += "Can't find a free port to launch omniNames\n"
-      msg += "Try to kill the running servers and then launch SALOME again.\n"
-      raise RuntimeError, msg
-    NSPORT=NSPORT+1
-    pass
-  #
-#
-
 def searchFreePort_withPortManager(queue, args={}, save_config=1, use_port=None):
   from PortManager import getPort
   port = getPort(use_port)
@@ -186,6 +127,5 @@ def searchFreePort(args={}, save_config=1, use_port=None):
 
     p.join() # this blocks until the process terminates
   except ImportError:
-    searchFreePort_withoutPortManager(args, save_config, use_port)
-    __savePortToFile(args)
+    raise Exception('PortManager module not found')
 #
index a0b26f7f7c4bb991d07e86d7de4485d54de89904..cffb2fefcd1387d3ae04f82fcb10abcfd9ae7d08 100644 (file)
@@ -16,9 +16,7 @@ introductory documentation, listed below.
     See \subpage SALOME_Application to define your own configuration of %SALOME and run it
     on one or several computers. This is the recommended way of configuration.
 -# <b>How to launch %SALOME</b>:
-    - Using \b NEW \subpage salome_command, based on \ref SALOME_Application.
-    - In a %SALOME application, see \ref SALOME_Application.
-    - Using \c runSalome script, see \subpage running_salome_page
+    - Using the python \subpage salome_command.
 -# <b>How to use KERNEL services in Python scripts</b>\n
     The %SALOME KERNEL offers a list of services available in Python. See \subpage KERNEL_Services.
 -# <b>How to use KERNEL services from a C++ context</b>\n
old mode 100755 (executable)
new mode 100644 (file)
index cd31a7a..366bec6
-/*!\r
-\r
-\page running_salome_page Running Salome\r
-\r
-There are three ways to run %SALOME:\r
-\r
-\section S1_run_sal Using the "salome" command\r
-\r
-%A simply %SALOME application is defined by :\r
-- a set of modules (GEOM, SMESH, YACS, ...)\r
-- a profile: set of informatic resources (images, documentation, tests...) binding the modules together\r
-- "salome" command is a launcher as a python script that creates a context (set of environment variables usable by the SALOME modules) and runs an instance of SALOME, for more details see \ref salome_command.\r
-\r
-How to generation of a profile of an application ?\r
-\r
-The user can generate a default profile for its application using the following command:\r
-\code\r
-python ${KERNEL_ROOT_DIR}/bin/salome/app-quickstart.py --prefix=<generation directory> --name=<application's name> --modules=<list,of,modules>\r
-\endcode\r
-\r
-Likely, the user would like to personalize its application's profile. Then, the profile\r
-can be compiled using the standard cmake procedure:\r
-\r
-\code\r
-cmake\r
-make\r
-make install\r
-\endcode\r
-\r
-This profile can be used within a python launcher - like the \subpage salome_command - by setting\r
-context variable <b>SalomeAppConfig</b> to the path where the profile is installed.\r
-\r
-\section S2_run_sal Using Salome Application Concept approach\r
-\r
-For more details see \ref SALOME_Application.\r
-\r
-\section S3_run_sal Using "runSalome" script supplied with SALOME KERNEL module distribution\r
-\r
-To launch %SALOME using \c %runSalome script, you have first to\r
-set-up proper environment for %SALOME. If you installed %SALOME using\r
-%SALOME Installation Wizard (Linux), you can use \c salome.sh or\r
-\c salome.csh script (that is located in the \c KERNEL_&lt;version&gt;\r
-directory of your %SALOME installation), for example:\r
-\r
-\code\r
-cd /home/user/salome_6.5.0/KERNEL_6.5.0\r
-source salome.csh\r
-\endcode\r
-\r
-Launch %SALOME session using the \c %runSalome script located\r
-in the \c SALOME/KERNEL/bin/salome directory:\r
-\r
-\code\r
-runSalome [options] [STUDY_FILE] [PYTHON_FILE [PYTHON_FILE ...]]\r
-\endcode\r
-\r
-Optionally, you can specify in the command line:\r
-- Study (document) file to be opened in %SALOME session passing;\r
-- One or more Python scripts to be executed after %SALOME\r
-  start-up. Python scripts will be executed in the new or opened study\r
-  in the order they appear in the command line.\r
-\r
-The \c %runSalome script supports large set of options that allow\r
-specifying the way to launch %SALOME session. Complete description of\r
-all options can be obtained using \c --help or -h option:\r
-\r
-\code\r
-runSalome --help\r
-\endcode\r
-\r
-Here below is a description of most important options:\r
-\r
-- \c --help or \c -h\r
-\r
-Print detail help information on the \c %runSalome script.\r
-\r
-- \c --version\r
-\r
-Print version of %SALOME platform.\r
-\r
-- \c --gui or \c -g\r
-\r
-Launch %SALOME sesssion in GUI mode (with GUI desktop).\r
-\r
-- \c --terminal or \c -t\r
-\r
-Launch %SALOME session in terminal mode (without GUI).\r
-\r
-- \c --resources=&lt;file&gt; or \c -r \c &lt;file&gt;\r
-\r
-Parse application settings from the &lt;file&gt; instead of default resource\r
-file. Default resource file is situated in user's home directory; for\r
-example, for %SALOME version 6.5.0, the file is ${HOME}/.config/salome/.SalomeApprc.6.5.0 \r
-\r
-- \c --modules=module1,module2,... or \c -m=module1,module2,...\r
-\r
-Specify the list of modules which will be used in the %SALOME session\r
-being launched. Note, that list of modules is separated be comma\r
-symbols, with no any spaces.\r
-\r
-- \c --xterm or \c -x\r
-\r
-The servers open in separate terminal window and log messages are displayed in this window.\r
-\r
-- <code>--embedded=registry,study,moduleCatalog,cppContainer/</code> or\r
-  <code>-e=registry,study,moduleCatalog,cppContainer</code>\r
-\r
-Run listed %SALOME servers in the GUI embedded mode (default value is\r
-<code>registry,study,moduleCatalog,cppContainer</code>). Note that logger\r
-server cannot be embedded to GUI. Note, that this option implies running %SALOME in GUI mode (\c -g\r
-option); in terminal mode all servers are running in standalone mode.\r
-\r
-- <code>--standalone=registry,study,moduleCatalog,cppContainerr</code> or\r
-  <code>-s=registry,study,moduleCatalog,cppContainer</code>\r
-\r
-Standalone CORBA servers (default: none).\r
-\r
-- \c --portkill or \c -p\r
-\r
-Kill %SALOME session launched with the current port.\r
-\r
-- \c --killall or \c -k\r
-\r
-Kill (stop) all running %SALOME sessions before launching new session.\r
-\r
-- \c --splash=&lt;1/0&gt; or \c -z &lt;1/0&gt;\r
-\r
-Use 1 to display splash screen [default] at start-up, 0 to disable\r
-splash screen. This option is ignored in the terminal mode.\r
-\r
-- \c --pinter\r
-\r
-Launch with interactive Python console.\r
-\r
-- <code>--interp=n</code> or <code>-i=n</code>\r
-\r
-Number of additional Python interpreters to open, with session\r
-environment propely set-up.\r
-\r
-*/\r
+/*!
+
+\page running_salome_page Running Salome
+
+To run %SALOME, use the python \ref salome_command.
+
+Using this command, you DO NOT need to first set-up proper environment for %SALOME; all is done by the command itself.
+
+Launch %SALOME session using the following command:
+
+\code
+salome start [options] [STUDY_FILE] [PYTHON_FILE [args] [PYTHON_FILE [args]...]]
+\endcode
+
+Optionally, you can specify in the command line:
+- Study (document) file to be opened in %SALOME session passing;
+- One or more Python scripts to be executed after %SALOME
+  start-up. Python scripts will be executed in the new or opened study
+  in the order they appear in the command line. Passing args to these scripts
+  is possible but require a specific \c args: syntax (see  \ref salome_command).
+
+This command supports large set of options that allow
+specifying the way to launch %SALOME session. Complete description of
+all options can be obtained using \c --help or -h option:
+
+\code
+salome start --help
+\endcode
+
+Here below is a description of most important options:
+
+- \c --help or \c -h
+
+Print detail help information on the command.
+
+- \c --version
+
+Print version of %SALOME platform.
+
+- \c --gui or \c -g
+
+Launch %SALOME sesssion in GUI mode (with GUI desktop).
+
+- \c --terminal or \c -t
+
+Launch %SALOME session in terminal mode (without GUI).
+
+- \c --resources=&lt;file&gt; or \c -r \c &lt;file&gt;
+
+Parse application settings from the &lt;file&gt; instead of default resource
+file. Default resource file is situated in user's home directory; for
+example, for %SALOME version 6.5.0, the file is ${HOME}/.config/salome/.SalomeApprc.6.5.0
+
+- \c --modules=module1,module2,... or \c -m=module1,module2,...
+
+Specify the list of modules which will be used in the %SALOME session
+being launched. Note, that list of modules is separated be comma
+symbols, with no any spaces.
+
+- \c --xterm or \c -x
+
+The servers open in separate terminal window and log messages are displayed in this window.
+
+- <code>--embedded=registry,study,moduleCatalog,cppContainer/</code> or
+  <code>-e=registry,study,moduleCatalog,cppContainer</code>
+
+Run listed %SALOME servers in the GUI embedded mode (default value is
+<code>registry,study,moduleCatalog,cppContainer</code>). Note that logger
+server cannot be embedded to GUI. Note, that this option implies running %SALOME in GUI mode (\c -g
+option); in terminal mode all servers are running in standalone mode.
+
+- <code>--standalone=registry,study,moduleCatalog,cppContainerr</code> or
+  <code>-s=registry,study,moduleCatalog,cppContainer</code>
+
+Standalone CORBA servers (default: none).
+
+- \c --portkill or \c -p
+
+Kill %SALOME session launched with the current port.
+
+- \c --killall or \c -k
+
+Kill (stop) all running %SALOME sessions before launching new session.
+
+- \c --splash=&lt;1/0&gt; or \c -z &lt;1/0&gt;
+
+Use 1 to display splash screen [default] at start-up, 0 to disable
+splash screen. This option is ignored in the terminal mode.
+
+- \c --pinter
+
+Launch with interactive Python console.
+
+- <code>--interp=n</code> or <code>-i=n</code>
+
+Number of additional Python interpreters to open, with session
+environment propely set-up.
+
+*/
index e91b71e1193d9059593f4f2b24b8b3928cdc6005..bd79433d910aab44bbbf6adca0c3b9ff320f3474 100644 (file)
@@ -7,11 +7,11 @@ modules, how to define and run this application on one or more computers.
 
 \section S1_sal_appl General principles
 
-%A %SALOME application is defined by a set of modules (GEOM, SMESH, ASTER...). %A %SALOME application
-lives in an application  directory.
-%A %SALOME application is a virtual installation of %SALOME in the application directory 
-(bin, lib, doc, share...), with, for each file (executable, script, data,
-library, resources...), symbolic links to the actual files.
+%A %SALOME application is defined by :
+- a set of modules (GEOM, SMESH, ASTER...)
+- a profile: set of informatic resources (images, documentation, tests...) binding the modules together. 
+- a launcher: python script that creates a context (set of environment variables usable by the SALOME modules) and runs an instance of SALOME.
 
 %A %SALOME User can define several %SALOME Applications. These applications are
 runnable from the same user account. These applications may share the same 
@@ -40,7 +40,27 @@ account@computer is via rsh or ssh and must be configured for use without
 password (key exchange for ssh). Account may be different on each
 computer.
 
-\section S2_sal_appl Application Directory
+\section S2_sal_appl Generation of a profile
+
+The user can generate a default profile for its application using the following command:
+\code
+python ${KERNEL_ROOT_DIR}/bin/salome/app-quickstart.py --prefix=<generation directory> --name=<application's name> --modules=<list,of,modules>
+\endcode
+
+Likely, the user would like to personalize its application's profile. Then, the profile
+can be compiled using the standard cmake procedure:
+
+\code
+cmake
+make
+make install
+\endcode
+
+This profile can be used within a python launcher - like the \subpage salome_command - by setting
+context variable <b>SalomeAppConfig</b> to the path where the profile is installed.
+
+
+\section S3_sal_appl Deprecated Application Directory
 
 First, the user must create a %SALOME application configuration file by modifying a
 copy of ${KERNEL_ROOT_DIR}/bin/salome/config_appli.xml.
@@ -67,7 +87,7 @@ some modules needs a special environment not defined in the above script).
 For a distributed application (several computers), one must copy and adapt
 CatalogResources.xml from ${KERNEL_ROOT_DIR}/bin/salome/appliskel (see below).
 
-\section S3_sal_appl General rules
+\section S4_sal_appl Deprecated general rules
 
 The application directory must be created on each computer of the application.
 The easiest way is to use the same relative path (to ${HOME}) on each computer.
@@ -152,7 +172,7 @@ appliPath="my/specific/path/on/this/computer"
   </li>
 </ol>
 
-\section S4_sal_appl Examples of use
+\section S5_sal_appl Deprecated examples of use
 
 <ol>
   <li>
index 2d23874173d01bf67d8fafeb9757f5ac6f68a3c5..1bb3a45e8a79d63fb52e83929538816b4f24fc6b 100644 (file)
@@ -89,11 +89,8 @@ For example:
 \section handling_concurrency Handling concurrent starts
 A SALOME instance uses a dedicated TCP port number on which the CORBA name server of each SALOME application will connect. This refers to a technical solution that allows multiple software components belonging to the same application to communicate with each other. This approach is a standard used when multiple applications are running at the same time (components should not interfere with each other), and when application components can be distributed across multiple machines.
 
-Each SALOME application owns a specific port number. This port is determined automatically when application starts. When multiple applications are started at the same time, assigning a number to each port could be conflicting, and the same port could be assigned to several applications. To prevent from such a situation, a Python object named \c Portmanager has been implemented (Linux only). In SALOME 7, this object is available when activating a specific compilation flag of KERNEL module:
-- For gcc: -DWITH_PORTMANAGER
-- With CMake: SALOME_USE_PORTMANAGER=ON
+Each SALOME application owns a specific port number. This port is determined automatically when application starts. When multiple applications are started at the same time, assigning a number to each port could be conflicting, and the same port could be assigned to several applications. To prevent from such a situation, a Python object named \c Portmanager has been implemented. This object has been introduced in SALOME 7 as an optional tool, then evaluated on Linux and Windows. In SALOME 8, this object becomes the standard.
 
-Since SALOME 7.5.0 this flag is switched ON by default.
 Several instances can be safely started concurrently. For example in an automated process, calling several times the following commands (WORK_DIR variable changes at each call):
 \code
 salome start -t --ns-port-log=${WORK_DIR}/session.log
index 4b9b42bcd9b573bd758cc916a506af08ae51508c..fe3738a5d7e95a37fbda2f1d651b7d331a8b00f2 100644 (file)
@@ -153,6 +153,9 @@ struct JobParameters
         when the job type is "yacs_file". It gives the number of seconds
         between two updates of the state dump file. There will be no dump file
         if this parameter is missing or if its value is less than 1.
+      - YACSDriverOptions : options of the driver command when the job type is
+        "yacs_file".
+      - LoalLevelerJobType : LL_JOBTYPE.
   */
   Engines::ParameterList specific_parameters;
 
index f6114021a6acd079126ee8fdb419bb50661b457e..9411a537a0415277ced0751a444879a1f7f25638 100755 (executable)
@@ -45,7 +45,6 @@ SET(DATA
   FindSalomeOmniORB.cmake
   FindSalomeOmniORBPy.cmake
   FindSalomePThread.cmake
-#  FindSalomePython.cmake
   FindSalomePythonLibs.cmake
   FindSalomePythonInterp.cmake
   FindSalomeNumPySciPy.cmake
index 0dd0d2bcdbae34bd3ee3249b3e26b022e7931d5c..ebff56e06525f9b525573842b9cfb0cbdd43c7e0 100644 (file)
@@ -166,9 +166,6 @@ IF(NOT WIN32)
   ENDIF()
 ENDIF()
 
-IF(NOT DEFINED NO_CXX11_SUPPORT)
-  SET(NO_CXX11_SUPPORT ON)
-ENDIF()
 IF(NOT NO_CXX11_SUPPORT)
   # C++11 support
   INCLUDE(CheckCXXCompilerFlag)
index 37c3f41420be01bf0de10ec30750b32ac2e7712c..d9c48022b9ee664049dcc30ad33b005792d95fd7 100644 (file)
@@ -816,9 +816,9 @@ class CMakeFile(object):
                 pass
             # --
             newlines.append("""
-            set(VERSION 7.7.0)
-            set(SHORT_VERSION 7.7)
-            set(XVERSION 0x070700)
+            set(VERSION 8.0.0)
+            set(SHORT_VERSION 8.0)
+            set(XVERSION 0x080000)
             set(VERSION_DEV 0)
             """)
             pass
index b5f472f22ce18923a0930d70d7de3523aac36089..a568b4990db27ed34bbb8d9989cb0d735fe4ff01 100644 (file)
@@ -82,9 +82,12 @@ ELSE(EXISTS ${GUI_ROOT_DIR})
   MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
 ENDIF(EXISTS ${GUI_ROOT_DIR})
 
-# Qt4
-FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
-INCLUDE(${QT_USE_FILE})
+# Qt
+IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+  FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+ELSE()
+  FIND_PACKAGE(SalomeQt5 REQUIRED)
+ENDIF()
 
 # Directories
 # (default values taken from KERNEL)
index df19657a6193f618501df58427641a98f6d61869..90f9f1ce408bc6721b3406df0ab20bc348b0f143 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
 
 # --- resources ---
 
@@ -31,4 +31,4 @@ SET(_ts_RESOURCES
 
 # --- rules ---
 
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_[NAME_OF_APPLICATION]_PROFILE_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_[NAME_OF_APPLICATION]_PROFILE_INSTALL_RES_DATA}")
index 9e8679629d7f3ed5312dfa84534081863a9ec062..5843afb7524c41a3232040f01c2e5edd05bb84ed 100644 (file)
@@ -32,7 +32,6 @@
 #ifndef WIN32
 #include <sys/time.h>
 #else
-#include <winsock2.h>
 #include <windows.h>
 #pragma comment(lib,"winmm.lib")
 #endif
index 183b9f343eec2b957b92ca42f11e86caf1bf96ed..eac9713a33e934a1f7a91ce7e9cfc9cd4b748ccc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 IF(NOT WIN32)
-  ADD_TEST(KernelHelpers python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestKernelHelpers.py)
-  SET_TESTS_PROPERTIES(KernelHelpers PROPERTIES
-                                     LABELS "${COMPONENT_NAME}"
-                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
-  #                                                 TIMEOUT 500
+  SET(TEST_NAME ${COMPONENT_NAME}_KernelHelpers)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestKernelHelpers.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+                                    LABELS "${COMPONENT_NAME}"
+                                    ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  #                                 TIMEOUT 500
                       )
   # /!\ DO NOT SET TIMEOUT PROPERTY IF USING ${SALOME_TEST_DRIVER}
   #     BUT PASS TIMEOUT VALUE TO THE DRIVER
index c2a62ddae919cf4f8ebb88ac8b4eee2c5174b39c..788aca8b5a6c7c08df1e47f435be34d08e7b00a6 100644 (file)
@@ -35,7 +35,7 @@
 #ifdef WIN32
 # include <io.h>
 #endif
-BatchTest::BatchTest(const Engines::ResourceDefinition& batch_descr) 
+BatchTest::BatchTest(const Engines::ResourceDefinition& batch_descr)
 {
 #ifdef WITH_LIBBATCH
   _batch_descr = batch_descr;
@@ -60,7 +60,7 @@ bool
 BatchTest::test()
 {
   bool rtn = false;
-  INFOS(std::endl 
+  INFOS(std::endl
         << "--- Testing batch Machine :" << std::endl
         << "--- Name       : " << _batch_descr.hostname << std::endl
         << "--- hostname      : " << _batch_descr.hostname << std::endl
@@ -94,15 +94,15 @@ BatchTest::test()
         << "--- Submit mpi job      : " << result_jobsubmit_mpi << std::endl
         << "--- Application         : " << result_appli << std::endl
        );
-  
-  if (result_connection == "OK"       && 
+
+  if (result_connection == "OK"       &&
       result_filecopy == "OK"         &&
       result_getresult == "OK"        &&
       result_jobsubmit_simple == "OK" &&
       result_jobsubmit_mpi == "OK"    &&
       result_appli == "OK")
     rtn = true;
-      
+
   return rtn;
 }
 
@@ -227,7 +227,7 @@ BatchTest::test_getresult()
   command = "scp";
   if(protocol == "rsh")
     command = "rcp";
-  command += " " + username + "@" + hostname + ":" + home 
+  command += " " + username + "@" + hostname + ":" + home
           + "/" + _base_filename + " " + _test_filename + "_copy";
 
   // Test
@@ -239,7 +239,7 @@ BatchTest::test_getresult()
     result += oss.str();
     return result;
   }
-  
+
   // Compare files
   std::ifstream src_file(_test_filename.c_str());
   if (!src_file)
@@ -270,8 +270,8 @@ BatchTest::test_getresult()
   return result;
 }
 
-std::string 
-BatchTest::test_jobsubmit_simple() 
+std::string
+BatchTest::test_jobsubmit_simple()
 {
   int status;
   std::string home;
@@ -382,11 +382,11 @@ BatchTest::test_jobsubmit_simple()
   }
   std::getline(file_job, jobid);
   file_job.close();
+
   // Wait the end of the job
   command = protocol + " " + username + "@" + hostname + " qstat -f " + jobid + " > " + file_job_name;
   bool stop = false;
-  while (!stop) 
+  while (!stop)
   {
     status = system(command.c_str());
     if(status && status != 153 && status != 256*153)
@@ -411,7 +411,7 @@ BatchTest::test_jobsubmit_simple()
   command = "scp";
   if(protocol == "rsh")
     command = "rcp";
-  command += " " 
+  command += " "
           + username + "@" + hostname + ":" + home + "/" + _date + "_simple* /tmp";
   status = system(command.c_str());
   if(status) {
@@ -421,7 +421,7 @@ BatchTest::test_jobsubmit_simple()
     result += oss.str();
     return result;
   }
-  
+
   // Test results
   std::string normal_input;
   std::string file_normal_name = "/tmp/" + _date + "_simple_output.log";
@@ -457,8 +457,8 @@ BatchTest::test_jobsubmit_simple()
   return result;
 }
 
-std::string 
-BatchTest::test_jobsubmit_mpi() 
+std::string
+BatchTest::test_jobsubmit_mpi()
 {
 #ifdef WITH_LIBBATCH
   int status;
@@ -605,11 +605,11 @@ BatchTest::test_jobsubmit_mpi()
   }
   std::getline(file_job, jobid);
   file_job.close();
+
   // Wait the end of the job
   command = protocol + " " + username + "@" + hostname + " qstat -f " + jobid + " > " + file_job_name;
   bool stop = false;
-  while (!stop) 
+  while (!stop)
   {
     status = system(command.c_str());
     if(status && status != 153 && status != 256*153)
@@ -634,7 +634,7 @@ BatchTest::test_jobsubmit_mpi()
   command = "scp";
   if(protocol == "rsh")
     command = "rcp";
-  command += " " 
+  command += " "
           + username + "@" + hostname + ":" + home + "/" + _date + "_mpi* /tmp";
   status = system(command.c_str());
   if(status) {
@@ -644,7 +644,7 @@ BatchTest::test_jobsubmit_mpi()
     result += oss.str();
     return result;
   }
-  
+
   // Test results
   std::string normal_input;
   std::string file_normal_name = "/tmp/" + _date + "_mpi_output.log";
@@ -667,14 +667,14 @@ BatchTest::test_jobsubmit_mpi()
     return result;
   }
   result = "OK";
-  return result;  
+  return result;
 #else
   throw LauncherException("Method BatchTest::test_jobsubmit_mpi is not available "
                           "(libBatch was not present at compilation time)");
 #endif
 }
 
-std::string 
+std::string
 BatchTest::test_appli()
 {
   int status;
@@ -685,7 +685,7 @@ BatchTest::test_appli()
   std::string username = _batch_descr.username.in();
   std::string protocol = _batch_descr.protocol.in();
   std::string applipath = _batch_descr.applipath.in();
-  
+
   // Getting home directory
   std::string rst = get_home(&home);
   if(rst != "") {
@@ -697,7 +697,7 @@ BatchTest::test_appli()
   std::ofstream file_appli;
   file_appli.open(_test_file_appli.c_str(), std::ofstream::out);
   file_appli << "#!/bin/bash\n"
-             << "if [ -f " << applipath << "/runAppli ]\n"
+             << "if [ -f " << applipath << "/salome ]\n"
              << "then\n"
              << "  echo OK\n"
              << "else\n"
@@ -722,8 +722,8 @@ BatchTest::test_appli()
   }
 
   // Launch test
-  command = protocol + " " + username + "@" + hostname 
-          + " sh " + home + "/" + _base_filename + "_appli_test > " 
+  command = protocol + " " + username + "@" + hostname
+          + " sh " + home + "/" + _base_filename + "_appli_test > "
           + _test_filename + "_appli_test_result";
 
   status = system(command.c_str());
@@ -746,7 +746,7 @@ BatchTest::test_appli()
   }
   std::getline(file_appli_result, rst_appli);
   file_appli_result.close();
-  
+
   if (rst_appli != "OK")
   {
     result += "Error checking application on remote host ! result = " + rst;
@@ -769,7 +769,7 @@ BatchTest::get_home(std::string * home)
   std::string protocol = _batch_descr.protocol.in();
   std::string file_home_name = _test_filename + "_home";
 
-  command = protocol + " " + username + "@" + hostname + " 'echo $HOME' > " + file_home_name; 
+  command = protocol + " " + username + "@" + hostname + " 'echo $HOME' > " + file_home_name;
   status = system(command.c_str());
   if(status) {
     std::ostringstream oss;
index 530259e2b29ab94463c11c381a26f45b924dbfa2..82efa643f68c90ef858c8809f5f6b85613204973 100644 (file)
@@ -27,6 +27,7 @@ Launcher::Job_YACSFile::Job_YACSFile()
 {
   _job_type = "yacs_file";
   _dumpState = -1;
+  _yacsDriverOptions = "";
 }
 
 Launcher::Job_YACSFile::~Job_YACSFile() {}
@@ -40,9 +41,11 @@ Launcher::Job_YACSFile::setJobFile(const std::string & job_file)
 void
 Launcher::Job_YACSFile::addJobTypeSpecificScript(std::ofstream & launch_script_stream)
 {
-  launch_script_stream << _resource_definition.AppliPath << "/salome shell -p \"$appli_port\" driver args:-k,\"$appli_port\"," << _job_file_name_complete;
+  launch_script_stream << _resource_definition.AppliPath << "/salome shell -p \"$appli_port\" -- driver -k\"$appli_port\" " << _job_file_name_complete;
   if (_dumpState > 0)
-    launch_script_stream << ",--dump=" << _dumpState;
+    launch_script_stream << " --dump=" << _dumpState;
+  if(not _yacsDriverOptions.empty())
+    launch_script_stream << " " << _yacsDriverOptions ;
   launch_script_stream << " > logs/yacs_" << _launch_date << ".log 2>&1" << std::endl;
 }
 
@@ -59,4 +62,11 @@ Launcher::Job_YACSFile::checkSpecificParameters()
     if (!(iss >> _dumpState))
       throw LauncherException("Specific parameter EnableDumpYACS is not correctly defined: it should be an integer. Value given is " + user_value);
   }
+  
+  it = _specific_parameters.find("YACSDriverOptions");
+  if (it != _specific_parameters.end())
+  {
+    // Decode info
+    _yacsDriverOptions = it->second;
+  }
 }
index ee0abf0b59f902e0cccb31f6706d087c10a9e2e2..5cd2f8a1c930a121f2e0fdbb28f972465806492c 100644 (file)
@@ -38,6 +38,7 @@ namespace Launcher
 
     protected:
       int _dumpState;
+      std::string _yacsDriverOptions;
   };
 }
 
index 76cc5b15946b4c6f505e116652edecbb586f4771..664c74c99ca0edfa285954595fb3b5a947cbcfa3 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,8 +18,9 @@
 #
 
 IF(NOT WIN32)
-  ADD_TEST(SalomeLauncher python ${SALOME_TEST_DRIVER} ${TIMEOUT} test_launcher.py)
-  SET_TESTS_PROPERTIES(SalomeLauncher PROPERTIES LABELS "${COMPONENT_NAME}"
+  SET(TEST_NAME ${COMPONENT_NAME}_Launcher)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} test_launcher.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
     #                                                 TIMEOUT 500
     )
   # /!\ DO NOT SET TIMEOUT PROPERTY IF USING ${SALOME_TEST_DRIVER}
index 86d5d61aa20731fb7f2027d3560d0f7b1e4f9a49..53fe67af54fff949a236ac2290915f7f8255a1be 100755 (executable)
@@ -353,6 +353,101 @@ f.close()
       self.verifyFile(os.path.join(job_params.result_directory, "result.txt"),
                       "expected")
     
+  ##############################
+  # test of yacs job type using "--init_port" driver option
+  ##############################
+  def test_yacsopt(self):
+    yacs_path = os.getenv("YACS_ROOT_DIR", "")
+    if not os.path.isdir(yacs_path):
+      self.skipTest("Needs YACS module to run. Please define YACS_ROOT_DIR.")
+    
+    case_test_dir = os.path.join(TestCompo.test_dir, "yacs_opt")
+    os.mkdir(case_test_dir)
+    
+    # job script
+    script_text = """<?xml version='1.0' encoding='iso-8859-1' ?>
+<proc name="myschema">
+   <property name="DefaultStudyID" value="1"/>
+   <type name="string" kind="string"/>
+   <type name="bool" kind="bool"/>
+   <type name="double" kind="double"/>
+   <type name="int" kind="int"/>
+   <container name="DefaultContainer">
+      <property name="container_kind" value="Salome"/>
+      <property name="attached_on_cloning" value="0"/>
+      <property name="container_name" value="FactoryServer"/>
+      <property name="name" value="localhost"/>
+   </container>
+   <inline name="mynode">
+      <script><code><![CDATA[
+text_result = "i=%s,d=%s,b=%s,s=%s" % (i,d,b,s)
+f = open('result.txt', 'w')
+f.write(text_result)
+f.close()
+]]></code></script>
+      <load container="DefaultContainer"/>
+      <inport name="i" type="int"/>
+      <inport name="d" type="double"/>
+      <inport name="b" type="bool"/>
+      <inport name="s" type="string"/>
+   </inline>
+</proc>
+"""
+    yacs_file = "simpleSchema.xml"
+    job_script_file = os.path.join(case_test_dir, yacs_file)
+    f = open(job_script_file, "w")
+    f.write(script_text)
+    f.close()
+    
+    local_result_dir = os.path.join(case_test_dir, "result_yacsopt_job")
+    job_params = salome.JobParameters()
+    job_params.job_type = "yacs_file"
+    job_params.job_file = job_script_file
+    #job_params.env_file = os.path.join(case_test_dir,env_file)
+    job_params.out_files = ["result.txt"]
+    
+    # define the interval between two YACS schema dumps (3 seconds)
+    import Engines
+    job_params.specific_parameters = [Engines.Parameter("YACSDriverOptions",
+               "-imynode.i=5 -imynode.d=3.7 -imynode.b=False -imynode.s=lili")]
+    expected_result="i=5,d=3.7,b=False,s=lili"
+    job_params.resource_required = salome.ResourceParameters()
+    job_params.resource_required.nb_proc = 1
+
+    launcher = salome.naming_service.Resolve('/SalomeLauncher')
+    resManager= salome.lcc.getResourcesManager()
+    
+    for resource in self.ressources:
+      print "Testing yacs job with options on ", resource
+      job_params.result_directory = local_result_dir + resource
+      job_params.job_name = "YacsJobOpt_" + resource
+      job_params.resource_required.name = resource
+
+      # use the working directory of the resource
+      resParams = resManager.GetResourceDefinition(resource)
+      wd = os.path.join(resParams.working_directory,
+                        "YacsJobOpt_" + self.suffix)
+      job_params.work_directory = wd
+
+      job_id = launcher.createJob(job_params)
+      launcher.launchJob(job_id)
+      jobState = launcher.getJobState(job_id)
+
+      yacs_dump_success = False
+      print "Job %d state: %s" % (job_id,jobState)
+      while jobState != "FINISHED" and jobState != "FAILED" :
+        time.sleep(5)
+        jobState = launcher.getJobState(job_id)
+        print "Job %d state: %s " % (job_id,jobState)
+        pass
+
+      self.assertEqual(jobState, "FINISHED")
+
+      # getJobResults to default directory (result_directory)
+      launcher.getJobResults(job_id, "")
+      self.verifyFile(os.path.join(job_params.result_directory, "result.txt"),
+                      expected_result)
+
 if __name__ == '__main__':
     # creat study
     import salome
index 053960e36c7bc81440fa679e0526b8724aefe0fa..754fffa220b8d5c002b0c35b6d538b12cca08b97 100644 (file)
@@ -623,7 +623,6 @@ void SALOME_LifeCycleCORBA::killOmniNames()
     system( cmd.c_str() );
   }
 
-#ifdef WITH_PORTMANAGER
   // shutdown portmanager
   if ( !portNumber.empty() )
   {
@@ -635,7 +634,6 @@ void SALOME_LifeCycleCORBA::killOmniNames()
     MESSAGE(cmd);
     system( cmd.c_str() );
   }
-#endif
 }
 
 //=============================================================================
index 606a7a1e2ba46455c2623e12505decc37f210567..21f3217c02d076b0e1a03cce8997538e916e15d8 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 IF(NOT WIN32)
-  ADD_TEST(LifeCycleCORBA python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestLifeCycleCORBA.py)
-  SET_TESTS_PROPERTIES(LifeCycleCORBA PROPERTIES
-                                     LABELS "${COMPONENT_NAME}"
-                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  SET(TEST_NAME ${COMPONENT_NAME}_LifeCycleCORBA)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestLifeCycleCORBA.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+                                    LABELS "${COMPONENT_NAME}"
+                                    ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
                       )
 ENDIF()
index cf68102da43956572d8aec6e9a7160265d8946c8..57556dd0f00f45754e9c05c9a5208886393da238 100755 (executable)
@@ -25,4 +25,8 @@ SET(SCRIPTS
   TestLifeCycleCORBA_SWIG.py
 )
 
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/LifeCycleCORBA_SWIG)
+INSTALL(FILES ${SCRIPTS} DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
index 76cc5b15946b4c6f505e116652edecbb586f4771..ae7164a4e4ec2c57d4dc8eb1ac7d6d1b67fdda92 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-IF(NOT WIN32)
-  ADD_TEST(SalomeLauncher python ${SALOME_TEST_DRIVER} ${TIMEOUT} test_launcher.py)
-  SET_TESTS_PROPERTIES(SalomeLauncher PROPERTIES LABELS "${COMPONENT_NAME}"
-    #                                                 TIMEOUT 500
-    )
-  # /!\ DO NOT SET TIMEOUT PROPERTY IF USING ${SALOME_TEST_DRIVER}
-  #     BUT PASS TIMEOUT VALUE TO THE DRIVER
+SET(TEST_NAMES
+  LifeCycleCORBA_SWIGTest
+  testresourcemanager
+  testcontainermanager
+#  TestLifeCycleCORBA_SWIG
+  )
 
+IF(NOT WIN32)
+  FOREACH(tfile ${TEST_NAMES})
+    SET(TEST_NAME ${COMPONENT_NAME}_LC_${tfile})
+    ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
+    SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
+      )
+  ENDFOREACH()
 ENDIF()
index a8f1c34a8a0bcabbf9f7c2099ba7e37171d2f8bd..0abe231dc6489d4319bf35318c56bc5e22c404db 100644 (file)
@@ -69,6 +69,6 @@ Test with catalog :
 
 
 if __name__ == '__main__':
-  suite = unittest.TestLoader().loadTestsFromTestCase(TestContainerManager)
-  unittest.TextTestRunner().run(suite)
-
+  #suite = unittest.TestLoader().loadTestsFromTestCase(TestContainerManager)
+  #unittest.TextTestRunner().run(suite)
+  unittest.main()
index 35c2060cba628c06ecb58d27b08fae27c478285a..c72dfabf1d9cc21f82a31334ecd6a9d7f9734def 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 IF(NOT WIN32)
-  ADD_TEST(NamingService python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestNamingService.py)
-  SET_TESTS_PROPERTIES(NamingService PROPERTIES
-                                     LABELS "${COMPONENT_NAME}"
-                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  SET(TEST_NAME ${COMPONENT_NAME}_NamingService)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestNamingService.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+                                    LABELS "${COMPONENT_NAME}"
+                                    ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
                       )
 
 ENDIF()
index bb4a3b00c5fbe50722677e73bd221cdde0c6e64a..941b3e081188e7f2c7e0fdabf64a6daf4a8c0994 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 IF(NOT WIN32)
-  ADD_TEST(SALOMEDS python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMEDS.py)
-  SET_TESTS_PROPERTIES(SALOMEDS PROPERTIES
-                                     LABELS "${COMPONENT_NAME}"
-                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  SET(TEST_NAME ${COMPONENT_NAME}_SALOMEDS)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMEDS.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+                                    LABELS "${COMPONENT_NAME}"
+                                    ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
                       )
 ENDIF()
index 83a33eff56f714daddc2d2ec5f692cff0fff5b47..6c93cd649dbdcf287a5e8fb53a1ea19f3c72fdae 100755 (executable)
@@ -33,7 +33,12 @@ void SALOMEDSTest::testAttributeComment()
   CPPUNIT_ASSERT(sm);
 
   //Create a new study
-  _PTR(Study) study = sm->NewStudy("Test");
+  std::vector<std::string> ost(sm->GetOpenStudies());
+  _PTR(Study) study;
+  if(ost.empty())
+    study = sm->NewStudy("Test");
+  else
+    study = sm->GetStudyByName(ost[0]);
 
   CPPUNIT_ASSERT(study);
 
index ea7772a917333fd8459bc10c7b8f90d12e23e275..542a6865d427d8196db794cc5b844c1b7eb512f9 100755 (executable)
@@ -102,7 +102,7 @@ void SALOMEDSTest::testSObject()
   //Check method GetAllAttributes
   std::vector< _PTR(GenericAttribute) > v = so->GetAllAttributes();
    
-  CPPUNIT_ASSERT(v.size() == 5); //+AttributeTarget +AttributeTreeNode
+  CPPUNIT_ASSERT(v.size() == 4); //+AttributeTarget +AttributeTreeNode
 
   //Check method GetName
   CPPUNIT_ASSERT(so->GetName() == "SO name");
index f465dd87b6103afb0dd5a1e88ddb280a074f5f55..f7fe1bd721d839b38a312a9a63b4e8aff5d1617f 100755 (executable)
@@ -79,7 +79,7 @@ void SALOMEDSTest::testStudy()
   CPPUNIT_ASSERT(so);
 
   //Try to create SObject with empty and invalid entries
-  CPPUNIT_ASSERT(!study->CreateObjectID(""));
+  //CPPUNIT_ASSERT(!study->CreateObjectID(""));
   CPPUNIT_ASSERT(!study->CreateObjectID("entry"));
 
   //Check method NewChildIterator
@@ -143,7 +143,7 @@ void SALOMEDSTest::testStudy()
   CPPUNIT_ASSERT(so4 && so4->GetID() == so1->GetID());
 
   //Try to find SObject with empty ID
-  CPPUNIT_ASSERT(!study->FindObjectID(""));
+  //CPPUNIT_ASSERT(!study->FindObjectID(""));
 
   //Check method FindObjectByName
   std::vector< _PTR(SObject) > v = study->FindObjectByName("so1", sco1->ComponentDataType());
@@ -222,14 +222,14 @@ void SALOMEDSTest::testStudy()
   studyBuilder->Addreference(so2, so1);
   studyBuilder->Addreference(sco1, so1);
   std::vector< _PTR(SObject) > vso = study->FindDependances(so1);
-  CPPUNIT_ASSERT(vso.size() == 2 && vso[0]->GetID() == so2->GetID() && vso[1]->GetID() == sco1->GetID());
+  CPPUNIT_ASSERT(vso.size() == 2 && vso[0]->GetID() == sco1->GetID() && vso[1]->GetID() == so2->GetID());
 
   //Check method GetProperties
   _PTR(AttributeStudyProperties) sp = study->GetProperties();
   CPPUNIT_ASSERT(sp);
 
   //Check Lock functionality
-  sp->SetLocked(true);
+  /*sp->SetLocked(true);
   bool isLockRaised = false;
   try {
      name_attr_so1->SetValue("test");      
@@ -247,7 +247,7 @@ void SALOMEDSTest::testStudy()
   catch(...) {
     isLockRaised = true;
   }
-  CPPUNIT_ASSERT(!isLockRaised);
+  CPPUNIT_ASSERT(!isLockRaised);*/
 
   //Check method GetLastModificationDate
   sp->SetModification("srn", 1, 2, 3, 4, 5);  
@@ -329,12 +329,13 @@ void SALOMEDSTest::testStudy()
   std::fstream f("SRN.py");
   char buffer[128];
   buffer[81] = (char)0;
-  f.getline(buffer, 80);
+  for(int i=0;i<4;i++)
+    f.getline(buffer, 80);
   std::string line(buffer);
  
   f.close();
   system("rm -f SRN.py");
-  CPPUNIT_ASSERT(line == "### This file is generated by SALOME automatically by dump python functionality");
+  CPPUNIT_ASSERT(line.substr(0,50) == "### This file is generated automatically by SALOME");
 
   //Check method Close 
   bool isException = false;
index 0184bd7b471fc565eae4996ea5965316c5dd01a0..1e4ce4eef2d1f7561f082de04069a9a1a2c11345 100755 (executable)
@@ -35,36 +35,14 @@ void SALOMEDSTest::testStudyManager()
   _PTR(Study) study1 = sm->NewStudy("Study1");
   CPPUNIT_ASSERT(study1);
 
-  _PTR(Study) study2 = sm->NewStudy("Study2");
-  CPPUNIT_ASSERT(study2);
-
   //Check method GetStudyByName
   _PTR(Study) study3 = sm->GetStudyByName("Study1");
   CPPUNIT_ASSERT(study3->StudyId() == study1->StudyId());
   CPPUNIT_ASSERT(study3->Name() == study1->Name());
 
-  //Check method GetStudyByName with empty name
-  CPPUNIT_ASSERT(!sm->GetStudyByName(""));
-
-  //Try to create Study with empty name
-  _PTR(Study) study_empty = sm->NewStudy("");
-  CPPUNIT_ASSERT(study_empty);
-  CPPUNIT_ASSERT(sm->GetStudyByName(""));
-  sm->Close(study_empty);
-
-  //Check method FindStudyByID
-  _PTR(Study) study4 = sm->GetStudyByID(study2->StudyId());
-  CPPUNIT_ASSERT(study4->StudyId() == study2->StudyId());
-  CPPUNIT_ASSERT(study4->Name() == study2->Name());
-
   //Check method GetOpenStudies
   std::vector<std::string> v = sm->GetOpenStudies();
-  CPPUNIT_ASSERT(v.size() == 2);
-
-  //Check method Close
-  int id = study2->StudyId();
-  sm->Close(study2);
-  CPPUNIT_ASSERT(!sm->GetStudyByID(id));
+  CPPUNIT_ASSERT(v.size() == 1);
 
   //Check method GetStudyByID for invalid ID
   CPPUNIT_ASSERT(!sm->GetStudyByID(-1));
index 3234c5884379615d187e2d76e6ea492d59b1861a..759cd63fe56625cf0f6da5663d89ca81e97160cf 100644 (file)
@@ -54,8 +54,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSTest_Embedded );
 #include "SALOMEDS_StudyManager_i.hxx"
 
 #ifdef WIN32
+#include <winsock2.h>
 #define setenv Kernel_Utils::setenv
-#endif 
+#endif
 
 // ============================================================================
 /*!
@@ -66,38 +67,11 @@ CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSTest_Embedded );
 
 int main(int argc, char* argv[])
 {
-  // --- Run Salome without GUI
-
-  setenv("SALOME_trace", "file:./traceUnitTest.log", 1); // 1: overwrite
-
-  system("runSalome -t &");
-
-  // --- Wait till SALOMEDS server is launched
-  
-  char hostname[511];
-  int size;
-  gethostname(hostname, size);
-  char* chr_port = getenv("SALOMEDS_UNITTESTS_PORT");
-  std::string port;
-  if(chr_port) port = chr_port;
-  if(port.empty()) port = "2810";
-  std::string cfg_file = std::string(getenv("HOME"))+"/.omniORB_"+std::string(hostname)+"_"+port+".cfg";
-  setenv("OMNIORB_CONFIG", cfg_file.c_str(), 1);
-
   ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
-  ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
   CORBA::ORB_var orb = init(argc , argv ) ;
-  
-  #ifndef WIN32
-    sleep(15);
-  #else
-    Sleep(15000);
-  #endif
-  
-
   std::string host; // = Kernel_Utils::GetHostname();
   char* wait_Superv = getenv("SALOMEDS_UNITTESTS_WAIT_SUPERVISOR");
-  if(wait_Superv) host = Kernel_Utils::GetHostname(); 
+  if(wait_Superv) host = Kernel_Utils::GetHostname();
 
   SALOME_NamingService NS(orb);
   if(host.empty())
@@ -126,20 +100,20 @@ int main(int argc, char* argv[])
     // Activate the objects.  This tells the POA that the objects are ready to accept requests.
     PortableServer::ObjectId_var aStudyManager_iid =  poa->activate_object(aStudyManager_i);
     aStudyManager_i->register_name("/myStudyManager_embedded");
-      
+
     // Obtain a POAManager, and tell the POA to start accepting
     // requests on its objects.
     PortableServer::POAManager_var pman = poa->the_POAManager();
     pman->activate();
   }
+
 
   // --- Create the event manager and test controller
   CPPUNIT_NS::TestResult controller;
 
   // ---  Add a listener that colllects test result
   CPPUNIT_NS::TestResultCollector result;
-  controller.addListener( &result );        
+  controller.addListener( &result );
 
   // ---  Add a listener that print dots as test run.
 #ifdef WIN32
@@ -147,7 +121,7 @@ int main(int argc, char* argv[])
 #else
   CPPUNIT_NS::BriefTestProgressListener progress;
 #endif
-  controller.addListener( &progress );      
+  controller.addListener( &progress );
 
   // ---  Get the top level suite from the registry
 
@@ -166,17 +140,13 @@ int main(int argc, char* argv[])
   testFile.open("UnitTestsResult", std::ios::out |  std::ios::trunc);
   //CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr );
   CPPUNIT_NS::CompilerOutputter outputter( &result, testFile );
-  outputter.write(); 
+  outputter.write();
 
   // ---  Run the tests.
 
   bool wasSucessful = result.wasSuccessful();
   testFile.close();
 
-  // --- Kill all created Salome process
-
-  system("killSalome.py");
-
   // ---  Return error code 1 if the one of test failed.
 
   return wasSucessful ? 0 : 1;
index 19861572680ed93f924fdb29520e40d550f5ef36..231c53fe2556ea8532324127986751da34454ec1 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 IF(NOT WIN32)
-  ADD_TEST(SALOMEDSImpl python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMEDSImpl.py)
-  SET_TESTS_PROPERTIES(SALOMEDSImpl PROPERTIES
-                                     LABELS "${COMPONENT_NAME}"
-                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  SET(TEST_NAME ${COMPONENT_NAME}_SALOMEDSImpl)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMEDSImpl.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+                                    LABELS "${COMPONENT_NAME}"
+                                    ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
                       )
 ENDIF()
index 160b61620abfe1cdaa6964e18972f2d46e610355..a8397a8750254aa02de88348b78a1e74531295b3 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 IF(NOT WIN32)
-  ADD_TEST(SALOMELocalTrace python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMELocalTrace.py)
-  SET_TESTS_PROPERTIES(SALOMELocalTrace PROPERTIES
-                                     LABELS "${COMPONENT_NAME}"
-                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  SET(TEST_NAME ${COMPONENT_NAME}_LocalTrace)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMELocalTrace.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+                                    LABELS "${COMPONENT_NAME}"
+                                    ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
                       )
 ENDIF()
index 491de34ede18b2dc696d90d22cda1fbdef422714..555b36acadb27be222aeabf7ac62180621794873 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,7 @@
 #
 
 IF(NOT WIN32)
-  ADD_TEST(TestSalomeSDS python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSalomeSDS.py)
-  SET_TESTS_PROPERTIES(TestSalomeSDS PROPERTIES LABELS "${COMPONENT_NAME}" ENVIRONMENT "PYTHONPATH=${KERNEL_TEST_LIB}:$ENV{PYTHONPATH}")
+  SET(TEST_NAME ${COMPONENT_NAME}_SalomeSDS)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSalomeSDS.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" ENVIRONMENT "PYTHONPATH=${KERNEL_TEST_LIB}:$ENV{PYTHONPATH}")
 ENDIF(NOT WIN32)
index 7c3c591bcd3e4c148f6a72c843d1d80d40216ea7..4a58cb20991f8341fe736efc501ec9886f6d93c9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 IF(NOT WIN32)
-  ADD_TEST(SALOMETraceCollector python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMETraceCollector.py)
-  SET_TESTS_PROPERTIES(SALOMETraceCollector PROPERTIES
-                                     LABELS "${COMPONENT_NAME}"
-                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  SET(TEST_NAME ${COMPONENT_NAME}_SALOMETraceCollector)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMETraceCollector.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+                                    LABELS "${COMPONENT_NAME}"
+                                    ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
                       )
 ENDIF()
index d4813863dd7830ae8e3176deeba64d39eecdb56c..a9747536b0daf4d8a5183146bb83b086fa5e96b6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 IF(NOT WIN32)
-  ADD_TEST(UnitTests python ${SALOME_TEST_DRIVER} ${TIMEOUT} UnitTests.py)
-  SET_TESTS_PROPERTIES(UnitTests PROPERTIES
-                                     LABELS "${COMPONENT_NAME}"
-                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  SET(TEST_NAME ${COMPONENT_NAME}_UnitTests)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} UnitTests.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+                                    LABELS "${COMPONENT_NAME}"
+                                    ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
                       )
 
 ENDIF()
index c33e109d5747e21534b5828ee766ec1befcffa35..b6301285d29a7c31aeb59727d701a47f565b2436 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 IF(NOT WIN32)
-  ADD_TEST(Utils python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestUtils.py)
-  SET_TESTS_PROPERTIES(Utils PROPERTIES
-                             LABELS "${COMPONENT_NAME}"
-                             ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  SET(TEST_NAME ${COMPONENT_NAME}_Utils)
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestUtils.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+                                    LABELS "${COMPONENT_NAME}"
+                                    ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
                       )
 ENDIF()