]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Fix EDF tests agr/fix_tests V7_8_0 V7_8_0rc2
authorCédric Aguerre <cedric.aguerre@edf.fr>
Wed, 27 Jan 2016 10:20:54 +0000 (11:20 +0100)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Mon, 23 May 2016 17:29:46 +0000 (19:29 +0200)
src/Plugins/MEDReader/Test/CMakeLists.txt
src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake

index fd2950079f0bf32f4ce1a3ef0e57d3ce04e6ba6d..803fe6d0d316ecd90434138ca25a50ac5620dcaf 100644 (file)
 SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
 
 SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDReader)
+SET(BASELINES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Baselines")
 
 IF(KW_TESTING_PLATFORM)
 
-FOREACH(tfile ${TEST_NUMBERS})
-  INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py
-          DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-  INSTALL(FILES CTestTestfileInstall.cmake
-        DESTINATION ${TEST_INSTALL_DIRECTORY}
-        RENAME CTestTestfile.cmake)
-
 cmake_minimum_required(VERSION 2.7)
 
 find_package(ParaView REQUIRED)
@@ -54,13 +46,9 @@ set(PARAVIEW_CLIENT "${PARAVIEW_BIN_DIR}/paraview")
 set(PARAVIEW_SERVER "${PARAVIEW_BIN_DIR}/pvserver")
 set(PVPYTHON "${PARAVIEW_BIN_DIR}/pvpython")
 
-set(BASELINES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Baselines")
 set(PYTHON_SCRIPTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
 set(TEMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/Testing/Temporary")
 
-# Application tests
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDReader)
-
 if(NOT EXISTS ${TEMP_DIR})
   file(MAKE_DIRECTORY ${TEMP_DIR})
 endif()
@@ -98,12 +86,24 @@ ELSE(KW_TESTING_PLATFORM)
 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
 
 FOREACH(tfile ${TEST_NUMBERS})
-  ADD_TEST(testMEDReader${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py -B ${CMAKE_CURRENT_SOURCE_DIR}/Baselines )
+  ADD_TEST(testMEDReader${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py -B ${BASELINES_DIR} )
   SET_TESTS_PROPERTIES(testMEDReader${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
 
 ENDIF(KW_TESTING_PLATFORM)
 
+
+# Application tests
+FOREACH(tfile ${TEST_NUMBERS})
+  INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py
+          DESTINATION ${TEST_INSTALL_DIRECTORY})
+ENDFOREACH()
+
+FILE(GLOB BASELINE_FILES "${BASELINES_DIR}/*")
+FOREACH(baseline_file ${BASELINE_FILES})
+  INSTALL(FILES ${baseline_file} DESTINATION ${TEST_INSTALL_DIRECTORY}/Baselines)
+ENDFOREACH()
+
 INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${TEST_INSTALL_DIRECTORY}
         RENAME CTestTestfile.cmake)
index bc62bb7ff419ecbb2d151ae757a444ce00bd420f..ea816efb75ee4dc47e815bffa5735368cdb58838 100644 (file)
@@ -22,10 +22,11 @@ SET(COMPONENT_NAME MEDREADER)
 SET(TIMEOUT        30)
 
 SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18)
+set(BASELINES_DIR "Baselines")
 
 FOREACH(tfile ${TEST_NUMBERS})
   SET(TEST_NAME MEDREADER_${tfile})
-  ADD_TEST(${TEST_NAME} python testMEDReader${tfile}.py)
-  #ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} testMEDReader${tfile}.py)
+  ADD_TEST(${TEST_NAME} python testMEDReader${tfile}.py -B ${BASELINES_DIR})
+  #ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} testMEDReader${tfile}.py -B ${BASELINES_DIR})
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()