From: Andreas Tille Date: Mon, 10 Feb 2014 10:52:59 +0000 (+0100) Subject: Enable proper cleanup after running tests X-Git-Tag: archive/raspbian/0.22.0+ds-1+rpi1~1^2^2~419 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d657d67f72924ee8ff7c4cd3eb639aaa34717927;p=python-pysam.git Enable proper cleanup after running tests --- diff --git a/debian/patches/fix_cleanup_tests.patch b/debian/patches/fix_cleanup_tests.patch new file mode 100644 index 0000000..178876e --- /dev/null +++ b/debian/patches/fix_cleanup_tests.patch @@ -0,0 +1,19 @@ +Author: Andreas Tille +Last-Changed: Mon, 10 Feb 2014 11:29:40 +0100 +Description: Prevent tests makefile from deleting files which + are contained inside the upstream source + +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -47,6 +47,11 @@ example_bai.bam: ex1.bam + + + clean: ++ mkdir keep_bam_files ++ mv ex9_fail.bam ex9_nofail.bam example_btag.bam example_empty_header.bam issue100.bam tag_bug.bam test_unaligned.bam keep_bam_files + rm -fr *.bam *.bai *.fai *.pileup* \ + *~ calDepth *.dSYM pysam_*.sam \ + ex2.sam ex2.sam.gz ex1.sam ++ mv keep_bam_files/* . ++ rmdir keep_bam_files ++ rm -rf pysam_test_work/ diff --git a/debian/patches/series b/debian/patches/series index 9c42630..ebb9930 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ +fix_cleanup_tests.patch do_not_use_distribute_setup.patch offline-tests.patch diff --git a/debian/rules b/debian/rules index 283adbf..648e82a 100755 --- a/debian/rules +++ b/debian/rules @@ -14,3 +14,8 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) cd tests && env PYTHONPATH=$(pybuilddir)-$${pyv} ./pysam_test_offline.py ; \ done endif + +override_dh_auto_clean: + dh_auto_clean + cd tests; make clean + rm -f tests/log.txt