[med-svn] [python-pbh5tools] 02/08: Run cram tests at build time now that cram is packaged in Debian
Afif Elghraoui
afif-guest at moszumanska.debian.org
Sun Nov 15 10:06:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
afif-guest pushed a commit to branch master
in repository python-pbh5tools.
commit ec17c33bd80d6d3644d756ac56ed6833e6311e4f
Author: Afif Elghraoui <afif at ghraoui.name>
Date: Sun Nov 15 00:08:25 2015 -0800
Run cram tests at build time now that cram is packaged in Debian
The cram tests are still not run for autopkgtest because there
is a failure due to autopkgtest #798066.
---
debian/TODO | 8 --------
debian/control | 1 +
debian/patches/pbcore-change.patch | 18 ++++++++++++++++++
debian/patches/series | 3 ++-
debian/patches/verbose-testing.patch | 23 +++++++++++++++++++++++
debian/rules | 6 +-----
6 files changed, 45 insertions(+), 14 deletions(-)
diff --git a/debian/TODO b/debian/TODO
deleted file mode 100644
index 9b5e9c4..0000000
--- a/debian/TODO
+++ /dev/null
@@ -1,8 +0,0 @@
-* Package python-cram.
- cram is required to run some of the tests.
- cram's source is at <https://bitbucket.org/brodie/cram>.
- It's also listed in the python package index.
-* Add python-cram as build-dependency and remove override_dh_auto_test.
-* Deal with architecture-dependent portions of the python module.
- There's a C shared library that is compiled as part of the setup.py
- build.
diff --git a/debian/control b/debian/control
index 9f573a4..8bd9b30 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,7 @@ Build-Depends: debhelper (>= 9),
python-pbcore,
python-sphinx,
python-nose,
+ python-cram,
pandoc
Standards-Version: 3.9.6
Homepage: https://github.com/PacificBiosciences/pbh5tools
diff --git a/debian/patches/pbcore-change.patch b/debian/patches/pbcore-change.patch
new file mode 100644
index 0000000..94a18ce
--- /dev/null
+++ b/debian/patches/pbcore-change.patch
@@ -0,0 +1,18 @@
+Description: Fix pbcore import statement
+Origin: upstream
+Applied-Upstream: 14493e6bd48ba442a07301e8069d79caa02efbb9
+Last-Update: 2014-12-24
+--- python-pbh5tools.orig/tests/test_cmph5lib_CmpH5Merge.py
++++ python-pbh5tools/tests/test_cmph5lib_CmpH5Merge.py
+@@ -3,9 +3,9 @@
+ import logging
+ import unittest
+ import shutil
+-
+-from pbcore.io.CmpH5IO import CmpH5Reader
+ import sys
++
++from pbcore.io import CmpH5Reader
+ from pbh5tools.CmpH5Select import cmpH5Select
+ from pbh5tools.CmpH5Merge import cmpH5Merge
+
diff --git a/debian/patches/series b/debian/patches/series
index 5c2cfbf..bece2a1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
default-doc-theme
-enable-nosetests
+pbcore-change.patch
+verbose-testing.patch
diff --git a/debian/patches/verbose-testing.patch b/debian/patches/verbose-testing.patch
new file mode 100644
index 0000000..9e187f2
--- /dev/null
+++ b/debian/patches/verbose-testing.patch
@@ -0,0 +1,23 @@
+Description: Make tests verbose when called from upstream build system
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: no
+Last-Update: 2015-11-14
+--- python-pbh5tools.orig/Makefile
++++ python-pbh5tools/Makefile
+@@ -17,13 +17,13 @@
+ python setup.py develop
+
+ test: examples
+- find tests -name "*.py" | xargs nosetests
+- find tests/cram -name "*.t" | xargs cram
++ find tests -name "*.py" | xargs nosetests -v
++ find tests/cram -name "*.t" | xargs cram -v
+ doc:
+ sphinx-apidoc -T -f -o doc src/ && cd doc && make html
+
+ examples:
+- cram doc/examples.t
++ cram -v doc/examples.t
+ sed 's/^ / /' doc/examples.t > doc/examples.md
+
+ example-rendered: examples
diff --git a/debian/rules b/debian/rules
index 7a76793..83854d0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,13 +24,9 @@ override_dh_install:
mv $(BINDIR)/bash5tools.py $(BINDIR)/bash5tools
mv $(BINDIR)/cmph5tools.py $(BINDIR)/cmph5tools
-# cram is not in Debian, but required to run some of the tests.
-# This override skips building the tests to allow full package build in
-# the meantime.
-# cram's source is at https://bitbucket.org/brodie/cram
override_dh_auto_test:
PYBUILD_SYSTEM=custom \
- PYBUILD_TEST_ARGS="{interpreter} setup.py test" \
+ PYBUILD_TEST_ARGS="PATH=$(CURDIR)/build/scripts-2.7:$$PATH $(MAKE) test" \
dh_auto_test
override_dh_auto_clean:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-pbh5tools.git
More information about the debian-med-commit
mailing list