Salome HOME
Replace "runSession" calls by "salome shell". omu/generate_cmake
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 28 Apr 2014 09:41:36 +0000 (11:41 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 28 Apr 2014 09:41:36 +0000 (11:41 +0200)
"salome shell script.sh" was fixed in KERNEL (commit c5187011)
and it returns the return value of script.sh, the same behaviour
as runSession.

Examples/calcium1/build.sh
Examples/calcium2/build.sh
Examples/cpp1/build.sh
Examples/cpp2/build.sh
Examples/fort1/build.sh
Examples/fort2/build.sh
Examples/pyth1/build.sh
Examples/pyth2/build.sh
Examples/test_compo.py
Examples/types1/build.sh

index f0cdb2da6c730d15aa319fe8b5269bc5747838d3..12c3ac0d166c38a9bb81618e055bdb4b0e9652e3 100755 (executable)
@@ -3,4 +3,4 @@ make
 python components.py
 
 # test
-appli/runSession ../test_compo.py
+appli/salome shell ../test_compo.py
index f7d4916be0671b543eb7dff0e61b220dc63077bf..48734135cc93e5debda9116a54e2401a0185f947 100755 (executable)
@@ -3,5 +3,5 @@ make
 python components.py
 
 # test
-appli/runSession ../test_compo.py
+appli/salome shell ../test_compo.py
 
index c23f5caba5329b46cc6205b44bc8259b09ab5d94..e8aa57aed5dd5c3bce41cc24c5cf4bd24fc4ef0d 100755 (executable)
@@ -1,5 +1,5 @@
 ../exec.sh python components.py
 
 # test
-appli/runSession ../test_compo.py
+appli/salome shell ../test_compo.py
 
index c7dfc37d6609b16465683de0eef5c0505de53fdf..a79134482870e8b21da0be405abc3e6c004f2c03 100755 (executable)
@@ -3,5 +3,5 @@ python components.py
 make
 
 # test
-appli/runSession ../test_compo.py
+appli/salome shell ../test_compo.py
 
index f7d4916be0671b543eb7dff0e61b220dc63077bf..48734135cc93e5debda9116a54e2401a0185f947 100755 (executable)
@@ -3,5 +3,5 @@ make
 python components.py
 
 # test
-appli/runSession ../test_compo.py
+appli/salome shell ../test_compo.py
 
index c7dfc37d6609b16465683de0eef5c0505de53fdf..a79134482870e8b21da0be405abc3e6c004f2c03 100755 (executable)
@@ -3,5 +3,5 @@ python components.py
 make
 
 # test
-appli/runSession ../test_compo.py
+appli/salome shell ../test_compo.py
 
index c23f5caba5329b46cc6205b44bc8259b09ab5d94..e8aa57aed5dd5c3bce41cc24c5cf4bd24fc4ef0d 100755 (executable)
@@ -1,5 +1,5 @@
 ../exec.sh python components.py
 
 # test
-appli/runSession ../test_compo.py
+appli/salome shell ../test_compo.py
 
index c23f5caba5329b46cc6205b44bc8259b09ab5d94..e8aa57aed5dd5c3bce41cc24c5cf4bd24fc4ef0d 100755 (executable)
@@ -1,5 +1,5 @@
 ../exec.sh python components.py
 
 # test
-appli/runSession ../test_compo.py
+appli/salome shell ../test_compo.py
 
index d006b7e6590761713eb381d725327e172659aea2..02dd33f66c46e440e320f2fda0dfcaad59c0b1e0 100755 (executable)
@@ -8,12 +8,17 @@ import os
 import sys
 
 import imp
-salome_module = imp.load_source("SALOME", os.path.join("appli", "salome"))
+appli_dir = "appli"
+sys.path[:0] = [os.path.join(appli_dir, "bin", "salome", "appliskel")]
+salome_module = imp.load_source("SALOME", os.path.join(appli_dir, "salome"))
 
 class TestCompo(unittest.TestCase):
   def setUp(self):
     #start salome and connect to it
-    salome_module.main(["start", "-t"])
+    try:
+      salome_module.main(["start", "-t"])
+    except SystemExit, e:
+      pass
     import runSession
     runSession.configureSession()
     import setenv
@@ -47,7 +52,10 @@ class TestCompo(unittest.TestCase):
     self.assertEqual(p.getEffectiveState(), pilot.DONE)
     
   def tearDown(self):
-    salome_module.main(["killall"])
+    try:
+      salome_module.main(["killall"])
+    except SystemExit, e:
+      pass
   
 if __name__ == '__main__':
     unittest.main()
index c23f5caba5329b46cc6205b44bc8259b09ab5d94..e8aa57aed5dd5c3bce41cc24c5cf4bd24fc4ef0d 100755 (executable)
@@ -1,5 +1,5 @@
 ../exec.sh python components.py
 
 # test
-appli/runSession ../test_compo.py
+appli/salome shell ../test_compo.py