Enable proper cleanup after running tests
authorAndreas Tille <tille@debian.org>
Mon, 10 Feb 2014 10:52:59 +0000 (11:52 +0100)
committerAndreas Tille <tille@debian.org>
Mon, 10 Feb 2014 10:52:59 +0000 (11:52 +0100)
debian/patches/fix_cleanup_tests.patch [new file with mode: 0644]
debian/patches/series
debian/rules

diff --git a/debian/patches/fix_cleanup_tests.patch b/debian/patches/fix_cleanup_tests.patch
new file mode 100644 (file)
index 0000000..178876e
--- /dev/null
@@ -0,0 +1,19 @@
+Author: Andreas Tille <tille@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/
index 9c42630cd6876d42c95d40b23741a3fe6fc92f5a..ebb99307e3f51fc7b541d6e9303fadf7f216162c 100644 (file)
@@ -1,2 +1,3 @@
+fix_cleanup_tests.patch
 do_not_use_distribute_setup.patch
 offline-tests.patch
index 283adbf5faeb32189c245c140411b3e7a0af423f..648e82ad2445f0251fccb14e255d256799afd312 100755 (executable)
@@ -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