[med-svn] [pbbarcode] 01/08: Reorganise autopkgtest to make it a user example at the same time (which enables tracking down test suite issues more easily at the same time)

Andreas Tille tille at debian.org
Sun Jan 15 11:19:12 UTC 2017


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

tille pushed a commit to branch master
in repository pbbarcode.

commit 11e9f00cc6a457d31143b454014d2b2e5a05f0e5
Author: Andreas Tille <tille at debian.org>
Date:   Sun Jan 15 11:57:33 2017 +0100

    Reorganise autopkgtest to make it a user example at the same time (which enables tracking down test suite issues more easily at the same time)
---
 debian/README.test         |  8 ++++++++
 debian/changelog           |  7 +++++++
 debian/docs                |  4 ++++
 debian/rules               |  4 ++++
 debian/tests/control       |  3 +--
 debian/tests/run-unit-test | 17 +++++++++++++++++
 6 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..ef34ccc
--- /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 run-unit-test
+
+in this directory.
diff --git a/debian/changelog b/debian/changelog
index 382b41c..4a947e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+pbbarcode (0.8.0-3) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Reorganise autopkgtest to make it a user example at the same time
+
+ -- Andreas Tille <tille at debian.org>  Sun, 15 Jan 2017 11:24:27 +0100
+
 pbbarcode (0.8.0-2) unstable; urgency=low
 
   * Update build/test-dependency for pbh5tools
diff --git a/debian/docs b/debian/docs
index a1320b1..5574937 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1 +1,5 @@
 README.rst
+etc
+tests
+debian/tests/run-unit-test
+debian/README.test
diff --git a/debian/rules b/debian/rules
index 10a1350..ecfea24 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,3 +20,7 @@ override_dh_install:
 	doc/PbbarcodeFunctionalSpecification.rst \
 	> debian/$(DEB_SOURCE)/usr/share/man/man1/pbbarcode.1
 	dh_install
+
+override_dh_installdocs:
+	dh_installdocs
+	find debian -name "*.pyc" -delete
diff --git a/debian/tests/control b/debian/tests/control
index a726f03..bbcacd3 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,5 +1,4 @@
-Test-Command:
-	cp -r Makefile etc tests $ADTTMP && cd $ADTTMP && make test
+Tests: run-unit-test
 Depends:
 	@,
 	make,
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..3d6203a
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+pkg=pbbarcode
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+  trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${pkg}/etc $ADTTMP
+cp -a /usr/share/doc/${pkg}/tests $ADTTMP
+
+cd $ADTTMP
+find . -name "*.gz" -exec gunzip \{\} \;
+
+find tests -name "*.py" | xargs nosetests
+find tests/cram -name "*.t" | grep -v consensus.t | xargs cram --verbose

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



More information about the debian-med-commit mailing list