From 1bb6fcc6c7927d3c67c74d64350d96c5af57ea73 Mon Sep 17 00:00:00 2001 From: Afif Elghraoui Date: Fri, 24 Jul 2015 00:20:38 -0700 Subject: [PATCH] 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. --- debian/rules | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) 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 -- 2.30.2