[med-svn] [falcon] 01/02: Enable running autopkgtest as user example as well
Andreas Tille
tille at debian.org
Wed Jan 18 13:16:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository falcon.
commit d0fe8310ca01137848666b4f3ff3e5f886ee49d7
Author: Andreas Tille <tille at debian.org>
Date: Wed Jan 18 14:10:43 2017 +0100
Enable running autopkgtest as user example as well
---
debian/README.test | 8 ++++++++
debian/changelog | 4 ++++
debian/docs | 2 ++
debian/examples | 1 +
debian/rules | 7 +++++++
debian/tests/control | 16 ++--------------
debian/tests/run-unit-test | 18 ++++++++++++++++++
7 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..55a9142
--- /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 391126d..8875110 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,15 @@
falcon (1.8.6-1) UNRELEASED; urgency=medium
+ [ Afif Elghraoui ]
* Remove Files-Excluded line
* Imported Upstream version 1.8.6
* New dependencies: rsync, time
* Update patches
* Remove copyright statements for removed sources
+ [ Andreas Tille ]
+ * Enable running autopkgtest as user example as well
+
-- Afif Elghraoui <afif at debian.org> Sun, 11 Dec 2016 14:45:07 -0800
falcon (1.8.4-1) unstable; urgency=medium
diff --git a/debian/docs b/debian/docs
index e69de29..9a4f4f8 100644
--- a/debian/docs
+++ b/debian/docs
@@ -0,0 +1,2 @@
+debian/README.test
+debian/tests/run-unit-test
diff --git a/debian/examples b/debian/examples
index 2e59d9d..e63e22a 100644
--- a/debian/examples
+++ b/debian/examples
@@ -1 +1,2 @@
FALCON-examples/*
+FALCON/test*
diff --git a/debian/rules b/debian/rules
index bc0ed67..128d368 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,6 +35,13 @@ integration-tests:
override_dh_install:
dh_install -XLICENSE
+override_dh_installexamples:
+ dh_installexamples
+ # delete byte code from test dirs that now end up in /usr/share/doc/falcon/examples
+ find debian -name "*.pyc" -delete
+ find debian -name "*.fofn" -exec chmod -x \{\} \;
+ find debian -name "*.cfg" -exec chmod -x \{\} \;
+
override_dh_auto_clean:
dh_auto_clean
$(RM) -r $(FALCON_PREFIX)
diff --git a/debian/tests/control b/debian/tests/control
index 916ebd0..7f5fc17 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,15 +1,3 @@
-Test-Command:
- export PYTHONPATH=/usr/lib/falcon/pylib;
- cp -r FALCON/test FALCON/test_data $ADTTMP
- && cd $ADTTMP
- && nosetests -v test/
-Depends: @, python-nose
-Restrictions: allow-stderr
-
-Test-Command:
- cp -r /usr/share/doc/falcon/examples/* $ADTTMP
- && cd $ADTTMP;
- find -name "*.gz" -exec gunzip {} +;
- make full-test
-Depends: @, make
+Tests: run-unit-test
+Depends: @, python-nose, make
Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..01581a9
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+pkg=falcon
+
+if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+ trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd $ADTTMP
+
+cp -a /usr/share/doc/${pkg}/examples/* .
+ find -name "*.gz" -exec gunzip {} +;
+
+export PYTHONPATH=/usr/lib/falcon/pylib;
+nosetests -v test/
+
+make full-test
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/falcon.git
More information about the debian-med-commit
mailing list