From: Gérald NICOLAS Date: Mon, 11 Oct 2021 15:02:27 +0000 (+0200) Subject: Pour passage des tests en scibian 10 X-Git-Tag: V9_8_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b22e22d8c7ec51a838192522d0f1b801f3366eba;p=modules%2Fhomard.git Pour passage des tests en scibian 10 --- diff --git a/doc/files/tutorial_1.00.med b/doc/files/tutorial_1.00.med deleted file mode 100644 index a0b62c6d..00000000 Binary files a/doc/files/tutorial_1.00.med and /dev/null differ diff --git a/doc/files/tutorial_1.00.med b/doc/files/tutorial_1.00.med new file mode 120000 index 00000000..0e3f5130 --- /dev/null +++ b/doc/files/tutorial_1.00.med @@ -0,0 +1 @@ +../../src/tests/samples/tutorial_1.00.med \ No newline at end of file diff --git a/doc/files/tutorial_2.00.med b/doc/files/tutorial_2.00.med deleted file mode 100644 index 0cdab23a..00000000 Binary files a/doc/files/tutorial_2.00.med and /dev/null differ diff --git a/doc/files/tutorial_2.00.med b/doc/files/tutorial_2.00.med new file mode 120000 index 00000000..9c5ecc17 --- /dev/null +++ b/doc/files/tutorial_2.00.med @@ -0,0 +1 @@ +../../src/tests/samples/tutorial_2.00.med \ No newline at end of file diff --git a/doc/files/tutorial_3.00.med b/doc/files/tutorial_3.00.med deleted file mode 100644 index 7b67c2cf..00000000 Binary files a/doc/files/tutorial_3.00.med and /dev/null differ diff --git a/doc/files/tutorial_3.00.med b/doc/files/tutorial_3.00.med new file mode 120000 index 00000000..c35e2056 --- /dev/null +++ b/doc/files/tutorial_3.00.med @@ -0,0 +1 @@ +../../src/tests/samples/tutorial_3.00.med \ No newline at end of file diff --git a/doc/files/tutorial_3.01.med b/doc/files/tutorial_3.01.med deleted file mode 100644 index 58c76d71..00000000 Binary files a/doc/files/tutorial_3.01.med and /dev/null differ diff --git a/doc/files/tutorial_3.01.med b/doc/files/tutorial_3.01.med new file mode 120000 index 00000000..db58ba0b --- /dev/null +++ b/doc/files/tutorial_3.01.med @@ -0,0 +1 @@ +../../src/tests/samples/tutorial_3.01.med \ No newline at end of file diff --git a/doc/files/tutorial_4.00.med b/doc/files/tutorial_4.00.med deleted file mode 100644 index 9a70e0c8..00000000 Binary files a/doc/files/tutorial_4.00.med and /dev/null differ diff --git a/doc/files/tutorial_4.00.med b/doc/files/tutorial_4.00.med new file mode 120000 index 00000000..002e98fe --- /dev/null +++ b/doc/files/tutorial_4.00.med @@ -0,0 +1 @@ +../../src/tests/samples/tutorial_4.00.med \ No newline at end of file diff --git a/doc/files/tutorial_4.xao b/doc/files/tutorial_4.xao deleted file mode 100644 index 415904a6..00000000 --- a/doc/files/tutorial_4.xao +++ /dev/null @@ -1,652 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/files/tutorial_4.xao b/doc/files/tutorial_4.xao new file mode 120000 index 00000000..991bb08a --- /dev/null +++ b/doc/files/tutorial_4.xao @@ -0,0 +1 @@ +../../src/tests/samples/tutorial_4.xao \ No newline at end of file diff --git a/doc/files/tutorial_5.00.med b/doc/files/tutorial_5.00.med deleted file mode 100644 index 9c1893a7..00000000 Binary files a/doc/files/tutorial_5.00.med and /dev/null differ diff --git a/doc/files/tutorial_5.00.med b/doc/files/tutorial_5.00.med new file mode 120000 index 00000000..28002fc5 --- /dev/null +++ b/doc/files/tutorial_5.00.med @@ -0,0 +1 @@ +../../src/tests/samples/tutorial_5.00.med \ No newline at end of file diff --git a/doc/files/tutorial_5.fr.med b/doc/files/tutorial_5.fr.med deleted file mode 100644 index d4faa4c7..00000000 Binary files a/doc/files/tutorial_5.fr.med and /dev/null differ diff --git a/doc/files/tutorial_5.fr.med b/doc/files/tutorial_5.fr.med new file mode 120000 index 00000000..4c669da2 --- /dev/null +++ b/doc/files/tutorial_5.fr.med @@ -0,0 +1 @@ +../../src/tests/samples/tutorial_5.fr.med \ No newline at end of file diff --git a/doc/files/tutorial_6.fr.med b/doc/files/tutorial_6.fr.med deleted file mode 100644 index fc27fbc3..00000000 Binary files a/doc/files/tutorial_6.fr.med and /dev/null differ diff --git a/doc/files/tutorial_6.fr.med b/doc/files/tutorial_6.fr.med new file mode 120000 index 00000000..5299ef07 --- /dev/null +++ b/doc/files/tutorial_6.fr.med @@ -0,0 +1 @@ +../../src/tests/samples/tutorial_6.fr.med \ No newline at end of file diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 8d77b373..99f9795b 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -26,5 +26,6 @@ FILE(GLOB sample_files ${PROJECT_SOURCE_DIR}/src/tests/samples/*.bilan ${PROJECT_SOURCE_DIR}/src/tests/samples/*.odt ${PROJECT_SOURCE_DIR}/src/tests/samples/*.pdf - ${PROJECT_SOURCE_DIR}/src/tests/samples/*.png) + ${PROJECT_SOURCE_DIR}/src/tests/samples/*.png + ${PROJECT_SOURCE_DIR}/src/tests/samples/*.xao) INSTALL(FILES ${sample_files} DESTINATION ${SALOME_HOMARD_INSTALL_SAMPLES}) diff --git a/src/tests/Test/test_util.py b/src/tests/Test/test_util.py index a55f6262..a39f1332 100755 --- a/src/tests/Test/test_util.py +++ b/src/tests/Test/test_util.py @@ -17,11 +17,11 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -""" -Python script for HOMARD +"""Python script for HOMARD + Utilitaires pour les tests """ -__revision__ = "V4.04" +__revision__ = "V4.06" import os import tempfile @@ -52,19 +52,6 @@ Copyright EDF 2018 # #======================================================================== #======================================================================== -def get_dir_tutorial(path_homard) : - """ -Get directory for the tutorial. -Copyright EDF 2018 - """ -# -# Répertoire des données du tutorial - data_tutorial = os.path.join(path_homard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads") - data_tutorial = os.path.normpath(data_tutorial) -# - return data_tutorial -#======================================================================== -#======================================================================== def remove_dir(directory) : """ Empties, then removes a directory. diff --git a/src/tests/Test/tutorial_1.py b/src/tests/Test/tutorial_1.py index 13eb970e..3786a7ef 100755 --- a/src/tests/Test/tutorial_1.py +++ b/src/tests/Test/tutorial_1.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_1 associe au tutorial 1 """ -__revision__ = "V4.06" +__revision__ = "V4.07" #======================================================================== TEST_NAME = "tutorial_1" @@ -38,12 +38,10 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir -from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) -DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== # import salome @@ -135,7 +133,7 @@ while not ERREUR : assert HOMARD is not None, "Impossible to load homard engine" HOMARD.SetLanguageShort("fr") # - FICMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".00.med") + FICMED = os.path.join(REP_DATA, TEST_NAME+".00.med") try: ERREUR, MESSAGE = homard_exec("MAILL", FICMED, DEBUG) except RuntimeError as eee: diff --git a/src/tests/Test/tutorial_2.py b/src/tests/Test/tutorial_2.py index 273438c6..98ec51b7 100755 --- a/src/tests/Test/tutorial_2.py +++ b/src/tests/Test/tutorial_2.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_2 associe au tutorial 2 """ -__revision__ = "V4.06" +__revision__ = "V4.07" #======================================================================== TEST_NAME = "tutorial_2" @@ -38,12 +38,10 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir -from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) -DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== # import salome @@ -152,7 +150,7 @@ while not ERREUR : assert HOMARD is not None, "Impossible to load homard engine" HOMARD.SetLanguageShort("fr") # - FICMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".00.med") + FICMED = os.path.join(REP_DATA, TEST_NAME+".00.med") try: ERREUR, MESSAGE = homard_exec("MZERO", FICMED, DEBUG) except RuntimeError as eee: diff --git a/src/tests/Test/tutorial_3.py b/src/tests/Test/tutorial_3.py index 67a8135e..e986da2f 100755 --- a/src/tests/Test/tutorial_3.py +++ b/src/tests/Test/tutorial_3.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_3 associe au tutorial 3 """ -__revision__ = "V4.06" +__revision__ = "V4.07" #======================================================================== TEST_NAME = "tutorial_3" @@ -38,12 +38,10 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir -from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) -DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== # import salome @@ -130,7 +128,7 @@ Python script for HOMARD iter_3_1 = le_cas.NextIteration('iter_3_1') iter_3_1.SetMeshName('H_1') iter_3_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med")) - iter_3_1.SetFieldFile(os.path.join(DATA_TUTORIAL, "tutorial_3.00.med")) + iter_3_1.SetFieldFile(os.path.join(REP_DATA, "tutorial_3.00.med")) iter_3_1.SetTimeStepRank( 1, 1) iter_3_1.AssociateHypo('hypo_0vers1') erreur = iter_3_1.Compute(1, option) @@ -142,7 +140,7 @@ Python script for HOMARD iter_3_2 = iter_3_1.NextIteration('iter_3_2') iter_3_2.SetMeshName('H_2') iter_3_2.SetMeshFile(os.path.join(DIRCASE, "maill.02.med")) - iter_3_2.SetFieldFile(os.path.join(DATA_TUTORIAL, "tutorial_3.01.med")) + iter_3_2.SetFieldFile(os.path.join(REP_DATA, "tutorial_3.01.med")) iter_3_2.SetTimeStepRank(1, 1) iter_3_2.AssociateHypo('hypo_1vers2') erreur = iter_3_2.Compute(1, option) @@ -154,7 +152,7 @@ Python script for HOMARD iter_3_2_bis = iter_3_1.NextIteration('iter_3_2_bis') iter_3_2_bis.SetMeshName('H_2_bis') iter_3_2_bis.SetMeshFile(os.path.join(DIRCASE, "maill.02.bis.med")) - iter_3_2_bis.SetFieldFile(os.path.join(DATA_TUTORIAL, "tutorial_3.01.med")) + iter_3_2_bis.SetFieldFile(os.path.join(REP_DATA, "tutorial_3.01.med")) iter_3_2_bis.SetTimeStepRank(1, 1) iter_3_2_bis.AssociateHypo('hypo_1vers2_bis') erreur = iter_3_2_bis.Compute(1, option) @@ -180,7 +178,7 @@ while not ERREUR : assert HOMARD is not None, "Impossible to load homard engine" HOMARD.SetLanguageShort("fr") # - FICMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".00.med") + FICMED = os.path.join(REP_DATA, TEST_NAME+".00.med") try: ERREUR, MESSAGE = homard_exec("G_0", FICMED, DEBUG) except RuntimeError as eee: diff --git a/src/tests/Test/tutorial_4.py b/src/tests/Test/tutorial_4.py index 4cec8823..07bb9dfb 100755 --- a/src/tests/Test/tutorial_4.py +++ b/src/tests/Test/tutorial_4.py @@ -23,11 +23,12 @@ Python script for HOMARD Test tutorial_4 associe au tutorial 4 """ -__revision__ = "V5.05" +__revision__ = "V5.07" #======================================================================== TEST_NAME = "tutorial_4" DEBUG = False +VERBOSE = False N_ITER_TEST_FILE = 3 #======================================================================== import os @@ -40,12 +41,10 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir -from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) -DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== # import salome @@ -164,10 +163,10 @@ while not ERREUR : assert HOMARD is not None, "Impossible to load homard engine" HOMARD.SetLanguageShort("fr") # - FICMED = os.path.join(DATA_TUTORIAL, "tutorial_4.00.med") - XAO_FILE = os.path.join(DATA_TUTORIAL, TEST_NAME+".xao") + FICMED = os.path.join(REP_DATA, "tutorial_4.00.med") + XAO_FILE = os.path.join(REP_DATA, TEST_NAME+".xao") try: - ERREUR, MESSAGE = homard_exec("PIQUAGE", FICMED, XAO_FILE, DEBUG) + ERREUR, MESSAGE = homard_exec("PIQUAGE", FICMED, XAO_FILE, VERBOSE) except RuntimeError as eee: ERREUR = 2 MESSAGE = str(eee.message) diff --git a/src/tests/Test/tutorial_5.py b/src/tests/Test/tutorial_5.py index e112c9b7..7e176d2f 100755 --- a/src/tests/Test/tutorial_5.py +++ b/src/tests/Test/tutorial_5.py @@ -23,7 +23,7 @@ Python script for HOMARD Test tutorial_5 associe au tutorial 5 """ -__revision__ = "V4.06" +__revision__ = "V4.07" #======================================================================== TEST_NAME = "tutorial_5" @@ -40,12 +40,10 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir -from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) -DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== # import salome @@ -154,8 +152,8 @@ while not ERREUR : assert HOMARD is not None, "Impossible to load homard engine" HOMARD.SetLanguageShort("fr") # - FICMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".00.med") - FICFRMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".fr.med") + FICMED = os.path.join(REP_DATA, TEST_NAME+".00.med") + FICFRMED = os.path.join(REP_DATA, TEST_NAME+".fr.med") try: ERREUR, MESSAGE = homard_exec("COEUR_2D", FICMED, "MAIL_EXT", FICFRMED, DEBUG) except RuntimeError as eee: diff --git a/src/tests/Test/tutorial_6.py b/src/tests/Test/tutorial_6.py index bae8a177..3d006be8 100755 --- a/src/tests/Test/tutorial_6.py +++ b/src/tests/Test/tutorial_6.py @@ -23,7 +23,7 @@ Python script for HOMARD Test tutorial_6 associe au tutorial 6 """ -__revision__ = "V4.06" +__revision__ = "V4.07" #======================================================================== TEST_NAME = "tutorial_6" @@ -42,12 +42,10 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir -from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) -DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== # import salome @@ -179,8 +177,8 @@ while not ERREUR : assert HOMARD is not None, "Impossible to load homard engine" HOMARD.SetLanguageShort("fr") # - FICMED = os.path.join(DATA_TUTORIAL, "tutorial_4.00.med") - FICFRMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".fr.med") + FICMED = os.path.join(REP_DATA, "tutorial_4.00.med") + FICFRMED = os.path.join(REP_DATA, TEST_NAME+".fr.med") try: ERREUR, MESSAGE = homard_exec("PIQUAGE", FICMED, "COURBES", FICFRMED, DEBUG) except RuntimeError as eee: diff --git a/src/tests/samples/tutorial_1.00.med b/src/tests/samples/tutorial_1.00.med new file mode 100644 index 00000000..a0b62c6d Binary files /dev/null and b/src/tests/samples/tutorial_1.00.med differ diff --git a/src/tests/samples/tutorial_2.00.med b/src/tests/samples/tutorial_2.00.med new file mode 100644 index 00000000..0cdab23a Binary files /dev/null and b/src/tests/samples/tutorial_2.00.med differ diff --git a/src/tests/samples/tutorial_3.00.med b/src/tests/samples/tutorial_3.00.med new file mode 100644 index 00000000..7b67c2cf Binary files /dev/null and b/src/tests/samples/tutorial_3.00.med differ diff --git a/src/tests/samples/tutorial_3.01.med b/src/tests/samples/tutorial_3.01.med new file mode 100644 index 00000000..58c76d71 Binary files /dev/null and b/src/tests/samples/tutorial_3.01.med differ diff --git a/src/tests/samples/tutorial_4.00.med b/src/tests/samples/tutorial_4.00.med new file mode 100644 index 00000000..9a70e0c8 Binary files /dev/null and b/src/tests/samples/tutorial_4.00.med differ diff --git a/src/tests/samples/tutorial_4.xao b/src/tests/samples/tutorial_4.xao new file mode 100644 index 00000000..415904a6 --- /dev/null +++ b/src/tests/samples/tutorial_4.xao @@ -0,0 +1,652 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tests/samples/tutorial_5.00.med b/src/tests/samples/tutorial_5.00.med new file mode 100644 index 00000000..9c1893a7 Binary files /dev/null and b/src/tests/samples/tutorial_5.00.med differ diff --git a/src/tests/samples/tutorial_5.fr.med b/src/tests/samples/tutorial_5.fr.med new file mode 100644 index 00000000..d4faa4c7 Binary files /dev/null and b/src/tests/samples/tutorial_5.fr.med differ diff --git a/src/tests/samples/tutorial_6.fr.med b/src/tests/samples/tutorial_6.fr.med new file mode 100644 index 00000000..fc27fbc3 Binary files /dev/null and b/src/tests/samples/tutorial_6.fr.med differ