From bc9b55f6595c6406c4188fec126782bc1e083912 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Wed, 23 Oct 2019 12:28:46 +0200 Subject: Simplify tests for new version. --- debian/tests/control | 2 +- debian/tests/python-upstream.py | 17 ----------------- debian/tests/python-upstream.sh | 10 +++++++++- 3 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 debian/tests/python-upstream.py diff --git a/debian/tests/control b/debian/tests/control index 65510cef..69d685df 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,3 @@ Tests: python-upstream.sh -Depends: python3-all, python3-gudhi, python3-pytest +Depends: python3-all, python3-gudhi diff --git a/debian/tests/python-upstream.py b/debian/tests/python-upstream.py deleted file mode 100644 index 098701aa..00000000 --- a/debian/tests/python-upstream.py +++ /dev/null @@ -1,17 +0,0 @@ -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 index e292ab76..a83dfdcc 100755 --- a/debian/tests/python-upstream.sh +++ b/debian/tests/python-upstream.sh @@ -1,9 +1,17 @@ #!/bin/bash set -e +set -u + +testdir=$PWD/src/python/test +cd $AUTOPKGTEST_TMP for py3ver in $(py3versions -vs) do echo "Running tests with Python ${py3ver}." - /usr/bin/python${py3ver} -B debian/tests/python-upstream.py + for t in $(find $testdir -type f -name 'test_*.py') + do + echo "Running test ${t}." + /usr/bin/python${py3ver} -B $t + done done -- cgit v1.2.3