Salome HOME
[MEDCalc] folder organization for salome test
authorCédric Aguerre <cedric.aguerre@edf.fr>
Mon, 18 Jul 2016 12:46:27 +0000 (14:46 +0200)
committerabn <adrien.bruneton@cea.fr>
Wed, 27 Jul 2016 10:17:42 +0000 (12:17 +0200)
26 files changed:
CTestTestfileInstall.cmake
src/MEDCalc/CMakeLists.txt
src/MEDCalc/test/CMakeLists.txt
src/MEDCalc/test/CTestTestfileInstall.cmake
src/MEDCalc/test/README.txt [deleted file]
src/MEDCalc/test/baselines/CMakeLists.txt [deleted file]
src/MEDCalc/test/baselines/test_scalarmap.png [deleted file]
src/MEDCalc/test/gui/CMakeLists.txt [new file with mode: 0644]
src/MEDCalc/test/gui/CTestTestfileInstall.cmake [new file with mode: 0644]
src/MEDCalc/test/gui/README.txt [new file with mode: 0644]
src/MEDCalc/test/gui/baselines/CMakeLists.txt [new file with mode: 0644]
src/MEDCalc/test/gui/baselines/test_scalarmap.png [new file with mode: 0644]
src/MEDCalc/test/gui/guiTester.pro [new file with mode: 0644]
src/MEDCalc/test/gui/medcalc_testutils.py.in [new file with mode: 0644]
src/MEDCalc/test/gui/medfiles/test_scalarmap.med [new file with mode: 0644]
src/MEDCalc/test/gui/scenarios/test_scalarmap.xml [new file with mode: 0644]
src/MEDCalc/test/gui/test_qttesting.py [new file with mode: 0644]
src/MEDCalc/test/gui/test_scalarmap.py [new file with mode: 0644]
src/MEDCalc/test/guiTester.pro [deleted file]
src/MEDCalc/test/medcalc_testutils.py.in [deleted file]
src/MEDCalc/test/medfiles/test_scalarmap.med [deleted file]
src/MEDCalc/test/scenarios/test_scalarmap.xml [deleted file]
src/MEDCalc/test/test_qttesting.py [deleted file]
src/MEDCalc/test/test_scalarmap.py [deleted file]
src/MEDCalc/test/tui/CMakeLists.txt [new file with mode: 0644]
src/MEDCalc/test/tui/CTestTestfileInstall.cmake [new file with mode: 0644]

index 0fb26934ae4384fc1ab870b2dcc172f0bde1639c..c590d9976e153255ba343f857decfa18f1e1c95f 100644 (file)
@@ -20,5 +20,5 @@
 SET(COMPONENT_NAME MEDCALC)
 SET(TIMEOUT        300)
 
-SUBDIRS(MEDCalculator)
+#SUBDIRS(MEDCalculator)
 SUBDIRS(MEDCalc)
index 560ecadd9b65a4c9b46fdd9a4c1424ecc2546d10..2db954b42cb8314724f39601fd4921b6fa248d56 100644 (file)
@@ -22,13 +22,10 @@ ADD_SUBDIRECTORY(res)
 
 IF(SALOME_BUILD_GUI)
   ADD_SUBDIRECTORY(gui)
-
-  IF(SALOME_MED_WITH_QTTESTING)
-    ADD_SUBDIRECTORY(test)
-  ENDIF()
-
 ENDIF()
 
+ADD_SUBDIRECTORY(test)
+
 IF(SALOME_MED_ENABLE_PYTHON)
   ADD_SUBDIRECTORY(tui)
   ADD_SUBDIRECTORY(exe)
index 329a4d3ae30b87adb5c1d51838b82971be8ab48a..72cf4a1a556a893b1a8c3ccc180c0593077acc98 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SALOME_CONFIGURE_FILE(medcalc_testutils.py.in ${CMAKE_CURRENT_BINARY_DIR}/medcalc_testutils.py)
+IF(SALOME_BUILD_GUI)
+  IF(SALOME_MED_WITH_QTTESTING)
+    ADD_SUBDIRECTORY(gui)
+  ENDIF()
+ENDIF()
 
-SET(_test_scripts
-    test_scalarmap.py
-)
+IF(SALOME_MED_ENABLE_PYTHON)
+  ADD_SUBDIRECTORY(tui)
+ENDIF()
 
-SET(_test_scenarii
-   scenarios/test_scalarmap.xml
-)
-
-SET(_test_baselines
-    baselines/test_scalarmap.png
-)
-
-SET(_test_files
-    medfiles/test_scalarmap.med
-)
-
-# Install rules
 SET(TEST_INSTALL_DIRECTORY ${SALOME_MED_INSTALL_TEST}/MEDCalc)
-
-SALOME_INSTALL_SCRIPTS(test_qttesting.py ${TEST_INSTALL_DIRECTORY})
-SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/medcalc_testutils.py ${TEST_INSTALL_DIRECTORY})
-
-SALOME_INSTALL_SCRIPTS("${_test_scripts}" ${SALOME_INSTALL_PYTHON}/tests)
-
-INSTALL(FILES ${_test_scenarii} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/tests/scenarios)
-INSTALL(FILES ${_test_baselines} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/tests/baselines)
-INSTALL(FILES ${_test_files} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/tests/medfiles)
-
 INSTALL(FILES CTestTestfileInstall.cmake
   DESTINATION ${TEST_INSTALL_DIRECTORY}
   RENAME CTestTestfile.cmake)
index ef479a14e216708f8a79d3ee49c18f2fb94a543f..554cb897e8f206142c7900e57ccc8a749a854471 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TEST_NAMES
-  test_qttesting
-)
-
-FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
-  ADD_TEST(${TEST_NAME} python ${tfile}.py)
-  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
-    LABELS "${COMPONENT_NAME}"
-    TIMEOUT ${TIMEOUT}
-    )
-ENDFOREACH()
+SUBDIRS(gui)
+SUBDIRS(tui)
diff --git a/src/MEDCalc/test/README.txt b/src/MEDCalc/test/README.txt
deleted file mode 100644 (file)
index ad68b0d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-test_qttesting.py
-=================
-
-Tests based on QtTesting framework from ParaView.
-Main entry point is test_qttesting.py.
-Each scenario is described in a XML file and can be recorded directly in the GUI via the "Record test" button. 
-
-A scneario must save a final screenshot of the ParaView view in a file located in the temp directory (TODO: review
-this). This file is compared against a baseline saved in the baselines subdirectory.
-
-
-guiTester.pro 
-=============
-
-This is a simple Qt framework to test the dialog widgets.
-
-To build the project:
-* specify the sources files in the .pro file
-* run qmake, then make
-* run guiTester
-
-To clean the project:
-* run "make clean"
-* remove binary and Makefile
-  $ rm guiTester Makefile
diff --git a/src/MEDCalc/test/baselines/CMakeLists.txt b/src/MEDCalc/test/baselines/CMakeLists.txt
deleted file mode 100644 (file)
index 803fe6d..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-# 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
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-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)
-
-cmake_minimum_required(VERSION 2.7)
-
-find_package(ParaView REQUIRED)
-include(${PARAVIEW_USE_FILE})
-
-include(ParaViewTestingMacros)
-include(FindPythonModules)
-
-include(${PROJECT_SOURCE_DIR}/testing/testFunctions.cmake)
-set(PV_PLUGIN_PATH "${CMAKE_BINARY_DIR}/lib/")
-
-include(CTest)
-
-enable_testing()
-
-set(PARAVIEW_BIN_DIR "${ParaView_DIR}/bin" CACHE PATH "ParaView binary path")
-
-set(PVTEST_DRIVER "${PARAVIEW_BIN_DIR}/smTestDriver")
-set(PARAVIEW_CLIENT "${PARAVIEW_BIN_DIR}/paraview")
-set(PARAVIEW_SERVER "${PARAVIEW_BIN_DIR}/pvserver")
-set(PVPYTHON "${PARAVIEW_BIN_DIR}/pvpython")
-
-set(PYTHON_SCRIPTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
-set(TEMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/Testing/Temporary")
-
-if(NOT EXISTS ${TEMP_DIR})
-  file(MAKE_DIRECTORY ${TEMP_DIR})
-endif()
-
-# Override vtk_add_test_* variables for use with ParaView.
-macro (_myy_override_vtk_dirs)
-  set(VTK_TEST_DATA_DIR    ${PYTHON_SCRIPTS_DIR})
-  set(VTK_BASELINE_DIR     ${BASELINES_DIR})
-  set(VTK_TEST_OUTPUT_DIR  ${TEMP_DIR})
-  set(VTK_TEST_DATA_TARGET ParaViewData)
-endmacro ()
-
-function (myy_add_python_test)
-  message(STATUS "Add Python test for ${ARGV2}")
-  set(VTK_PYTHON_EXE "${PVPYTHON}")
-  list(APPEND VTK_PYTHON_ARGS -dr
-    ${PARAVIEW_PYTHON_ARGS})
-  _myy_override_vtk_dirs()
-  myvtk_add_test_python(${ARGN})
-endfunction ()
-
-# Test all python scripts
-file(GLOB scripts "${PYTHON_SCRIPTS_DIR}/*py")
-foreach(file ${scripts})
-  get_filename_component(fname ${file} NAME)
-  myy_add_python_test(
-    NO_DATA NO_RT
-    ${fname})
-  INSTALL(FILES ${file}
-          DESTINATION ${TEST_INSTALL_DIRECTORY})
-endforeach()
-
-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 ${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/MEDCalc/test/baselines/test_scalarmap.png b/src/MEDCalc/test/baselines/test_scalarmap.png
deleted file mode 100644 (file)
index 50d8f63..0000000
Binary files a/src/MEDCalc/test/baselines/test_scalarmap.png and /dev/null differ
diff --git a/src/MEDCalc/test/gui/CMakeLists.txt b/src/MEDCalc/test/gui/CMakeLists.txt
new file mode 100644 (file)
index 0000000..cb6df73
--- /dev/null
@@ -0,0 +1,52 @@
+# Copyright (C) 2012-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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SALOME_CONFIGURE_FILE(medcalc_testutils.py.in ${CMAKE_CURRENT_BINARY_DIR}/medcalc_testutils.py)
+
+SET(_test_scripts
+    test_scalarmap.py
+)
+
+SET(_test_scenarii
+   scenarios/test_scalarmap.xml
+)
+
+SET(_test_baselines
+    baselines/test_scalarmap.png
+)
+
+SET(_test_files
+    medfiles/test_scalarmap.med
+)
+
+# Install rules
+SET(TEST_INSTALL_DIRECTORY ${SALOME_MED_INSTALL_TEST}/MEDCalc/gui)
+
+SALOME_INSTALL_SCRIPTS(test_qttesting.py ${TEST_INSTALL_DIRECTORY})
+SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/medcalc_testutils.py ${TEST_INSTALL_DIRECTORY})
+
+SALOME_INSTALL_SCRIPTS("${_test_scripts}" ${SALOME_INSTALL_PYTHON}/tests)
+
+INSTALL(FILES ${_test_scenarii} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/tests/gui/scenarios)
+INSTALL(FILES ${_test_baselines} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/tests/gui/baselines)
+INSTALL(FILES ${_test_files} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/tests/gui/medfiles)
+
+INSTALL(FILES CTestTestfileInstall.cmake
+  DESTINATION ${TEST_INSTALL_DIRECTORY}
+  RENAME CTestTestfile.cmake)
diff --git a/src/MEDCalc/test/gui/CTestTestfileInstall.cmake b/src/MEDCalc/test/gui/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..ef479a1
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright (C) 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SET(TEST_NAMES
+  test_qttesting
+)
+
+FOREACH(tfile ${TEST_NAMES})
+  SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
+  ADD_TEST(${TEST_NAME} python ${tfile}.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+    LABELS "${COMPONENT_NAME}"
+    TIMEOUT ${TIMEOUT}
+    )
+ENDFOREACH()
diff --git a/src/MEDCalc/test/gui/README.txt b/src/MEDCalc/test/gui/README.txt
new file mode 100644 (file)
index 0000000..ad68b0d
--- /dev/null
@@ -0,0 +1,25 @@
+test_qttesting.py
+=================
+
+Tests based on QtTesting framework from ParaView.
+Main entry point is test_qttesting.py.
+Each scenario is described in a XML file and can be recorded directly in the GUI via the "Record test" button. 
+
+A scneario must save a final screenshot of the ParaView view in a file located in the temp directory (TODO: review
+this). This file is compared against a baseline saved in the baselines subdirectory.
+
+
+guiTester.pro 
+=============
+
+This is a simple Qt framework to test the dialog widgets.
+
+To build the project:
+* specify the sources files in the .pro file
+* run qmake, then make
+* run guiTester
+
+To clean the project:
+* run "make clean"
+* remove binary and Makefile
+  $ rm guiTester Makefile
diff --git a/src/MEDCalc/test/gui/baselines/CMakeLists.txt b/src/MEDCalc/test/gui/baselines/CMakeLists.txt
new file mode 100644 (file)
index 0000000..803fe6d
--- /dev/null
@@ -0,0 +1,109 @@
+# 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+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)
+
+cmake_minimum_required(VERSION 2.7)
+
+find_package(ParaView REQUIRED)
+include(${PARAVIEW_USE_FILE})
+
+include(ParaViewTestingMacros)
+include(FindPythonModules)
+
+include(${PROJECT_SOURCE_DIR}/testing/testFunctions.cmake)
+set(PV_PLUGIN_PATH "${CMAKE_BINARY_DIR}/lib/")
+
+include(CTest)
+
+enable_testing()
+
+set(PARAVIEW_BIN_DIR "${ParaView_DIR}/bin" CACHE PATH "ParaView binary path")
+
+set(PVTEST_DRIVER "${PARAVIEW_BIN_DIR}/smTestDriver")
+set(PARAVIEW_CLIENT "${PARAVIEW_BIN_DIR}/paraview")
+set(PARAVIEW_SERVER "${PARAVIEW_BIN_DIR}/pvserver")
+set(PVPYTHON "${PARAVIEW_BIN_DIR}/pvpython")
+
+set(PYTHON_SCRIPTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+set(TEMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/Testing/Temporary")
+
+if(NOT EXISTS ${TEMP_DIR})
+  file(MAKE_DIRECTORY ${TEMP_DIR})
+endif()
+
+# Override vtk_add_test_* variables for use with ParaView.
+macro (_myy_override_vtk_dirs)
+  set(VTK_TEST_DATA_DIR    ${PYTHON_SCRIPTS_DIR})
+  set(VTK_BASELINE_DIR     ${BASELINES_DIR})
+  set(VTK_TEST_OUTPUT_DIR  ${TEMP_DIR})
+  set(VTK_TEST_DATA_TARGET ParaViewData)
+endmacro ()
+
+function (myy_add_python_test)
+  message(STATUS "Add Python test for ${ARGV2}")
+  set(VTK_PYTHON_EXE "${PVPYTHON}")
+  list(APPEND VTK_PYTHON_ARGS -dr
+    ${PARAVIEW_PYTHON_ARGS})
+  _myy_override_vtk_dirs()
+  myvtk_add_test_python(${ARGN})
+endfunction ()
+
+# Test all python scripts
+file(GLOB scripts "${PYTHON_SCRIPTS_DIR}/*py")
+foreach(file ${scripts})
+  get_filename_component(fname ${file} NAME)
+  myy_add_python_test(
+    NO_DATA NO_RT
+    ${fname})
+  INSTALL(FILES ${file}
+          DESTINATION ${TEST_INSTALL_DIRECTORY})
+endforeach()
+
+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 ${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/MEDCalc/test/gui/baselines/test_scalarmap.png b/src/MEDCalc/test/gui/baselines/test_scalarmap.png
new file mode 100644 (file)
index 0000000..50d8f63
Binary files /dev/null and b/src/MEDCalc/test/gui/baselines/test_scalarmap.png differ
diff --git a/src/MEDCalc/test/gui/guiTester.pro b/src/MEDCalc/test/gui/guiTester.pro
new file mode 100644 (file)
index 0000000..51f1f87
--- /dev/null
@@ -0,0 +1,13 @@
+######################################################################
+# Automatically generated by qmake (2.01a) mer. oct. 6 14:46:48 2010
+######################################################################
+
+TEMPLATE = app
+TARGET = 
+DEPENDPATH += .
+INCLUDEPATH += . ../dialogs
+
+# Input
+HEADERS += ../dialogs/DlgAlias.h
+FORMS += ../dialogs/dlgAlias.ui
+SOURCES += ../dialogs/DlgAlias.cxx ../dialogs/dlgTester.cxx
diff --git a/src/MEDCalc/test/gui/medcalc_testutils.py.in b/src/MEDCalc/test/gui/medcalc_testutils.py.in
new file mode 100644 (file)
index 0000000..bcdf7f9
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright (C) 2011-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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+
+def __getRootDir():
+  rootDir = os.environ.get("MED_ROOT_DIR", "")
+  return rootDir
+
+def GetScriptDir():
+  relativeDir = "@SALOME_INSTALL_PYTHON@/tests"
+  return os.path.join(__getRootDir(), relativeDir)
+
+def GetScenarioDir():
+  relativeDir = "@SALOME_MED_INSTALL_RES_DATA@/tests/gui/scenarios"
+  return os.path.join(__getRootDir(), relativeDir)
+
+def GetBaselineDir():
+  relativeDir = "@SALOME_MED_INSTALL_RES_DATA@/tests/gui/baselines"
+  return os.path.join(__getRootDir(), relativeDir)
+
+def GetMEDFileDir():
+  relativeDir = "@SALOME_MED_INSTALL_RES_DATA@/tests/gui/medfiles"
+  return os.path.join(__getRootDir(), relativeDir)
diff --git a/src/MEDCalc/test/gui/medfiles/test_scalarmap.med b/src/MEDCalc/test/gui/medfiles/test_scalarmap.med
new file mode 100644 (file)
index 0000000..063a41d
Binary files /dev/null and b/src/MEDCalc/test/gui/medfiles/test_scalarmap.med differ
diff --git a/src/MEDCalc/test/gui/scenarios/test_scalarmap.xml b/src/MEDCalc/test/gui/scenarios/test_scalarmap.xml
new file mode 100644 (file)
index 0000000..42a7210
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" ?>
+<pqevents>
+  <pqevent object="1STD_TabDesktop0/1QMenuBar0" command="activate" arguments="Fic&amp;hier" />
+  <pqevent object="1QMenu0" command="activate" arguments="LAB_LOCK_TEST" />
+  <pqevent object="1STD_TabDesktop0/DatasourceToolbar/1QToolButton0" command="activate" arguments="" />
+  <pqevent object="Qt-subapplication-app" command="FilesOpen" arguments="/tmp/test_scalarmap.med" />
+  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0" command="expand" arguments="0.0" />
+  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0" command="expand" arguments="0.0.0.0" />
+  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0" command="expand" arguments="0.0.0.0.0.0" />
+  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseWheel" arguments="-120,0,0,88,5" />
+  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseWheel" arguments="-120,0,0,88,5" />
+  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0" command="setCurrent" arguments="0.0.0.0.0.0.0.0" />
+  <pqevent object="1STD_TabDesktop0/PresentationToolbar/1QToolButton0" command="activate" arguments="" />
+  <pqevent object="1STD_TabDesktop0/1QMenuBar0" command="activate" arguments="Fic&amp;hier" />
+  <pqevent object="1QMenu0" command="activate" arguments="LAB_SNAP_TEST" />
+  <pqevent object="1STD_TabDesktop0/SaveSnapshotDialog/ok" command="activate" arguments="" />
+  <pqevent object="1STD_TabDesktop0/FileSaveScreenshotDialog" command="key" arguments="16777248" />
+  <pqevent object="1STD_TabDesktop0/FileSaveScreenshotDialog/mainSplitter/widget/FileName" command="set_string" arguments="/tmp/test_scalarmap.png" />
+  <pqevent object="1STD_TabDesktop0/FileSaveScreenshotDialog/mainSplitter/widget/OK" command="activate" arguments="" />
+</pqevents>
diff --git a/src/MEDCalc/test/gui/test_qttesting.py b/src/MEDCalc/test/gui/test_qttesting.py
new file mode 100644 (file)
index 0000000..e059b85
--- /dev/null
@@ -0,0 +1,121 @@
+# Copyright (C) 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: A. Bruneton (CEA)
+
+import unittest, os, shutil
+from posixpath import basename
+
+class MEDGUITest(unittest.TestCase):
+  def __init__(self, methodName='runTest'):
+    unittest.TestCase.__init__(self, methodName=methodName)
+    self._tmpDir = ""
+    self._removeDir = True
+
+  def setUp(self):
+    import tempfile
+    self._tmpDir = tempfile.mkdtemp(prefix="med_gui_tests_")
+    self._removeDir = True  # reset for each new test in the TestCase
+
+  def tearDown(self):
+    import shutil
+    unittest.TestCase.tearDown(self)
+    if self._removeDir:
+      shutil.rmtree(self._tmpDir, False)
+
+  def getTestName(self):
+    """ Return name of the test being currently executed. """
+    return self.id().split(".")[-1]
+
+  def launchSalomeWithScript(self, scriptname):
+    """ TODO: review this - what is the nicest way to launch SALOME GUI from a Python script? """
+    from salome_instance import SalomeInstance
+    from medcalc_testutils import GetScriptDir
+    args = "args:%s" % self._tmpDir
+    pth = os.path.join(GetScriptDir(), scriptname)
+    # Launch SALOME with the test script:
+    inst = SalomeInstance.start(with_gui=True, args=[pth, args])
+    # And make sure SALOME is stopped before running next one:
+    inst.stop()
+    status = 0 # TODO review this
+    if status:
+      raise Exception("SALOME exited abnormally for this test!")
+
+  def compareSnapshot(self, basename):
+    """ Compare the screenshot in the current temporary test directory with the reference baseline.
+    Assert if not matching. """
+    import filecmp
+    from medcalc_testutils import GetBaselineDir
+
+    base_pth = os.path.join(GetBaselineDir(), basename)
+    gen_path = os.path.join(self._tmpDir, basename)
+    print base_pth, gen_path
+    try:
+      ret = filecmp.cmp(base_pth, gen_path, shallow=False)
+    except OSError:
+      import traceback
+      traceback.print_exc()
+      ret = False
+    if not ret:
+      # Keep file if comparison fails
+      self._removeDir = False
+      self.assertTrue(ret, "[%s] -- Failed screenshot equality, or unable to open baseline file - directory is kept alive: %s" % (self.getTestName(), self._tmpDir))
+    return ret
+
+  def prepareScenario(self, scenario, baseline, med_file):
+    """ Copy scenario to current temporary test dir and substitute paths inside """
+    from medcalc_testutils import GetScenarioDir, GetMEDFileDir
+    scen_path = os.path.join(GetScenarioDir(), scenario)
+    scen_pth2 = os.path.join(self._tmpDir, scenario)
+    try:
+      shutil.copy(scen_path, scen_pth2)
+    except IOError:
+      raise Exception("Could not copy test scenario '%s' to local test directory!" % scen_path)
+    with open(scen_pth2,'r') as f:
+      filedata = f.read()
+    filedata = filedata.replace("/tmp/%s" % baseline, "%s/%s" % (self._tmpDir, baseline))
+    filedata = filedata.replace("/tmp/%s" % med_file, os.path.join(GetMEDFileDir(), med_file))
+    with open(scen_pth2,'w') as f:
+      f.write(filedata)
+
+  ##
+  ## Now the tests themselves
+  ##
+  def testScalarMap(self):
+    baseline = "test_scalarmap.png"
+    med_file = "test_scalarmap.med"  # will change with Cedric's files
+    scenario = "test_scalarmap.xml"
+    self.prepareScenario(scenario, baseline, med_file)
+    self.launchSalomeWithScript("test_scalarmap.py")
+    self.compareSnapshot(baseline)
+
+  def testScalarMap2(self):
+    baseline = "test_scalarmap.png"
+    med_file = "test_scalarmap.med"  # will change
+    scenario = "test_scalarmap.xml"
+    self.prepareScenario(scenario, baseline, med_file)
+    self.launchSalomeWithScript("test_scalarmap.py")
+    self.compareSnapshot(baseline)
+
+if __name__ == "__main__":
+  suite = unittest.TestSuite()
+  suite.addTest(MEDGUITest('testScalarMap'))
+  suite.addTest(MEDGUITest('testScalarMap2'))
+#  suite.addTest(MEDGUITest('testIsoContour'))
+  unittest.TextTestRunner().run(suite)
+
diff --git a/src/MEDCalc/test/gui/test_scalarmap.py b/src/MEDCalc/test/gui/test_scalarmap.py
new file mode 100644 (file)
index 0000000..6612eb6
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright (C) 2011-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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+""" Test of the scalarmap. 
+
+This script is to be passed as an argument of the ./salome command and will be executed within the SALOME
+Python console.
+"""
+
+import os, sys
+import SalomePyQt
+from medcalc_testutils import GetScenarioDir
+
+sgPyQt = SalomePyQt.SalomePyQt()
+sgPyQt.activateModule('MED')
+
+import medcalc  # After module activation !!
+localTestDir = sys.argv[1]
+medcalc.PlayQtTestingScenario(os.path.join(localTestDir, 'test_scalarmap.xml'))
+
+medcalc.RequestSALOMETermination()  # not equivalent to quit()! 
diff --git a/src/MEDCalc/test/guiTester.pro b/src/MEDCalc/test/guiTester.pro
deleted file mode 100644 (file)
index 51f1f87..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-######################################################################
-# Automatically generated by qmake (2.01a) mer. oct. 6 14:46:48 2010
-######################################################################
-
-TEMPLATE = app
-TARGET = 
-DEPENDPATH += .
-INCLUDEPATH += . ../dialogs
-
-# Input
-HEADERS += ../dialogs/DlgAlias.h
-FORMS += ../dialogs/dlgAlias.ui
-SOURCES += ../dialogs/DlgAlias.cxx ../dialogs/dlgTester.cxx
diff --git a/src/MEDCalc/test/medcalc_testutils.py.in b/src/MEDCalc/test/medcalc_testutils.py.in
deleted file mode 100644 (file)
index 61fe9d1..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (C) 2011-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
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-import os
-
-def __getRootDir():  
-  rootDir = os.environ.get("MED_ROOT_DIR", "")
-  return rootDir 
-
-def GetScriptDir():
-  relativeDir = "@SALOME_INSTALL_PYTHON@/tests"
-  return os.path.join(__getRootDir(), relativeDir)
-
-def GetScenarioDir():
-  relativeDir = "@SALOME_MED_INSTALL_RES_DATA@/tests/scenarios"
-  return os.path.join(__getRootDir(), relativeDir)
-
-def GetBaselineDir():
-  relativeDir = "@SALOME_MED_INSTALL_RES_DATA@/tests/baselines"
-  return os.path.join(__getRootDir(), relativeDir)
-def GetMEDFileDir():
-  relativeDir = "@SALOME_MED_INSTALL_RES_DATA@/tests/medfiles"
-  return os.path.join(__getRootDir(), relativeDir)
-  
diff --git a/src/MEDCalc/test/medfiles/test_scalarmap.med b/src/MEDCalc/test/medfiles/test_scalarmap.med
deleted file mode 100644 (file)
index 063a41d..0000000
Binary files a/src/MEDCalc/test/medfiles/test_scalarmap.med and /dev/null differ
diff --git a/src/MEDCalc/test/scenarios/test_scalarmap.xml b/src/MEDCalc/test/scenarios/test_scalarmap.xml
deleted file mode 100644 (file)
index 42a7210..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" ?>
-<pqevents>
-  <pqevent object="1STD_TabDesktop0/1QMenuBar0" command="activate" arguments="Fic&amp;hier" />
-  <pqevent object="1QMenu0" command="activate" arguments="LAB_LOCK_TEST" />
-  <pqevent object="1STD_TabDesktop0/DatasourceToolbar/1QToolButton0" command="activate" arguments="" />
-  <pqevent object="Qt-subapplication-app" command="FilesOpen" arguments="/tmp/test_scalarmap.med" />
-  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0" command="expand" arguments="0.0" />
-  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0" command="expand" arguments="0.0.0.0" />
-  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0" command="expand" arguments="0.0.0.0.0.0" />
-  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseWheel" arguments="-120,0,0,88,5" />
-  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseWheel" arguments="-120,0,0,88,5" />
-  <pqevent object="1STD_TabDesktop0/objectBrowserDock/objectBrowser/1QtxTreeView0" command="setCurrent" arguments="0.0.0.0.0.0.0.0" />
-  <pqevent object="1STD_TabDesktop0/PresentationToolbar/1QToolButton0" command="activate" arguments="" />
-  <pqevent object="1STD_TabDesktop0/1QMenuBar0" command="activate" arguments="Fic&amp;hier" />
-  <pqevent object="1QMenu0" command="activate" arguments="LAB_SNAP_TEST" />
-  <pqevent object="1STD_TabDesktop0/SaveSnapshotDialog/ok" command="activate" arguments="" />
-  <pqevent object="1STD_TabDesktop0/FileSaveScreenshotDialog" command="key" arguments="16777248" />
-  <pqevent object="1STD_TabDesktop0/FileSaveScreenshotDialog/mainSplitter/widget/FileName" command="set_string" arguments="/tmp/test_scalarmap.png" />
-  <pqevent object="1STD_TabDesktop0/FileSaveScreenshotDialog/mainSplitter/widget/OK" command="activate" arguments="" />
-</pqevents>
diff --git a/src/MEDCalc/test/test_qttesting.py b/src/MEDCalc/test/test_qttesting.py
deleted file mode 100644 (file)
index e059b85..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright (C) 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
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: A. Bruneton (CEA)
-
-import unittest, os, shutil
-from posixpath import basename
-
-class MEDGUITest(unittest.TestCase):
-  def __init__(self, methodName='runTest'):
-    unittest.TestCase.__init__(self, methodName=methodName)
-    self._tmpDir = ""
-    self._removeDir = True
-
-  def setUp(self):
-    import tempfile
-    self._tmpDir = tempfile.mkdtemp(prefix="med_gui_tests_")
-    self._removeDir = True  # reset for each new test in the TestCase
-
-  def tearDown(self):
-    import shutil
-    unittest.TestCase.tearDown(self)
-    if self._removeDir:
-      shutil.rmtree(self._tmpDir, False)
-
-  def getTestName(self):
-    """ Return name of the test being currently executed. """
-    return self.id().split(".")[-1]
-
-  def launchSalomeWithScript(self, scriptname):
-    """ TODO: review this - what is the nicest way to launch SALOME GUI from a Python script? """
-    from salome_instance import SalomeInstance
-    from medcalc_testutils import GetScriptDir
-    args = "args:%s" % self._tmpDir
-    pth = os.path.join(GetScriptDir(), scriptname)
-    # Launch SALOME with the test script:
-    inst = SalomeInstance.start(with_gui=True, args=[pth, args])
-    # And make sure SALOME is stopped before running next one:
-    inst.stop()
-    status = 0 # TODO review this
-    if status:
-      raise Exception("SALOME exited abnormally for this test!")
-
-  def compareSnapshot(self, basename):
-    """ Compare the screenshot in the current temporary test directory with the reference baseline.
-    Assert if not matching. """
-    import filecmp
-    from medcalc_testutils import GetBaselineDir
-
-    base_pth = os.path.join(GetBaselineDir(), basename)
-    gen_path = os.path.join(self._tmpDir, basename)
-    print base_pth, gen_path
-    try:
-      ret = filecmp.cmp(base_pth, gen_path, shallow=False)
-    except OSError:
-      import traceback
-      traceback.print_exc()
-      ret = False
-    if not ret:
-      # Keep file if comparison fails
-      self._removeDir = False
-      self.assertTrue(ret, "[%s] -- Failed screenshot equality, or unable to open baseline file - directory is kept alive: %s" % (self.getTestName(), self._tmpDir))
-    return ret
-
-  def prepareScenario(self, scenario, baseline, med_file):
-    """ Copy scenario to current temporary test dir and substitute paths inside """
-    from medcalc_testutils import GetScenarioDir, GetMEDFileDir
-    scen_path = os.path.join(GetScenarioDir(), scenario)
-    scen_pth2 = os.path.join(self._tmpDir, scenario)
-    try:
-      shutil.copy(scen_path, scen_pth2)
-    except IOError:
-      raise Exception("Could not copy test scenario '%s' to local test directory!" % scen_path)
-    with open(scen_pth2,'r') as f:
-      filedata = f.read()
-    filedata = filedata.replace("/tmp/%s" % baseline, "%s/%s" % (self._tmpDir, baseline))
-    filedata = filedata.replace("/tmp/%s" % med_file, os.path.join(GetMEDFileDir(), med_file))
-    with open(scen_pth2,'w') as f:
-      f.write(filedata)
-
-  ##
-  ## Now the tests themselves
-  ##
-  def testScalarMap(self):
-    baseline = "test_scalarmap.png"
-    med_file = "test_scalarmap.med"  # will change with Cedric's files
-    scenario = "test_scalarmap.xml"
-    self.prepareScenario(scenario, baseline, med_file)
-    self.launchSalomeWithScript("test_scalarmap.py")
-    self.compareSnapshot(baseline)
-
-  def testScalarMap2(self):
-    baseline = "test_scalarmap.png"
-    med_file = "test_scalarmap.med"  # will change
-    scenario = "test_scalarmap.xml"
-    self.prepareScenario(scenario, baseline, med_file)
-    self.launchSalomeWithScript("test_scalarmap.py")
-    self.compareSnapshot(baseline)
-
-if __name__ == "__main__":
-  suite = unittest.TestSuite()
-  suite.addTest(MEDGUITest('testScalarMap'))
-  suite.addTest(MEDGUITest('testScalarMap2'))
-#  suite.addTest(MEDGUITest('testIsoContour'))
-  unittest.TextTestRunner().run(suite)
-
diff --git a/src/MEDCalc/test/test_scalarmap.py b/src/MEDCalc/test/test_scalarmap.py
deleted file mode 100644 (file)
index 6612eb6..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) 2011-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
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-""" Test of the scalarmap. 
-
-This script is to be passed as an argument of the ./salome command and will be executed within the SALOME
-Python console.
-"""
-
-import os, sys
-import SalomePyQt
-from medcalc_testutils import GetScenarioDir
-
-sgPyQt = SalomePyQt.SalomePyQt()
-sgPyQt.activateModule('MED')
-
-import medcalc  # After module activation !!
-localTestDir = sys.argv[1]
-medcalc.PlayQtTestingScenario(os.path.join(localTestDir, 'test_scalarmap.xml'))
-
-medcalc.RequestSALOMETermination()  # not equivalent to quit()! 
diff --git a/src/MEDCalc/test/tui/CMakeLists.txt b/src/MEDCalc/test/tui/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6bb09a5
--- /dev/null
@@ -0,0 +1,23 @@
+# Copyright (C) 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SET(TEST_INSTALL_DIRECTORY ${SALOME_MED_INSTALL_TEST}/MEDCalc/tui)
+INSTALL(FILES CTestTestfileInstall.cmake
+  DESTINATION ${TEST_INSTALL_DIRECTORY}
+  RENAME CTestTestfile.cmake)
diff --git a/src/MEDCalc/test/tui/CTestTestfileInstall.cmake b/src/MEDCalc/test/tui/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..f361715
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright (C) 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#