From: Jean-Philippe ARGAUD Date: Mon, 22 Feb 2016 14:08:33 +0000 (+0100) Subject: Add tests for salome test X-Git-Tag: V7_8_0~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=33a40534f3bd73b4e234bb53cc98fadc7e8e1172;p=modules%2Fadao.git Add tests for salome test --- diff --git a/Makefile.am b/Makefile.am index 6bf886f..079964c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,7 +29,7 @@ endif SUBDIRS += src if SALOME_MODULE -SUBDIRS += resources bin examples +SUBDIRS += resources bin examples test endif if SPHINX_IS_OK diff --git a/configure.ac b/configure.ac index ac51e75..ca5bccf 100644 --- a/configure.ac +++ b/configure.ac @@ -144,5 +144,6 @@ AC_CONFIG_FILES([ doc/Makefile doc/en/Makefile doc/fr/Makefile + test/Makefile ]) AC_OUTPUT diff --git a/test/CTestTestfileInstall.cmake.in b/test/CTestTestfileInstall.cmake.in new file mode 100644 index 0000000..7db1b2a --- /dev/null +++ b/test/CTestTestfileInstall.cmake.in @@ -0,0 +1,28 @@ +# Copyright (C) 2015 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 "@CMAKE_INSTALL_PREFIX@/bin/salome/appliskel/salome_test_driver.py") + +SET(COMPONENT_NAME ADAO) +SET(TIMEOUT 500) + +# Add all test subdirs +SUBDIRS( test1001 + test1002 + ) diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..de6d3fa --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,41 @@ +# Copyright (C) 2008-2016 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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. +# +# 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: André Ribes, andre.ribes@edf.fr, EDF R&D + +include $(top_srcdir)/adm_local/make_common_starter.am + +EXTRA_DIST = test1001 test1002 CTestTestfileInstall.cmake.in + +DIR = $(top_srcdir)/test/ + +SALOMETESTDIR=$(DESTDIR)$(bindir)/test + +install-data-local: + ${mkinstalldirs} $(SALOMETESTDIR) + cp -R $(DIR)test1001 $(SALOMETESTDIR) + cp -R $(DIR)test1002 $(SALOMETESTDIR) + cp $(DIR)CTestTestfileInstall.cmake.in $(SALOMETESTDIR)/CTestTestfile.cmake + +uninstall-local: + chmod -R +w $(SALOMETESTDIR) + rm -rf $(SALOMETESTDIR)/test1001 + rm -rf $(SALOMETESTDIR)/test1002 + rm $(SALOMETESTDIR)/CTestTestfile.cmake diff --git a/test/test1001/CTestTestfile.cmake b/test/test1001/CTestTestfile.cmake new file mode 100644 index 0000000..1a209cb --- /dev/null +++ b/test/test1001/CTestTestfile.cmake @@ -0,0 +1,31 @@ +# Copyright (C) 2015 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 +# + +#FILE(GLOB ADAO_TEST1001_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.py") + +SET(TEST_NAMES + HelloWorld + ) + +FOREACH(tfile ${TEST_NAMES}) + SET(TEST_NAME ADAO_${tfile}) + ADD_TEST(${TEST_NAME} python ${tfile}.py) + #ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}") +ENDFOREACH() diff --git a/test/test1001/HelloWorld.py b/test/test1001/HelloWorld.py new file mode 100644 index 0000000..c90c6a5 --- /dev/null +++ b/test/test1001/HelloWorld.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python + +print "Hello world!" diff --git a/test/test1002/CTestTestfile.cmake b/test/test1002/CTestTestfile.cmake new file mode 100644 index 0000000..1a209cb --- /dev/null +++ b/test/test1002/CTestTestfile.cmake @@ -0,0 +1,31 @@ +# Copyright (C) 2015 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 +# + +#FILE(GLOB ADAO_TEST1001_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.py") + +SET(TEST_NAMES + HelloWorld + ) + +FOREACH(tfile ${TEST_NAMES}) + SET(TEST_NAME ADAO_${tfile}) + ADD_TEST(${TEST_NAME} python ${tfile}.py) + #ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}") +ENDFOREACH() diff --git a/test/test1002/HelloWorld.py b/test/test1002/HelloWorld.py new file mode 100644 index 0000000..b5ca5cb --- /dev/null +++ b/test/test1002/HelloWorld.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python + +print "Hello world 2!"