[med-svn] [microbiomeutil] 01/02: Add autopkgtest

Andreas Tille tille at debian.org
Wed Jan 20 19:25:00 UTC 2016


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

tille pushed a commit to branch master
in repository microbiomeutil.

commit 4f0efaa7293db0b3e06fa763e62dd08044dbac80
Author: Andreas Tille <tille at debian.org>
Date:   Wed Jan 20 20:15:36 2016 +0100

    Add autopkgtest
---
 debian/README.test                 |  8 ++++++++
 debian/changelog                   |  1 +
 debian/chimeraslayer.links         |  3 ++-
 debian/microbiomeutil-data.docs    |  2 ++
 debian/microbiomeutil-data.install |  3 ++-
 debian/microbiomeutil.docs         |  4 ----
 debian/nast-ier.docs               |  1 +
 debian/nast-ier.links              |  3 ++-
 debian/rules                       |  6 +++---
 debian/tests/control               |  3 +++
 debian/tests/run-unit-test         | 12 ++++++++++++
 debian/wigeon.docs                 |  1 +
 debian/wigeon.links                |  5 +++--
 13 files changed, 40 insertions(+), 12 deletions(-)

diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..ea97658
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,8 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+To run the unit tests provided by the package you can do
+
+   sh examples/run-unit-test
+
+in this directory.
diff --git a/debian/changelog b/debian/changelog
index ce4a627..e03477c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ microbiomeutil (20101212+dfsg1-1) UNRELEASED; urgency=low
   * d/watch: add missing repacksuffix
   * Moved packaging from SVN to Git
   * Cleaning up log files from past test runs
+  * Add autopkgtest
 
  -- Andreas Tille <tille at debian.org>  Wed, 20 Jan 2016 09:10:18 +0100
 
diff --git a/debian/chimeraslayer.links b/debian/chimeraslayer.links
index f7fc051..a9c6819 100644
--- a/debian/chimeraslayer.links
+++ b/debian/chimeraslayer.links
@@ -1 +1,2 @@
-usr/lib/ChimeraSlayer/ChimeraSlayer.pl	usr/bin/chimeraslayer
+usr/lib/ChimeraSlayer/ChimeraSlayer.pl				usr/bin/chimeraslayer
+usr/share/doc/microbiomeutil-data/examples/ChimeraSlayer	usr/share/doc/chimeraslayer/examples
diff --git a/debian/microbiomeutil-data.docs b/debian/microbiomeutil-data.docs
new file mode 100644
index 0000000..b9b3f34
--- /dev/null
+++ b/debian/microbiomeutil-data.docs
@@ -0,0 +1,2 @@
+RESOURCES/README
+debian/README.test
diff --git a/debian/microbiomeutil-data.install b/debian/microbiomeutil-data.install
index 13c3ec4..18889f2 100644
--- a/debian/microbiomeutil-data.install
+++ b/debian/microbiomeutil-data.install
@@ -1 +1,2 @@
-RESOURCES			/usr/share/microbiomeutil-data
+RESOURCES			usr/share/microbiomeutil-data
+debian/tests/run-unit-test	usr/share/doc/microbiomeutil-data/examples
diff --git a/debian/microbiomeutil.docs b/debian/microbiomeutil.docs
index 399533a..d60fe81 100644
--- a/debian/microbiomeutil.docs
+++ b/debian/microbiomeutil.docs
@@ -1,6 +1,2 @@
 README
 docs
-# As a reminder for the separation of packages
-#NAST-iEr/README
-#RESOURCES/README
-#WigeoN/README
diff --git a/debian/nast-ier.docs b/debian/nast-ier.docs
new file mode 100644
index 0000000..2138469
--- /dev/null
+++ b/debian/nast-ier.docs
@@ -0,0 +1 @@
+NAST-iEr/README
diff --git a/debian/nast-ier.links b/debian/nast-ier.links
index 79bf005..242eef8 100644
--- a/debian/nast-ier.links
+++ b/debian/nast-ier.links
@@ -1 +1,2 @@
-usr/lib/NAST-iEr/run_NAST-iEr.pl	usr/bin/nast-ier
+usr/lib/NAST-iEr/run_NAST-iEr.pl			usr/bin/nast-ier
+usr/share/doc/microbiomeutil-data/examples/NAST-iEr	usr/share/doc/nast-ier/examples
diff --git a/debian/rules b/debian/rules
index b73c9da..7c740c1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,15 +41,15 @@ override_dh_installexamples:
 	dh_installexamples
 	for mod in ChimeraSlayer NAST-iEr WigeoN ; do \
 	    mkdir -p $(sampledir)/$${mod} ; \
-	    cp -a $${mod}/sample_data $(sampledir)/$${mod} ; \
+	    cp -a $${mod}/sample_data/* $(sampledir)/$${mod} ; \
 	    sed -i -e "s?../$${mod}?$${mod}?" \
 		   -e "s?^.*\(/util/show_malign_no_gap.pl\)?/usr/lib/NAST-iEr\1?" \
 		   -e "s?^.*\(/run_NAST-iEr.pl\)?/usr/lib/NAST-iEr\1?" \
 		   -e "s?^.*\(ChimeraSlayer.pl\)?/usr/lib/ChimeraSlayer/\1?" \
 		   -e "s?^.*\(/run_WigeoN.pl\)?/usr/lib/WigeoN\1?" \
-		 $(sampledir)/$${mod}/sample_data/runMe.sh ; \
+		 $(sampledir)/$${mod}/runMe.sh ; \
 	done
-	sed -i '1i #!/bin/sh' $(sampledir)/WigeoN/sample_data/runMe.sh
+	sed -i '1i #!/bin/sh' $(sampledir)/WigeoN/runMe.sh
 
 override_dh_fixperms :
 	dh_fixperms
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d2aa55a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..a2823c4
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+pkg=microbiomeutil-data
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/examples/* .
+find . -name "*.gz" -exec gunzip \{\} \;
+for runtest in `find . -mindepth 1 -maxdepth 1 -type d` ; do
+    cd $runtest && ./runMe.sh && cd ..
+done
diff --git a/debian/wigeon.docs b/debian/wigeon.docs
new file mode 100644
index 0000000..906ddaa
--- /dev/null
+++ b/debian/wigeon.docs
@@ -0,0 +1 @@
+WigeoN/README
diff --git a/debian/wigeon.links b/debian/wigeon.links
index 1f4f288..72bca55 100644
--- a/debian/wigeon.links
+++ b/debian/wigeon.links
@@ -1,2 +1,3 @@
-usr/lib/WigeoN/run_WigeoN.pl		usr/bin/wigeon
-usr/lib/WigeoN/run_CM_to_WigeoN.pl	usr/bin/cm_to_wigeon
+usr/lib/WigeoN/run_WigeoN.pl				usr/bin/wigeon
+usr/lib/WigeoN/run_CM_to_WigeoN.pl			usr/bin/cm_to_wigeon
+usr/share/doc/microbiomeutil-data/examples/WigeoN	usr/share/doc/wigeon/examples

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



More information about the debian-med-commit mailing list