[med-svn] [pysam] 01/01: Enable proper cleanup after running tests

Andreas Tille tille at debian.org
Mon Feb 10 10:47:58 UTC 2014


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

tille pushed a commit to branch master
in repository pysam.

commit d657d67f72924ee8ff7c4cd3eb639aaa34717927
Author: Andreas Tille <tille at debian.org>
Date:   Mon Feb 10 11:52:59 2014 +0100

    Enable proper cleanup after running tests
---
 debian/patches/fix_cleanup_tests.patch | 19 +++++++++++++++++++
 debian/patches/series                  |  1 +
 debian/rules                           |  5 +++++
 3 files changed, 25 insertions(+)

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 <tille at debian.org>
+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

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



More information about the debian-med-commit mailing list