Salome HOME
SSL mode by default mode
[modules/kernel.git] / src / SALOMEDSImpl / Test / TestSALOMEDSImpl.py
index 97abd2542d76e9ea1edda5e5a5604d573be35721..da97104a958354f614613b5486b85bf88d95fe15 100644 (file)
@@ -1,33 +1,37 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2021  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
+# 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.
+# 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.
+# 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
+# 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
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-import sys, os,signal,string,commands
-import runSalome
+
+import sys, os,signal,string,subprocess
+import subprocess
+import runSalomeOld
 import orbmodule
 import TestKiller
+import setenv
 
 # get SALOME environment :
 
-args, modules_list, modules_root_dir = runSalome.get_config()
-runSalome.set_env(args, modules_list, modules_root_dir)
+args, modules_list, modules_root_dir = setenv.get_config()
+setenv.set_env(args, modules_list, modules_root_dir)
 
 # launch CORBA naming server
 
@@ -35,15 +39,17 @@ clt=orbmodule.client()
 
 # launch CORBA logger server
 
-myServer=runSalome.LoggerServer(args)
+myServer=runSalomeOld.LoggerServer(args)
 myServer.run()
 clt.waitLogger("Logger")
 
 # execute Unit Test
 
-command = ['TestSALOMEDSImpl']
-ret = os.spawnvp(os.P_WAIT, command[0], command)
+command = ['./TestSALOMEDSImpl']
+ret = subprocess.call(command)
 
-# kill Test process 
+# kill Test process
 
-TestKiller.killProcess(runSalome.process_id)
+TestKiller.killProcess(runSalomeOld.process_id)
+TestKiller.closeSalome()
+exit(ret)