diff --git a/.gitignore b/.gitignore index 1c6ae15..15c3b77 100644 --- a/.gitignore +++ b/.gitignore @@ -83,7 +83,7 @@ test/*.trs test/*.txt test/*.eps test/test_cscripts.sh -test/test_examples.sh +test/test_examples.py test/reports/*.xml test/butterfly.txt test/.coverage diff --git a/configure.ac b/configure.ac index c191943..9578d78 100644 --- a/configure.ac +++ b/configure.ac @@ -1025,7 +1025,7 @@ AC_CONFIG_FILES([Makefile test/test_cscripts.sh test/test_python_ctools.sh test/test_python_cscripts.sh - test/test_examples.sh + test/test_examples.py pyext/Makefile pyext/setup.py pyext/ctools/__init__.py @@ -1039,7 +1039,7 @@ AC_CONFIG_FILES([Makefile [if test -f test/test_cscripts.sh; then chmod +x test/test_cscripts.sh; fi; if test -f test/test_python_ctools.sh; then chmod +x test/test_python_ctools.sh; fi; if test -f test/test_python_cscripts.sh; then chmod +x test/test_python_cscripts.sh; fi; - if test -f test/test_examples.sh; then chmod +x test/test_examples.sh; fi; + if test -f test/test_examples.py; then chmod +x test/test_examples.py; fi; if test -f testconf.sh; then chmod +x testconf.sh; fi]) AC_OUTPUT diff --git a/test/Makefile.am b/test/Makefile.am index 2213dab..ef10ca1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -9,7 +9,7 @@ if WITH_PYTHON TEST_CSCRIPTS = test_cscripts.sh TEST_PYTHON_CTOOLS = test_python_ctools.sh TEST_PYTHON_CSCRIPTS = test_python_cscripts.sh - TEST_PYTHON_EXAMPLES = test_examples.sh + TEST_PYTHON_EXAMPLES = test_examples.py TEST_PYTHON_ENV = PYTHONPATH=$(top_builddir):$(top_builddir)/pyext:$(top_builddir)/pyext/build/ctools/ctools:$(pythondir):$(pyexecdir):$(PYTHONPATH) endif diff --git a/test/test_examples.py b/test/test_examples.py.in index 21032ee..54aa4bf 100755 --- a/test/test_examples.py +++ b/test/test_examples.py.in @@ -58,7 +58,7 @@ class Test(gammalib.GPythonTestSuite): String with name to be used for logging """ # Setup command - cmd = '../examples/' + name + '.py' + cmd = '@PYTHON_COVERAGE@../examples/' + name + '.py' if len(args) > 0: cmd += ' ' + args diff --git a/test/test_examples.sh.in b/test/test_examples.sh.in deleted file mode 100755 index fc5d689..0000000 --- a/test/test_examples.sh.in +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh -# ========================================================================== -# This script launches the examples unit tests -# -# Copyright (C) 2016 Juergen Knoedlseder -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# ========================================================================== - -# -# Run the examples test -# ===================== -@PYTHON_COVERAGE@./test_examples.py