[med-svn] [python-cobra] 04/07: Use Make to drive autopkgtests and document some rationale.
Afif Elghraoui
afif at moszumanska.debian.org
Sun Jul 17 23:52:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
afif pushed a commit to branch master
in repository python-cobra.
commit 9c69b0c427fbabcef6ae695d8cc23c6a45683293
Author: Afif Elghraoui <afif at debian.org>
Date: Sun Jul 17 15:24:15 2016 -0700
Use Make to drive autopkgtests and document some rationale.
---
debian/tests/Makefile | 13 +++++++++++++
debian/tests/control | 13 +++++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/debian/tests/Makefile b/debian/tests/Makefile
new file mode 100644
index 0000000..8e2759a
--- /dev/null
+++ b/debian/tests/Makefile
@@ -0,0 +1,13 @@
+
+.ONESHELL:
+
+all: py2-test py3-test
+
+py2-test: SHELL=python2
+py3-test: SHELL=python3
+
+%-test:
+ import sys
+ from cobra.test import test_all
+
+ sys.exit(test_all())
diff --git a/debian/tests/control b/debian/tests/control
index 5a764a5..341b075 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,14 +1,23 @@
-Test-Command: cd $ADTTMP && python -c "import sys; from cobra.test import test_all; sys.exit(test_all())"
+Test-Command:
+ export MAKEFILES="$PWD/debian/tests/Makefile";
+ cd $ADTTMP && make py2-test
Depends:
+ make,
python-cobra,
+# We could have avoided retyping these by adding the "needs-recommends" restriction, but doing that would also cause matplotlib to be pulled in.
+# The tests involving matplotlib fail on debci from trying to do graphical operations on a headless server.
python-sbml,
python-scipy,
python-numpy,
Restrictions: allow-stderr
-Test-Command: cd $ADTTMP && python3 -c "import sys; from cobra.test import test_all; sys.exit(test_all())"
+Test-Command:
+ export MAKEFILES="$PWD/debian/tests/Makefile";
+ cd $ADTTMP && make py3-test
Depends:
+ make,
python3-cobra,
+# See the comment for the corresponding section in the python2 test above.
python3-scipy,
python3-numpy,
Restrictions: allow-stderr
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-cobra.git
More information about the debian-med-commit
mailing list