[med-svn] [python-cutadapt] 01/01: Run build time tests

Andreas Tille tille at debian.org
Mon Mar 20 15:47:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository python-cutadapt.

commit e1159ce9929c99a839405fcb5157c605a380cac8
Author: Andreas Tille <tille at debian.org>
Date:   Mon Mar 20 16:38:10 2017 +0100

    Run build time tests
---
 debian/changelog                  |  2 +-
 debian/control                    |  2 ++
 debian/patches/0003_fixtest.patch | 33 +++++++++++++++++++++++++++++++++
 debian/patches/series             |  1 +
 debian/rules                      | 13 +++++++++++--
 5 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f2ae808..fb78760 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
 python-cutadapt (1.12-2) UNRELEASED; urgency=medium
 
-  TODO: python-xopen needs to be packaged first
   * Depends: python-xopen
     Closes: #858053
+  * Run build time tests
 
  -- Andreas Tille <tille at debian.org>  Fri, 17 Mar 2017 21:20:50 +0100
 
diff --git a/debian/control b/debian/control
index 7355950..8b4152d 100644
--- a/debian/control
+++ b/debian/control
@@ -10,12 +10,14 @@ Build-Depends: debhelper (>= 9),
                python-all,
                python-all-dev,
                python-setuptools,
+               python-nose,
                python-xopen,
                cython,
                python3-all,
                python3-all-dev,
                python3-setuptools,
                python3-six,
+               python3-nose,
                python3-xopen,
                cython3
 Standards-Version: 3.9.8
diff --git a/debian/patches/0003_fixtest.patch b/debian/patches/0003_fixtest.patch
new file mode 100644
index 0000000..51e1ddf
--- /dev/null
+++ b/debian/patches/0003_fixtest.patch
@@ -0,0 +1,33 @@
+--- a/tests/testcolorspace.py
++++ b/tests/testcolorspace.py
+@@ -3,7 +3,7 @@ from __future__ import print_function, d
+ 
+ from cutadapt.colorspace import encode, decode
+ from cutadapt.scripts.cutadapt import main
+-from .utils import run, datapath
++from utils import run, datapath
+ 
+ # If there are any unknown characters in the test sequence,
+ # round tripping will only work if all characters after the
+--- a/tests/testpaired.py
++++ b/tests/testpaired.py
+@@ -4,7 +4,7 @@ from __future__ import print_function, d
+ import shutil
+ from nose.tools import raises
+ from cutadapt.scripts import cutadapt
+-from .utils import run, files_equal, datapath, cutpath, redirect_stderr, temporary_path
++from utils import run, files_equal, datapath, cutpath, redirect_stderr, temporary_path
+ 
+ def run_paired(params, in1, in2, expected1, expected2):
+ 	if type(params) is str:
+--- a/tests/tests.py
++++ b/tests/tests.py
+@@ -9,7 +9,7 @@ import sys
+ from nose.tools import raises
+ from cutadapt.scripts import cutadapt
+ from cutadapt.compat import StringIO
+-from .utils import run, files_equal, datapath, cutpath, redirect_stderr, temporary_path
++from utils import run, files_equal, datapath, cutpath, redirect_stderr, temporary_path
+ 
+ def test_example():
+ 	run('-N -b ADAPTER', 'example.fa', 'example.fa')
diff --git a/debian/patches/series b/debian/patches/series
index c3dfe4e..04112ea 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 cython_version.patch
 0002-Fix-encoding-issue-in-setup.py.patch
+0003_fixtest.patch
diff --git a/debian/rules b/debian/rules
index 12bcbe2..d1b7d6e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,6 +20,8 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 
 export PYBUILD_NAME=cutadapt
 
+PYTHON2 := $(shell pyversions -r)
+PYTHON3 := $(shell py3versions -r)
 
 # main packaging script based on dh7 syntax
 %:
@@ -31,5 +33,12 @@ override_dh_install:
 	mv debian/python3-cutadapt/usr/bin/cutadapt debian/cutadapt/usr/bin/
 	rm -f debian/python-cutadapt/usr/bin/cutadapt
 
-
-
+override_dh_auto_test:
+ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
+	for py in $(PYTHON2) ; do\
+	    $$py setup.py nosetests -v ; \
+	done
+	for py in $(PYTHON3) ; do\
+	    $$py setup.py nosetests -v ; \
+	done
+endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-cutadapt.git



More information about the debian-med-commit mailing list