[pkg-perl-tools] 01/01: autopkgtest/smoke: try to discover the module tests from EU::MM Makefiles
ntyni at debian.org
ntyni at debian.org
Thu Aug 3 17:20:17 UTC 2017
This is an automated email from the git hooks/post-receive script.
ntyni pushed a commit to branch ntyni/autopkgtest-smoke-list
in repository pkg-perl-tools.
commit a40524732a6967fc64030e51b00f4998b137208a
Author: Niko Tyni <ntyni at debian.org>
Date: Thu Aug 3 19:29:45 2017 +0300
autopkgtest/smoke: try to discover the module tests from EU::MM Makefiles
This can be prevented altogether by including a
debian/tests/pkg-perl/smoke-tests file.
Closes: #870334
TODO: is this too intrusive? some packages (cf. libbest-perl) generate
tests when running Makefile.PL so we'd probably need to do this before
copying the tests?
---
autopkgtest/README.autopkgtest | 7 ++++---
autopkgtest/scripts/build-deps.d/smoke | 5 +++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/autopkgtest/README.autopkgtest b/autopkgtest/README.autopkgtest
index c09bfb0..9e7a749 100644
--- a/autopkgtest/README.autopkgtest
+++ b/autopkgtest/README.autopkgtest
@@ -62,9 +62,10 @@ are set by default for the smoke test. You can override these and add
others in 'debian/tests/pkg-perl/smoke-env'.
You can use 'debian/tests/pkg-perl/smoke-tests' to declare which files should
-be used instead of all *.t files under t/. (Prior to version 0.37 only
-the tests in the first directory level under t/ were used, but nowadays
-prove is invoked with the --recurse option.)
+be used. The default list of smoke tests has varied across versions;
+currently some effort is made with ExtUtils::MakeMaker based distributions
+to extract the list of build time tests, and if that doesn't work,
+the fallback is to invoke prove with the --recurse option.
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
diff --git a/autopkgtest/scripts/build-deps.d/smoke b/autopkgtest/scripts/build-deps.d/smoke
index e64ed21..b660a92 100755
--- a/autopkgtest/scripts/build-deps.d/smoke
+++ b/autopkgtest/scripts/build-deps.d/smoke
@@ -141,6 +141,11 @@ then
fi
tests_file=$(pwd)/debian/tests/pkg-perl/smoke-tests
+
+if [ ! -r $tests_file ] && [ -f Makefile.PL ] && perl -I. Makefile.PL ]; then
+ test_targets=$(make -n -p | sed -n 's/^TEST_FILES = //p')
+fi
+
cd $TDIR
if [ -r $tests_file ]; then
test_targets=$(eval ls -d $(egrep -v '^#' $tests_file) 2>/dev/null || true)
--
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