From: Ovidiu Mircescu Date: Wed, 4 Mar 2020 13:07:02 +0000 (+0100) Subject: Fixes for run examples. X-Git-Tag: V9_5_0a2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=24bfeaf525cec681d613f7b8e975ef36afb7dda3;p=tools%2Fyacsgen.git Fixes for run examples. --- diff --git a/Examples/calcium1/build.sh b/Examples/calcium1/build.sh index 12c3ac0..f0eb4f5 100755 --- a/Examples/calcium1/build.sh +++ b/Examples/calcium1/build.sh @@ -1,6 +1,7 @@ -source ../exec.sh -make -python components.py +../exec.sh make +../exec.sh python components.py # test +appli/salome -t appli/salome shell ../test_compo.py +appli/salome killall diff --git a/Examples/calcium2/build.sh b/Examples/calcium2/build.sh index 4873413..f0eb4f5 100755 --- a/Examples/calcium2/build.sh +++ b/Examples/calcium2/build.sh @@ -1,7 +1,7 @@ -source ../exec.sh -make -python components.py +../exec.sh make +../exec.sh python components.py # test +appli/salome -t appli/salome shell ../test_compo.py - +appli/salome killall diff --git a/Examples/cpp1/build.sh b/Examples/cpp1/build.sh index e8aa57a..b3393d2 100755 --- a/Examples/cpp1/build.sh +++ b/Examples/cpp1/build.sh @@ -1,5 +1,6 @@ ../exec.sh python components.py # test +appli/salome -t appli/salome shell ../test_compo.py - +appli/salome killall diff --git a/Examples/cpp2/build.sh b/Examples/cpp2/build.sh index a791344..fb9970b 100755 --- a/Examples/cpp2/build.sh +++ b/Examples/cpp2/build.sh @@ -1,7 +1,7 @@ -source ../exec.sh -python components.py -make +../exec.sh python components.py +../exec.sh make # test +appli/salome -t appli/salome shell ../test_compo.py - +appli/salome killall diff --git a/Examples/fort1/build.sh b/Examples/fort1/build.sh index 4873413..f0eb4f5 100755 --- a/Examples/fort1/build.sh +++ b/Examples/fort1/build.sh @@ -1,7 +1,7 @@ -source ../exec.sh -make -python components.py +../exec.sh make +../exec.sh python components.py # test +appli/salome -t appli/salome shell ../test_compo.py - +appli/salome killall diff --git a/Examples/fort2/build.sh b/Examples/fort2/build.sh index a791344..fb9970b 100755 --- a/Examples/fort2/build.sh +++ b/Examples/fort2/build.sh @@ -1,7 +1,7 @@ -source ../exec.sh -python components.py -make +../exec.sh python components.py +../exec.sh make # test +appli/salome -t appli/salome shell ../test_compo.py - +appli/salome killall diff --git a/Examples/mpi1/build.sh b/Examples/mpi1/build.sh index 34ef8e0..1aa6cdc 100755 --- a/Examples/mpi1/build.sh +++ b/Examples/mpi1/build.sh @@ -2,5 +2,6 @@ ../exec.sh python components.py # test +appli/salome -t appli/salome shell ../test_compo.py - +appli/salome killall diff --git a/Examples/parahxx1/build.sh b/Examples/parahxx1/build.sh index 5578fe9..0feb9de 100755 --- a/Examples/parahxx1/build.sh +++ b/Examples/parahxx1/build.sh @@ -1,5 +1,6 @@ ../exec.sh python components.py # test +LD_LIBRARY_PATH=`pwd`/../mpi1/mpilib/lib/ appli/salome -t LD_LIBRARY_PATH=`pwd`/../mpi1/mpilib/lib/ appli/salome shell ../test_compo.py - +appli/salome killall diff --git a/Examples/pyth1/build.sh b/Examples/pyth1/build.sh index e8aa57a..b3393d2 100755 --- a/Examples/pyth1/build.sh +++ b/Examples/pyth1/build.sh @@ -1,5 +1,6 @@ ../exec.sh python components.py # test +appli/salome -t appli/salome shell ../test_compo.py - +appli/salome killall diff --git a/Examples/pyth2/build.sh b/Examples/pyth2/build.sh index e8aa57a..b3393d2 100755 --- a/Examples/pyth2/build.sh +++ b/Examples/pyth2/build.sh @@ -1,5 +1,6 @@ ../exec.sh python components.py # test +appli/salome -t appli/salome shell ../test_compo.py - +appli/salome killall diff --git a/Examples/test_compo.py b/Examples/test_compo.py index 1349bf5..283e678 100755 --- a/Examples/test_compo.py +++ b/Examples/test_compo.py @@ -8,22 +8,9 @@ import os import sys import imp -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 - try: - salome_module.main(["start", "-t"]) - except SystemExit as e: - pass - import runSession - runSession.configureSession() - import setenv - setenv.main(True) - # creat study and load catalogs import SALOMERuntime SALOMERuntime.RuntimeSALOME_setRuntime() @@ -52,9 +39,6 @@ class TestCompo(unittest.TestCase): self.assertEqual(p.getEffectiveState(), pilot.DONE) def tearDown(self): - try: - salome_module.main(["killall"]) - except SystemExit as e: pass if __name__ == '__main__': diff --git a/Examples/types1/build.sh b/Examples/types1/build.sh index e8aa57a..b3393d2 100755 --- a/Examples/types1/build.sh +++ b/Examples/types1/build.sh @@ -1,5 +1,6 @@ ../exec.sh python components.py # test +appli/salome -t appli/salome shell ../test_compo.py - +appli/salome killall