]> SALOME platform Git repositories - modules/homard.git/commitdiff
Salome HOME
Utiltaires pour CMake
authorGerald NICOLAS <D68518@dsp0677846.(none)>
Wed, 13 Jan 2016 15:57:06 +0000 (16:57 +0100)
committerGerald NICOLAS <D68518@dsp0677846.(none)>
Wed, 13 Jan 2016 15:57:06 +0000 (16:57 +0100)
src/CTestTestfileInstall.cmake [new file with mode: 0644]
src/tests/Test/CMakeLists.txt [new file with mode: 0755]
src/tests/Test/CTestTestfileInstall.cmake [new file with mode: 0644]

diff --git a/src/CTestTestfileInstall.cmake b/src/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..d6c725b
--- /dev/null
@@ -0,0 +1,25 @@
+# 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
+#
+
+# Add all test subdirs
+SUBDIRS(
+    tests
+    )
+
+
diff --git a/src/tests/Test/CMakeLists.txt b/src/tests/Test/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..f625031
--- /dev/null
@@ -0,0 +1,39 @@
+# 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
+#
+
+# For salome test
+SET(HOMARD_TEST_FILES
+  test_1.py
+  test_2.py
+  test_3.py
+  test_4.py
+  tutorial_1.py
+  tutorial_2.py
+  tutorial_3.py
+  tutorial_4.py
+  tutorial_5.py
+  test_util.py
+)
+
+INSTALL(FILES ${HOMARD_TEST_FILES}
+        DESTINATION ${SALOME_HOMARD_INSTALL_TEST})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${SALOME_HOMARD_INSTALL_TEST}
+        RENAME CTestTestfile.cmake)
\ No newline at end of file
diff --git a/src/tests/Test/CTestTestfileInstall.cmake b/src/tests/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..7e8c01f
--- /dev/null
@@ -0,0 +1,41 @@
+# 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(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
+
+SET(COMPONENT_NAME HOMARD)
+SET(TIMEOUT        500)
+
+SET(HOMARD_TEST_FILES
+test_1
+test_2
+test_3
+test_4
+tutorial_1
+tutorial_2
+tutorial_3
+tutorial_4
+tutorial_5
+)
+
+FOREACH(tfile ${HOMARD_TEST_FILES})
+  SET(TEST_NAME HOMARD_${tfile})
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+ENDFOREACH()