From: Afif Elghraoui Date: Fri, 24 Jul 2015 07:20:38 +0000 (-0700) Subject: Move test directory cleaning commands to a separate recipe X-Git-Tag: archive/raspbian/0.22.0+ds-1+rpi1~1^2^2~287 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1bb6fcc6c7927d3c67c74d64350d96c5af57ea73;p=python-pysam.git Move test directory cleaning commands to a separate recipe This allows us to be require a clean test directory before the installation step. We don't want to package all the temporary files that come with the tests being built. --- diff --git a/debian/rules b/debian/rules index 23ef750..0a7ac11 100755 --- a/debian/rules +++ b/debian/rules @@ -16,26 +16,11 @@ export PYBUILD_TEST_ARGS={dir}/tests %: LC_ALL=C.UTF-8 dh $@ --with python2,python3 --buildsystem=pybuild -override_dh_install: +override_dh_install: clean-tests dh_install -Xtest.gtf.gz -override_dh_auto_clean: +override_dh_auto_clean: clean-tests dh_auto_clean - $(MAKE) -C tests/pysam_data clean - find . -name "*.pyc" -delete - find . -name "*.pyxbldc" -delete - find . -name "tmp_*" -delete - find . -name "*.bai*" -delete - find . -name "*.cram*" -delete - find . -name "*.bam" -delete - rm -rf tests/pysam_test_work \ - tests/example_htslib.gtf.gz.tbi \ - tests/log.txt \ - tests/test.bam \ - tests/_compile_test.c \ - tests/pysam_ex2.sam \ - pysam/calignmentfile.c \ - pysam/cbcf.c override_dh_auto_test: # Tests are stumbling upon missing ex1.bam file ... @@ -59,3 +44,22 @@ override_dh_auto_test: get-orig-source: uscan --verbose --force-download --repack --compression xz + +clean-tests: + $(MAKE) -C tests/pysam_data clean + find . -name "*.pyc" -delete + find . -name "*.pyxbldc" -delete + find . -name "tmp_*" -delete + find . -name "*.bai*" -delete + find . -name "*.cram*" -delete + find . -name "*.bam" -delete + rm -rf tests/pysam_test_work \ + tests/example_htslib.gtf.gz.tbi \ + tests/log.txt \ + tests/test.bam \ + tests/_compile_test.c \ + tests/pysam_ex2.sam \ + pysam/calignmentfile.c \ + pysam/cbcf.c + +.PHONY: clean-tests