[pkg-perl-tools] 01/01: p…-p…-a…/b…-d….d/smoke: Support individual lists of tests like t/*/*.t

Axel Beckert abe at deuxchevaux.org
Thu Apr 21 19:46:22 UTC 2016


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

abe pushed a commit to branch master
in repository pkg-perl-tools.

commit a4767a81821fec73688058484ce0cbab46fa21b0
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Thu Apr 21 21:42:09 2016 +0200

    p…-p…-a…/b…-d….d/smoke: Support individual lists of tests like t/*/*.t
---
 autopkgtest/README.autopkgtest         | 7 +++++++
 autopkgtest/scripts/build-deps.d/smoke | 6 +++++-
 debian/changelog                       | 8 ++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/autopkgtest/README.autopkgtest b/autopkgtest/README.autopkgtest
index ba8f2dc..5e12b91 100644
--- a/autopkgtest/README.autopkgtest
+++ b/autopkgtest/README.autopkgtest
@@ -51,6 +51,13 @@ The environment variables AUTOMATED_TESTING=1 and NONINTERACTIVE_TESTING=1
 are set by default for the smoke test. You can override these and add
 others in 'debian/tests/pkg-perl/smoke-env'.
 
+In case your module doesn't have all its ".t" files directly under
+"t/" (i.e. if prove should run something else than "t/*.t", you can
+use 'debian/tests/pkg-perl/smoke-tests' to declare which files should
+be used instead of "t/*.t". Example from libdevel-cover-perl:
+
+  t/*/*.t
+
 If the file 'debian/tests/pkg-perl/smoke-setup' exists and is executable,
 it will be executed right before running the tests, with the working
 directory set to the package source and $TDIR set to the test running
diff --git a/autopkgtest/scripts/build-deps.d/smoke b/autopkgtest/scripts/build-deps.d/smoke
index 58c3954..dec96dc 100755
--- a/autopkgtest/scripts/build-deps.d/smoke
+++ b/autopkgtest/scripts/build-deps.d/smoke
@@ -110,6 +110,10 @@ if [ ! -e $TDIR/MANIFEST.SKIP ]; then
     cp /dev/null $TDIR/MANIFEST.SKIP
 fi
 
+if [ -r debian/tests/pkg-perl/smoke-tests ]; then
+    test_targets=$(eval ls -d $(cat debian/tests/pkg-perl/smoke-tests) 2>/dev/null || true)
+fi
+
 # this is intended to be a last resort, please use it responsibly
 setup_file=debian/tests/pkg-perl/smoke-setup
 if [ -x $setup_file ]
@@ -126,7 +130,7 @@ else
     XVFB=
 fi
 
-if [ -d t ]; then test_targets=$(ls -d t/*.t 2>/dev/null || true); fi
+if [ -z "$test_targets" ] && [ -d t ]; then test_targets=$(ls -d t/*.t 2>/dev/null || true); fi
 
 if [ ! -n "$test_targets" ]; then
     echo 'Nothing to prove, skipping.'
diff --git a/debian/changelog b/debian/changelog
index b537fc5..0e3d240 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pkg-perl-tools (0.29) UNRELEASED; urgency=medium
+
+  * pkg-perl-autopkgtest/build-deps.d/smoke now also supports
+    debian/tests/pkg-perl/smoke-tests to list which tests should be run by
+    prove instead of the default "t/*.t".
+
+ -- Axel Beckert <abe at debian.org>  Thu, 21 Apr 2016 21:28:13 +0200
+
 pkg-perl-tools (0.28) unstable; urgency=medium
 
   [ Salvatore Bonaccorso ]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git



More information about the Pkg-perl-cvs-commits mailing list