From: Cédric Aguerre Date: Wed, 27 Jan 2016 10:20:54 +0000 (+0100) Subject: Fix EDF tests X-Git-Tag: V7_8_0rc2^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fagr%2Ffix_tests;p=modules%2Fparavis.git Fix EDF tests --- diff --git a/src/Plugins/MEDReader/Test/CMakeLists.txt b/src/Plugins/MEDReader/Test/CMakeLists.txt index fd295007..803fe6d0 100644 --- a/src/Plugins/MEDReader/Test/CMakeLists.txt +++ b/src/Plugins/MEDReader/Test/CMakeLists.txt @@ -20,18 +20,10 @@ 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) diff --git a/src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake b/src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake index bc62bb7f..ea816efb 100644 --- a/src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake +++ b/src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake @@ -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()