From e60606c486712ba98798a4954b6be561fb0ec380 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Mon, 19 Jun 2017 10:55:59 +0200 Subject: [PATCH] Share test definition --- doc/salome/examples/CMakeLists.txt | 161 +--------------- .../examples/CTestTestfileInstall.cmake | 126 +------------ doc/salome/examples/tests.set | 175 ++++++++++++++++++ 3 files changed, 181 insertions(+), 281 deletions(-) create mode 100644 doc/salome/examples/tests.set diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 552a9d1b2..a6bb9f290 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2017 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,169 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# examples that can't be used for testing because they use external mesher plug-ins -SET(BAD_TESTS - 3dmesh.py - a3DmeshOnModified2Dmesh.py - creating_meshes_ex01.py - creating_meshes_ex03.py - creating_meshes_ex05.py - defining_hypotheses_ex06.py - defining_hypotheses_ex09.py - defining_hypotheses_ex17.py - filters_ex02.py - filters_ex08.py - filters_ex23.py - filters_ex24.py - filters_ex25.py - filters_ex32.py - filters_ex35.py - generate_flat_elements.py - modifying_meshes_ex26.py - notebook_smesh.py - quality_controls_ex06.py - quality_controls_ex20.py - quality_controls_ex21.py - quality_controls_ex22.py - viewing_meshes_ex01.py - ) - -SET(GOOD_TESTS - cartesian_algo.py - creating_meshes_ex02.py - creating_meshes_ex04.py - creating_meshes_ex06.py - creating_meshes_ex07.py - creating_meshes_ex08.py - defining_hypotheses_ex01.py - defining_hypotheses_ex02.py - defining_hypotheses_ex03.py - defining_hypotheses_ex04.py - defining_hypotheses_ex05.py - defining_hypotheses_ex07.py - defining_hypotheses_ex08.py - defining_hypotheses_ex10.py - defining_hypotheses_ex11.py - defining_hypotheses_ex12.py - defining_hypotheses_ex13.py - defining_hypotheses_ex14.py - defining_hypotheses_ex15.py - defining_hypotheses_ex16.py - defining_hypotheses_adaptive1d.py - filters_ex01.py - filters_ex03.py - filters_ex04.py - filters_ex05.py - filters_ex06.py - filters_ex07.py - filters_ex09.py - filters_ex10.py - filters_ex11.py - filters_ex12.py - filters_ex13.py - filters_ex14.py - filters_ex15.py - filters_ex16.py - filters_ex17.py - filters_ex18.py - filters_ex19.py - filters_ex20.py - filters_ex21.py - filters_ex22.py - filters_ex26.py - filters_ex27.py - filters_ex28.py - filters_ex29.py - filters_ex30.py - filters_ex31.py - filters_ex33.py - filters_ex34.py - filters_ex36.py - filters_ex37.py - filters_ex38.py - filters_ex39.py - filters_node_nb_conn.py - filters_belong2group.py - grouping_elements_ex01.py - grouping_elements_ex02.py - grouping_elements_ex03.py - grouping_elements_ex04.py - grouping_elements_ex05.py - grouping_elements_ex06.py - grouping_elements_ex07.py - grouping_elements_ex08.py - measurements_ex01.py - measurements_ex02.py - modifying_meshes_ex01.py - modifying_meshes_ex02.py - modifying_meshes_ex03.py - modifying_meshes_ex04.py - modifying_meshes_ex05.py - modifying_meshes_ex06.py - modifying_meshes_ex07.py - modifying_meshes_ex08.py - modifying_meshes_ex09.py - modifying_meshes_ex10.py - modifying_meshes_ex11.py - modifying_meshes_ex12.py - modifying_meshes_ex13.py - modifying_meshes_ex14.py - modifying_meshes_ex15.py - modifying_meshes_ex16.py - modifying_meshes_ex17.py - modifying_meshes_ex18.py - modifying_meshes_ex19.py - modifying_meshes_ex20.py - modifying_meshes_ex21.py - modifying_meshes_ex22.py - modifying_meshes_ex23.py - modifying_meshes_ex24.py - modifying_meshes_ex25.py - prism_3d_algo.py - quality_controls_ex01.py - quality_controls_ex02.py - quality_controls_ex03.py - quality_controls_ex04.py - quality_controls_ex05.py - quality_controls_ex07.py - quality_controls_ex08.py - quality_controls_ex09.py - quality_controls_ex10.py - quality_controls_ex11.py - quality_controls_ex12.py - quality_controls_ex13.py - quality_controls_ex14.py - quality_controls_ex15.py - quality_controls_ex16.py - quality_controls_ex17.py - quality_controls_ex18.py - quality_controls_ex19.py - transforming_meshes_ex01.py - transforming_meshes_ex02.py - transforming_meshes_ex03.py - transforming_meshes_ex04.py - transforming_meshes_ex05.py - transforming_meshes_ex06.py - transforming_meshes_ex07.py - transforming_meshes_ex08.py - transforming_meshes_ex09.py - transforming_meshes_ex10.py - transforming_meshes_ex11.py - transforming_meshes_ex12.py - transforming_meshes_ex13.py - use_existing_faces.py - viewing_meshes_ex02.py - split_biquad.py -) - -SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py) +INCLUDE(tests.set) SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) FOREACH(test ${GOOD_TESTS}) GET_FILENAME_COMPONENT(testname ${test} NAME_WE) ADD_TEST(NAME ${testname} - COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_SOURCE_DIR}/doc/salome/examples/testme.py ${CMAKE_CURRENT_SOURCE_DIR}/${test}) + COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_SOURCE_DIR}/doc/salome/examples/testme.py ${CMAKE_CURRENT_SOURCE_DIR}/${test}.py) SET_TESTS_PROPERTIES(${testname} PROPERTIES ENVIRONMENT "${tests_env}") ENDFOREACH() diff --git a/doc/salome/examples/CTestTestfileInstall.cmake b/doc/salome/examples/CTestTestfileInstall.cmake index d56f42065..2e5de135a 100644 --- a/doc/salome/examples/CTestTestfileInstall.cmake +++ b/doc/salome/examples/CTestTestfileInstall.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2016 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2015-2017 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,132 +17,12 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(tests.set) + SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py") SET(COMPONENT_NAME SMESH) SET(TIMEOUT 300) -SET(GOOD_TESTS - cartesian_algo - creating_meshes_ex02 - creating_meshes_ex04 - creating_meshes_ex06 - creating_meshes_ex07 - creating_meshes_ex08 - defining_hypotheses_ex01 - defining_hypotheses_ex02 - defining_hypotheses_ex03 - defining_hypotheses_ex04 - defining_hypotheses_ex05 - defining_hypotheses_ex07 - defining_hypotheses_ex08 - defining_hypotheses_ex10 - defining_hypotheses_ex11 - defining_hypotheses_ex12 - defining_hypotheses_ex13 - defining_hypotheses_ex14 - defining_hypotheses_ex15 - defining_hypotheses_ex16 - defining_hypotheses_adaptive1d - filters_ex01 - filters_ex03 - filters_ex04 - filters_ex05 - filters_ex06 - filters_ex07 - filters_ex09 - filters_ex10 - filters_ex11 - filters_ex12 - filters_ex13 - filters_ex14 - filters_ex15 - filters_ex16 - filters_ex17 - filters_ex18 - filters_ex19 - filters_ex20 - filters_ex21 - filters_ex22 - filters_ex26 - filters_ex27 - filters_ex28 - filters_ex29 - filters_ex30 - filters_ex31 - filters_ex33 - filters_ex34 - filters_ex36 - grouping_elements_ex01 - grouping_elements_ex02 - grouping_elements_ex03 - grouping_elements_ex04 - grouping_elements_ex05 - grouping_elements_ex06 - grouping_elements_ex07 - grouping_elements_ex08 - measurements_ex01 - measurements_ex02 - modifying_meshes_ex01 - modifying_meshes_ex02 - modifying_meshes_ex03 - modifying_meshes_ex04 - modifying_meshes_ex05 - modifying_meshes_ex06 - modifying_meshes_ex07 - modifying_meshes_ex08 - modifying_meshes_ex09 - modifying_meshes_ex10 - modifying_meshes_ex11 - modifying_meshes_ex12 - modifying_meshes_ex13 - modifying_meshes_ex14 - modifying_meshes_ex15 - modifying_meshes_ex16 - modifying_meshes_ex17 - modifying_meshes_ex18 - modifying_meshes_ex19 - modifying_meshes_ex20 - modifying_meshes_ex21 - modifying_meshes_ex22 - modifying_meshes_ex23 - modifying_meshes_ex24 - modifying_meshes_ex25 - prism_3d_algo - quality_controls_ex01 - quality_controls_ex02 - quality_controls_ex03 - quality_controls_ex04 - quality_controls_ex05 - quality_controls_ex07 - quality_controls_ex08 - quality_controls_ex09 - quality_controls_ex10 - quality_controls_ex11 - quality_controls_ex12 - quality_controls_ex13 - quality_controls_ex14 - quality_controls_ex15 - quality_controls_ex16 - quality_controls_ex17 - quality_controls_ex18 - quality_controls_ex19 - transforming_meshes_ex01 - transforming_meshes_ex02 - transforming_meshes_ex03 - transforming_meshes_ex04 - transforming_meshes_ex05 - transforming_meshes_ex06 - transforming_meshes_ex07 - transforming_meshes_ex08 - transforming_meshes_ex09 - transforming_meshes_ex10 - transforming_meshes_ex11 - transforming_meshes_ex12 - transforming_meshes_ex13 - use_existing_faces - viewing_meshes_ex02 -) - FOREACH(tfile ${GOOD_TESTS}) SET(TEST_NAME SMESH_${tfile}) ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py) diff --git a/doc/salome/examples/tests.set b/doc/salome/examples/tests.set new file mode 100644 index 000000000..979f571c6 --- /dev/null +++ b/doc/salome/examples/tests.set @@ -0,0 +1,175 @@ +# Copyright (C) 2015-2017 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +# examples that can't be used for testing because they use external mesher plug-ins +SET(BAD_TESTS + 3dmesh + a3DmeshOnModified2Dmesh + creating_meshes_ex01 + creating_meshes_ex03 + creating_meshes_ex05 + defining_hypotheses_ex06 + defining_hypotheses_ex09 + defining_hypotheses_ex17 + filters_ex02 + filters_ex08 + filters_ex23 + filters_ex24 + filters_ex25 + filters_ex32 + filters_ex35 + generate_flat_elements + modifying_meshes_ex26 + notebook_smesh + quality_controls_ex06 + quality_controls_ex20 + quality_controls_ex21 + quality_controls_ex22 + viewing_meshes_ex01 + ) + +SET(GOOD_TESTS + cartesian_algo + creating_meshes_ex02 + creating_meshes_ex04 + creating_meshes_ex06 + creating_meshes_ex07 + creating_meshes_ex08 + defining_hypotheses_ex01 + defining_hypotheses_ex02 + defining_hypotheses_ex03 + defining_hypotheses_ex04 + defining_hypotheses_ex05 + defining_hypotheses_ex07 + defining_hypotheses_ex08 + defining_hypotheses_ex10 + defining_hypotheses_ex11 + defining_hypotheses_ex12 + defining_hypotheses_ex13 + defining_hypotheses_ex14 + defining_hypotheses_ex15 + defining_hypotheses_ex16 + defining_hypotheses_adaptive1d + filters_ex01 + filters_ex03 + filters_ex04 + filters_ex05 + filters_ex06 + filters_ex07 + filters_ex09 + filters_ex10 + filters_ex11 + filters_ex12 + filters_ex13 + filters_ex14 + filters_ex15 + filters_ex16 + filters_ex17 + filters_ex18 + filters_ex19 + filters_ex20 + filters_ex21 + filters_ex22 + filters_ex26 + filters_ex27 + filters_ex28 + filters_ex29 + filters_ex30 + filters_ex31 + filters_ex33 + filters_ex34 + filters_ex36 + filters_ex37 + filters_ex38 + filters_ex39 + filters_node_nb_conn + filters_belong2group + grouping_elements_ex01 + grouping_elements_ex02 + grouping_elements_ex03 + grouping_elements_ex04 + grouping_elements_ex05 + grouping_elements_ex06 + grouping_elements_ex07 + grouping_elements_ex08 + measurements_ex01 + measurements_ex02 + modifying_meshes_ex01 + modifying_meshes_ex02 + modifying_meshes_ex03 + modifying_meshes_ex04 + modifying_meshes_ex05 + modifying_meshes_ex06 + modifying_meshes_ex07 + modifying_meshes_ex08 + modifying_meshes_ex09 + modifying_meshes_ex10 + modifying_meshes_ex11 + modifying_meshes_ex12 + modifying_meshes_ex13 + modifying_meshes_ex14 + modifying_meshes_ex15 + modifying_meshes_ex16 + modifying_meshes_ex17 + modifying_meshes_ex18 + modifying_meshes_ex19 + modifying_meshes_ex20 + modifying_meshes_ex21 + modifying_meshes_ex22 + modifying_meshes_ex23 + modifying_meshes_ex24 + modifying_meshes_ex25 + prism_3d_algo + quality_controls_ex01 + quality_controls_ex02 + quality_controls_ex03 + quality_controls_ex04 + quality_controls_ex05 + quality_controls_ex07 + quality_controls_ex08 + quality_controls_ex09 + quality_controls_ex10 + quality_controls_ex11 + quality_controls_ex12 + quality_controls_ex13 + quality_controls_ex14 + quality_controls_ex15 + quality_controls_ex16 + quality_controls_ex17 + quality_controls_ex18 + quality_controls_ex19 + transforming_meshes_ex01 + transforming_meshes_ex02 + transforming_meshes_ex03 + transforming_meshes_ex04 + transforming_meshes_ex05 + transforming_meshes_ex06 + transforming_meshes_ex07 + transforming_meshes_ex08 + transforming_meshes_ex09 + transforming_meshes_ex10 + transforming_meshes_ex11 + transforming_meshes_ex12 + transforming_meshes_ex13 + use_existing_faces + viewing_meshes_ex02 + split_biquad +) + +SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme) -- 2.39.2