From fb77be2327c3399415feb09db417c89dfd3cda19 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Sun, 12 Aug 2018 13:00:00 +0200 Subject: Test all supported Python versions. --- debian/changelog | 3 ++- debian/tests/control | 5 +++-- debian/tests/python-upstream | 19 ------------------- debian/tests/python-upstream.py | 17 +++++++++++++++++ debian/tests/python-upstream.sh | 9 +++++++++ 5 files changed, 31 insertions(+), 22 deletions(-) delete mode 100755 debian/tests/python-upstream create mode 100644 debian/tests/python-upstream.py create mode 100755 debian/tests/python-upstream.sh diff --git a/debian/changelog b/debian/changelog index 8963d4f7..ed8e9c67 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ gudhi (2.2.0+dfsg-3) UNRELEASED; urgency=medium * Fix build of bindings for multiple Python versions when building just binary-arch. + * Test all supported Python (3) versions. - -- Gard Spreemann Sun, 12 Aug 2018 12:11:18 +0200 + -- Gard Spreemann Sun, 12 Aug 2018 12:59:18 +0200 gudhi (2.2.0+dfsg-2) unstable; urgency=medium diff --git a/debian/tests/control b/debian/tests/control index 49eabb3f..65510cef 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,2 +1,3 @@ -Tests: python-upstream -Depends: python3-gudhi, python3-pytest \ No newline at end of file +Tests: python-upstream.sh +Depends: python3-all, python3-gudhi, python3-pytest + diff --git a/debian/tests/python-upstream b/debian/tests/python-upstream deleted file mode 100755 index ed1c6027..00000000 --- a/debian/tests/python-upstream +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/python3 -B - -import pytest -import os - -tmpdir = os.getenv("AUTOPKGTEST_TMP") - -if tmpdir is None: - print("Need the environment variable AUTOPKGTEST_TMP.") - exit(1) - -cwd = os.getcwd() -test_path = cwd + "/cython/test" - -os.chdir(tmpdir) - -print("Running tests from %s with cwd %s." %(test_path, os.getcwd())) - -exit(pytest.main([test_path])) diff --git a/debian/tests/python-upstream.py b/debian/tests/python-upstream.py new file mode 100644 index 00000000..098701aa --- /dev/null +++ b/debian/tests/python-upstream.py @@ -0,0 +1,17 @@ +import pytest +import os + +tmpdir = os.getenv("AUTOPKGTEST_TMP") + +if tmpdir is None: + print("Need the environment variable AUTOPKGTEST_TMP.") + exit(1) + +cwd = os.getcwd() +test_path = cwd + "/cython/test" + +os.chdir(tmpdir) + +print("Running tests from %s with cwd %s." %(test_path, os.getcwd())) + +exit(pytest.main([test_path])) diff --git a/debian/tests/python-upstream.sh b/debian/tests/python-upstream.sh new file mode 100755 index 00000000..e292ab76 --- /dev/null +++ b/debian/tests/python-upstream.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +for py3ver in $(py3versions -vs) +do + echo "Running tests with Python ${py3ver}." + /usr/bin/python${py3ver} -B debian/tests/python-upstream.py +done -- cgit v1.2.3