[med-svn] [pbbam] 01/06: Update running of tests at build-time
Afif Elghraoui
afif at moszumanska.debian.org
Sun Jan 22 07:52:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
afif pushed a commit to branch master
in repository pbbam.
commit e4e096e336fe213a8768b6176d5a80510e6aa206
Author: Afif Elghraoui <afif at debian.org>
Date: Sat Jan 21 23:22:09 2017 -0800
Update running of tests at build-time
---
debian/control | 1 +
debian/rules | 22 +++++++++++++++++-----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/debian/control b/debian/control
index 0b0ed18..ae1443e 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends:
debhelper (>= 9),
dh-exec,
cmake,
+ python,
# swig3.0,
libboost-dev (>= 1.54),
zlib1g-dev,
diff --git a/debian/rules b/debian/rules
index 5c36f45..f3a1d7a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,9 +2,10 @@
#DH_VERBOSE = 1
export LC_ALL=C.UTF-8
-include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/default.mk
-export LD_LIBRARY_PATH:=$(CURDIR)/lib:$(LD_LIBRARY_PATH)
+DEB_VERSION_UPSTREAM := $(subst +ds,,$(DEB_VERSION_UPSTREAM))
+generated_data_dir = $(CURDIR)/gendata
%:
dh $@ --parallel
@@ -21,8 +22,13 @@ override_dh_auto_configure:
# -DPacBioBAM_wrap_python=ON \
# -DPacBioBAM_wrap_r=ON
-override_dh_auto_test: $(subst .t,.deb.t,$(wildcard tests/src/cram/pb*.t))
- TESTDIR=tests/src/cram cram -v $^
+override_dh_auto_test: $(subst .t.in,.deb.t,$(wildcard tests/src/cram/pb*.t.in))
+ mkdir -p $(generated_data_dir)
+ python tests/scripts/generate_data.py $(CURDIR)/tests/data $(generated_data_dir)
+ BINDIR=`find $$PWD -name bin -type d`; \
+ LIBDIR=`find $$PWD -name lib -type d`; \
+ PATH="$$BINDIR:$(PATH)" LD_LIBRARY_PATH="$$LIBDIR:$(LD_LIBRARY_PATH)" \
+ cram -v $^
override_dh_installchangelogs:
dh_installchangelogs CHANGELOG.md
@@ -30,11 +36,17 @@ override_dh_installchangelogs:
override_dh_auto_clean:
dh_auto_clean
find -name "*.deb.t" -delete
+ $(RM) -r $(generated_data_dir)
-%.deb.t: %.t
+%.deb.t: %.t.in
sed \
-e 's/$$BAM2SAM/samtools view/g' \
-e 's/\-\-header\-only/-H/g' \
-e 's/\-\-no\-header//g' \
+ -e 's|@PacBioBAM_BinDir@/||g' \
+ -e 's|$$TOOLS_BIN/||g' \
+ -e 's|@PacBioBAM_TestsDir@|$(CURDIR)/tests|g' \
+ -e 's|@PacBioBAM_VERSION@|$(DEB_VERSION_UPSTREAM)|g' \
+ -e 's|@GeneratedTestDataDir@|$(generated_data_dir)|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