[med-svn] [pbseqlib] 02/05: Set up some build-time tests
Afif Elghraoui
afif-guest at moszumanska.debian.org
Mon Dec 14 04:07:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
afif-guest pushed a commit to branch master
in repository pbseqlib.
commit adcd6d10efe949313cee7323278dcf896174b599
Author: Afif Elghraoui <afif at ghraoui.name>
Date: Sun Dec 13 18:53:29 2015 -0800
Set up some build-time tests
Not all can be enabled because we don't have access
to the necessary data files.
---
debian/control | 2 ++
debian/patches/exclude-pbbam.patch | 33 +++++++++++++++++++++++++++++++++
debian/patches/external-gtest.patch | 34 ++++++++++++++++++++++++++++++++++
debian/patches/series | 2 ++
debian/rules | 7 +++++++
5 files changed, 78 insertions(+)
diff --git a/debian/control b/debian/control
index 5528649..0e4c9ba 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,8 @@ Build-Depends:
libboost-dev,
# libpbbam-dev,
libhts-dev,
+# Test-Depends:
+ libgtest-dev,
Standards-Version: 3.9.6
Section: libs
Homepage: https://github.com/PacificBiosciences/blasr_libcpp
diff --git a/debian/patches/exclude-pbbam.patch b/debian/patches/exclude-pbbam.patch
new file mode 100644
index 0000000..af48a4f
--- /dev/null
+++ b/debian/patches/exclude-pbbam.patch
@@ -0,0 +1,33 @@
+Description: Leave out pbbam from unittest builds
+ The main source can compile without pbbam, so
+ the tests should also be able to.
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: not-needed
+Last-Update: 2015-12-13
+--- pbseqlib.orig/unittest/makefile
++++ pbseqlib/unittest/makefile
+@@ -59,7 +59,6 @@
+ $(LIBBLASR_INC) \
+ $(LIBPBIHDF_INC) \
+ $(LIBPBDATA_INC) \
+- $(PBBAM_INC) \
+ $(HTSLIB_INC) \
+ $(HDF5_INC) \
+ $(BOOST_INC) \
+@@ -69,7 +68,6 @@
+ $(LIBBLASR_LIB) \
+ $(LIBPBIHDF_LIB) \
+ $(LIBPBDATA_LIB) \
+- $(PBBAM_LIB) \
+ $(HTSLIB_LIB) \
+ $(HDF5_LIB) \
+ $(HDF5_CPP_LIB) \
+@@ -77,7 +75,7 @@
+ $(GCC_LIB) \
+ $(null)
+
+-ldlibs := -lblasr -lpbihdf -lpbdata -lpbbam -lhts -lhdf5_cpp -lhdf5 -lz
++ldlibs := -lblasr -lpbihdf -lpbdata -lhts -lhdf5_cpp -lhdf5 -lz
+ sys_ldlibs := -lpthread -ldl -lrt
+
+ cxxopts := -std=c++11 -Wno-div-by-zero
diff --git a/debian/patches/external-gtest.patch b/debian/patches/external-gtest.patch
new file mode 100644
index 0000000..1d8b26a
--- /dev/null
+++ b/debian/patches/external-gtest.patch
@@ -0,0 +1,34 @@
+Description: Adjust gtest environment variables for Debian installation
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: not-needed
+Last-Update: 2015-12-13
+--- pbseqlib.orig/unittest/makefile
++++ pbseqlib/unittest/makefile
+@@ -17,8 +17,8 @@
+ $(null)
+
+
+-gtest_sources := $(GTEST_SRCDIR)/gtest/gtest-all.cc \
+- $(GTEST_SRCDIR)/gtest/gtest_main.cc \
++gtest_sources := $(GTEST_SRCDIR)/src/gtest-all.cc \
++ $(GTEST_SRCDIR)/src/gtest_main.cc \
+ $(null)
+
+ test_sources := $(wildcard ${SRCDIR}/pbdata/*.cpp) \
+@@ -43,7 +43,7 @@
+ paths := alignment alignment/files alignment/datastructures/alignment alignment/utils alignment/format \
+ pbdata pbdata/utils pbdata/metagenome pbdata/saf pbdata/reads pbdata/qvs \
+ hdf
+-paths := $(patsubst %,${SRCDIR}%,${paths}) ${GTEST_SRCDIR}/gtest
++paths := $(patsubst %,${SRCDIR}%,${paths}) ${GTEST_SRCDIR}/src
+ sources := $(gtest_sources) $(test_sources)
+ sources := $(notdir ${sources})
+ objects := $(patsubst %.cc,%.o,$(filter %.cc,$(sources))) \
+@@ -55,6 +55,7 @@
+ INCLUDES+= \
+ ${SRCDIR} \
+ $(GTEST_INC) \
++ $(GTEST_SRCDIR) \
+ $(LIBBLASR_INC) \
+ $(LIBPBIHDF_INC) \
+ $(LIBPBDATA_INC) \
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f9d5b71
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+external-gtest.patch
+exclude-pbbam.patch
diff --git a/debian/rules b/debian/rules
index 4044b66..9cfc77d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,8 @@ include /usr/share/dpkg/default.mk
export NOPBBAM = 1
export HDF5_INC = /usr/include/hdf5/serial
export HDF5_LIB = /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
+export GTEST_INC = /usr/include
+export GTEST_SRCDIR = /usr/src/gtest
%:
dh $@ --parallel
@@ -15,6 +17,11 @@ export HDF5_LIB = /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
override_dh_auto_configure:
./configure.py PREFIX=/usr/
+override_dh_auto_test:
+# Ignore the return code because some tests
+# require data that is not available in the source distribution.
+ -$(MAKE) -k gtest
+
override_dh_auto_install:
mkdir -p debian/libpbdata-dev/usr/include/pbdata
cp -r pbdata/* debian/libpbdata-dev/usr/include/pbdata
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/pbseqlib.git
More information about the debian-med-commit
mailing list