[Debian-med-packaging] Strange *.so names in pbuild do require tricks for test suite (Was: Trying to run build time tests using nosetest for python-pysam)

Andreas Tille andreas at an3as.eu
Tue Jul 21 15:46:28 UTC 2015


Hi Piotr,

thanks for your quick help!

On Tue, Jul 21, 2015 at 05:29:18PM +0200, Piotr Ożarowski wrote:
> [Piotr Ożarowski, 2015-07-21]
> >   export PYBUILD_TEST_NOSE=1
> 
> if tests are not installed, add also:
> 
>   export PYBUILD_TEST_ARGS={dir}/tests

While it looks a lot more elegant if I do

export PYBUILD_TEST_NOSE=1
export PYBUILD_TEST_ARGS={dir}/tests

...

override_dh_auto_test:
	# Tests are stumbling upon missing ex1.bam file ...
	ln -s pysam_data/ex1.bam tests
	cd tests && make -C pysam_data
	dh_auto_test

This ends in:

...
======================================================================
ERROR: testParsing (tabix_test.TestVCFFromVCF)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andreas/debian-maintain/repack/python-pysam/pysam-0.8.3/tests/tabix_test.py", line 806, in setUp
    TestVCF.setUp(self)
  File "/home/andreas/debian-maintain/repack/python-pysam/pysam-0.8.3/tests/tabix_test.py", line 664, in setUp
    shutil.copyfile(self.filename, self.tmpfilename)
  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'tabix_data/example.vcf40'

----------------------------------------------------------------------
Ran 531 tests in 1.706s

FAILED (errors=468)
E: pybuild pybuild:256: test: plugin distutils failed with: exit code=1: cd /home/andreas/debian-maintain/repack/python-pysam/pysam-0.8.3/.pybuild/pythonX.Y_2.7/build; python2.7 -m nose --with-doctest {dir}/tests
dh_auto_test: pybuild --test -i python{version} -p 2.7 --dir . returned exit code 13


tabix_data is a subdirectory of tests and seems to be ignored with the
method you proposed.

Thanks anyway

      Andreas.

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list