]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Fix EDF tests
authorCédric Aguerre <cedric.aguerre@edf.fr>
Wed, 27 Jan 2016 10:20:54 +0000 (11:20 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 19 Feb 2016 07:09:47 +0000 (08:09 +0100)
src/Plugins/MEDReader/Test/CMakeLists.txt
src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake

index 5f9c1c69f1f53c970e4e725cbf2356c973b7db3e..60763209c324ea44a5bb08c2c32274630b545bc9 100644 (file)
@@ -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
 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)
index 293b2ae45441b5992582ac57e4761fd972029e8a..09be1dcb05102c679131647b2a7846727a239e7c 100644 (file)
@@ -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()