summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGard Spreemann <gspreemann@gmail.com>2017-04-28 12:42:11 +0200
committerGard Spreemann <gspreemann@gmail.com>2017-04-28 12:42:11 +0200
commit5988c98df0d974555474e40c5ff368f0439f86f6 (patch)
tree4740254c43f01e8849544db74afbd6b5fbdab857
parent9aa5fbb5434c0ddc134ea33523ffb89b6481a4fc (diff)
Add autopkgtest test suite for upstream's tests of the Python interface.
-rw-r--r--debian/control1
-rw-r--r--debian/tests/control2
-rwxr-xr-xdebian/tests/python-upstream19
3 files changed, 22 insertions, 0 deletions
diff --git a/debian/control b/debian/control
index 7e130392..d05104e4 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Build-Depends: cmake (>= 2.6), cython3, debhelper (>= 10), dh-python, doxygen,
Homepage: http://gudhi.gforge.inria.fr/
Vcs-Browser: https://git.nonempty.org/debian-gudhi
Vcs-Git: http://git.nonempty.org/debian-gudhi -b debian/sid
+Testsuite: autopkgtest
Package: libgudhi-dev
Section: libdevel
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 00000000..49eabb3f
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: python-upstream
+Depends: python3-gudhi, python3-pytest \ No newline at end of file
diff --git a/debian/tests/python-upstream b/debian/tests/python-upstream
new file mode 100755
index 00000000..ed1c6027
--- /dev/null
+++ b/debian/tests/python-upstream
@@ -0,0 +1,19 @@
+#!/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]))