From acafc985e5b98c49017990abe8d75c0fc47d37f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Wed, 27 Jan 2016 11:20:54 +0100 Subject: [PATCH] Fix EDF tests --- src/Plugins/MEDReader/Test/CMakeLists.txt | 30 +++++++++---------- .../MEDReader/Test/CTestTestfileInstall.cmake | 7 +++-- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/Plugins/MEDReader/Test/CMakeLists.txt b/src/Plugins/MEDReader/Test/CMakeLists.txt index 5f9c1c69..60763209 100644 --- a/src/Plugins/MEDReader/Test/CMakeLists.txt +++ b/src/Plugins/MEDReader/Test/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2015 CEA/DEN, EDF R&D +# Copyright (C) 2010-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -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) 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 293b2ae4..09be1dcb 100644 --- a/src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake +++ b/src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2015 CEA/DEN, EDF R&D +# Copyright (C) 2015, 2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -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() -- 2.39.2