]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Revert wrong vsr/18951-1 branch integration V9_6_0a2
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 7 Oct 2020 07:47:21 +0000 (09:47 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 7 Oct 2020 07:47:21 +0000 (09:47 +0200)
src/Plugins/MEDReader/plugin/CMakeLists.txt
src/Plugins/MEDReader/plugin/Test/CMakeLists.txt

index 7d6400bd4c7d73f1dcd9c9f9171708f837810576..a69b7aa6ef2048154803c4dd30f42fc5c80832a7 100644 (file)
@@ -53,7 +53,7 @@ SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/lib
 add_subdirectory(MEDLoaderForPV)
 add_subdirectory(ParaViewPlugin)
 
-SET(SALOME_BUILD_TESTS ON CACHE BOOL "Enable testing")
-if (SALOME_BUILD_TESTS)
+option(BUILD_TESTING "Build Plugin Testing" OFF)
+if (BUILD_TESTING)
   add_subdirectory(Test)
 endif()
index 6507d613720217147074729f58c288914b620056..87f3f112be7494f3f83e03ec952c5e2854615edd 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-if(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
-  salome_generate_tests_environment(tests_env)
-  list(APPEND tests_env "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data")
-endif()
-
 if (PARAVIEW_ENABLE_PYTHON)
   file(GLOB pythonTests *.py)
   list(FILTER pythonTests EXCLUDE REGEX ".*MEDReaderHelper.py$")
-  list(FILTER pythonTests EXCLUDE REGEX ".*medreadertestlauncher.py$")
   foreach(testFullPath ${pythonTests})
     get_filename_component(testFile ${testFullPath} NAME)
+    paraview_add_test_python(NO_RT DIRECT_DATA ${testFile})
     get_filename_component(testName ${testFile} NAME_WE)
-    if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
-      paraview_add_test_python(NO_RT DIRECT_DATA ${testFile})
-      set_tests_properties(Python-${testName} PROPERTIES ENVIRONMENT "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data;LD_LIBRARY_PATH=${QT5_ROOT_DIR}/lib/:${MEDCOUPLING_ROOT_DIR}/lib/:${MEDFILE_ROOT_DIR}/lib/:${HDF5_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib;PYTHONPATH=${MEDCOUPLING_ROOT_DIR}/lib/python3.6/site-packages/;PV_PLUGIN_PATH=${CMAKE_BINARY_DIR}/lib/paraview-5.7/plugins/MEDReader;PARAVIEW_BIN_DIR=${ParaView_DIR}/bin/")
-    else()
-      set(_helper_script ${CMAKE_CURRENT_SOURCE_DIR}/medreadertestlauncher.py)
-      set(_baseline_dir ${CMAKE_CURRENT_SOURCE_DIR}/Data/Baseline)
-      add_test(Python-${testName}
-               ${PYTHON_EXECUTABLE}
-               ${CMAKE_CURRENT_SOURCE_DIR}/medreadertestlauncher.py ${CMAKE_CURRENT_SOURCE_DIR}/${testFile}
-               ${_baseline_dir})
-      set_tests_properties(Python-${testName} PROPERTIES ENVIRONMENT "${tests_env}")
-    endif()
+    set_tests_properties(Python-${testName} PROPERTIES ENVIRONMENT "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data;LD_LIBRARY_PATH=${QT5_ROOT_DIR}/lib/:${MEDCOUPLING_ROOT_DIR}/lib/:${MEDFILE_ROOT_DIR}/lib/:${HDF5_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib;PYTHONPATH=${MEDCOUPLING_ROOT_DIR}/lib/python3.6/site-packages/;PV_PLUGIN_PATH=${CMAKE_BINARY_DIR}/lib/paraview-5.7/plugins/MEDReader;PARAVIEW_BIN_DIR=${ParaView_DIR}/bin/")
   endforeach()
 endif()
 
-if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR AND PARAVIEW_USE_QT)
+if (PARAVIEW_USE_QT)
   file(GLOB xmlTests *.xml)
   foreach(testFullPath ${xmlTests})
     get_filename_component(testFile ${testFullPath} NAME)
@@ -55,6 +39,6 @@ if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR AND PARAVIEW_USE_QT)
       PLUGIN_PATH $<TARGET_FILE_DIR:MEDReader>
       BASELINE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Data/Baseline
       TEST_SCRIPTS ${testFile})
-      set_tests_properties(pv.${testName} PROPERTIES ENVIRONMENT "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data;LD_LIBRARY_PATH=${QT5_ROOT_DIR}/lib/:${MEDCOUPLING_ROOT_DIR}/lib/:${MEDFILE_ROOT_DIR}/lib/:${HDF5_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib")
+    set_tests_properties(pv.${testName} PROPERTIES ENVIRONMENT "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data;LD_LIBRARY_PATH=${QT5_ROOT_DIR}/lib/:${MEDCOUPLING_ROOT_DIR}/lib/:${MEDFILE_ROOT_DIR}/lib/:${HDF5_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib")
   endforeach()
 endif()