[med-svn] [pbbam] 11/12: Set up build-time tests for command-line tools

Afif Elghraoui afif at moszumanska.debian.org
Tue Jul 5 03:24:44 UTC 2016


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

afif pushed a commit to branch master
in repository pbbam.

commit f9eebad32678915381ec242a736dc124d210b1fe
Author: Afif Elghraoui <afif at debian.org>
Date:   Mon Jul 4 19:28:28 2016 -0700

    Set up build-time tests for command-line tools
---
 debian/control                      |  4 +++-
 debian/patches/remove-bam2sam.patch | 18 ++++++++++++++++++
 debian/patches/series               |  1 +
 debian/rules                        | 16 ++++++++++++++--
 4 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index cb0a7ef..32e4b7a 100644
--- a/debian/control
+++ b/debian/control
@@ -9,11 +9,13 @@ Build-Depends:
 	cmake,
 #	swig3.0,
 	doxygen,
-#	libgtest-dev,
 	libboost-dev (>= 1.54),
 	zlib1g-dev,
 	libssl-dev,
 	libhts-dev,
+# Test-Depends:
+#	libgtest-dev,
+	python-cram,
 	samtools,
 Standards-Version: 3.9.8
 Homepage: https://github.com/PacificBiosciences/pbbam
diff --git a/debian/patches/remove-bam2sam.patch b/debian/patches/remove-bam2sam.patch
new file mode 100644
index 0000000..df2447d
--- /dev/null
+++ b/debian/patches/remove-bam2sam.patch
@@ -0,0 +1,18 @@
+Description: Exclude the bam2sam utility
+ It is a convenience tool provided by upstream to avoid depending on
+ samtools. We actually have trouble building it in Debian and have
+ easy access to samtools.
+Author: Afif Elghraoui <afif at debian.org>
+Forwarded: not-needed
+Last-Update: 2016-07-04
+
+--- pbbam.orig/tools/CMakeLists.txt
++++ pbbam/tools/CMakeLists.txt
+@@ -11,7 +11,6 @@
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PacBioBAM_CXX_FLAGS}")
+ 
+ # tools
+-add_subdirectory(bam2sam)
+ add_subdirectory(pbindex)
+ add_subdirectory(pbindexdump)
+ add_subdirectory(pbmerge)
diff --git a/debian/patches/series b/debian/patches/series
index 59337a9..c87ab09 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 dont-try-building-gtest.patch
 ssl-md5.patch
+remove-bam2sam.patch
diff --git a/debian/rules b/debian/rules
index cef8524..fcc0aa0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,8 +19,8 @@ override_dh_auto_configure:
 #	-DPacBioBAM_wrap_python=ON \
 #	-DPacBioBAM_wrap_r=ON
 
-override_dh_auto_test:
-#	cd build && $(MAKE) test
+override_dh_auto_test: $(subst .t,.deb.t,$(wildcard tests/src/cram/pb*.t))
+	TESTDIR=tests/src/cram cram -v $^
 
 override_dh_link:
 	dh_link --package=libpbbam-dev \
@@ -30,3 +30,15 @@ override_dh_link:
 
 override_dh_installchangelogs:
 	dh_installchangelogs CHANGELOG.md
+
+override_dh_auto_clean:
+	dh_auto_clean
+	find -name "*.deb.t" -delete
+
+%.deb.t: %.t
+	sed \
+	-e 's/$$BAM2SAM/samtools view/g' \
+	-e 's/\-\-header\-only/-H/g' \
+	-e 's/\-\-no\-header//g' \
+	$< > $@
+

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



More information about the debian-med-commit mailing list