From: vsr Date: Mon, 1 Nov 2021 16:39:27 +0000 (+0300) Subject: Fix 'make test' in WOGUI mode - some tests can be only executed in GUI session X-Git-Tag: V9_8_0b1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d66d74bc357054baec8722755c308ba4ab577c3f;p=plugins%2Fgmshplugin.git Fix 'make test' in WOGUI mode - some tests can be only executed in GUI session --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8d27976..0bd2959 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -21,6 +21,12 @@ INCLUDE(tests.set) +IF(SALOME_BUILD_GUI) + SET(TEST_SCRIPTS ${TEST_NAMES}) +ELSE() + SET(TEST_SCRIPTS ${TUI_NAMES}) +ENDIF() + SET(COMPONENT_NAME GMSHPLUGIN) SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py") SET(TIMEOUT 300) @@ -30,7 +36,7 @@ SET(TEST_INSTALL_DIRECTORY ${SALOME_GMSHPLUGIN_INSTALL_TESTS}) # make test SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) -FOREACH(tfile ${TEST_NAMES}) +FOREACH(tfile ${TEST_SCRIPTS}) SET(TEST_NAME ${COMPONENT_NAME}_${tfile}) ADD_TEST(NAME ${TEST_NAME} COMMAND ${PYTHON_EXECUTABLE} -B ${SALOME_TEST_DRIVER} ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py) @@ -48,4 +54,4 @@ INSTALL(FILES CTestTestfileInstall.cmake DESTINATION ${TEST_INSTALL_DIRECTORY} RENAME CTestTestfile.cmake) -INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) \ No newline at end of file +INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) diff --git a/tests/tests.set b/tests/tests.set index 3c3928b..29580b7 100644 --- a/tests/tests.set +++ b/tests/tests.set @@ -19,10 +19,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(TEST_NAMES +SET(TUI_NAMES basicGroup - gmsh_compound_mesh_2d - gmsh_compound_mesh_3d gmsh_tetra_algorithms_for_box gmsh_triangulation_algorithms_for_square ) +SET(GUI_NAMES + gmsh_compound_mesh_2d + gmsh_compound_mesh_3d +) + +SET(TEST_NAMES ${TUI_NAMES} ${GUI_NAMES})