[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DEP-8/autopkgtest



On Thu, Dec 26, 2013 at 07:27:50PM +0100, gregor herrmann wrote:

> Yesterday's upload of autopkgtest (2.5.5) has the following
> improvement, which should make it quite easy (yes, really :)) for us:
> 
> |  * Add support for virtual "@builddeps@" test dependency, which will be
> |    replaced with the package's B-D and B-D-I. Document in
> |    doc/README.package-tests. (Closes: #720458)

That's good news indeed.

I share the concerns in that bug about this masking errors in runtime
dependencies. It would be useful if we had a way to distinguish "real"
build dependencies from the test suite requirements. This would probably
benefit cross builders as well. 

The build profiles thing (<https://wiki.debian.org/BuildProfileSpec>)
seems related, although that currently seems to take the opposite
approach of separately listing dependencies for "notest" builds.

> # add file debian/tests/regression:
> 
> #!/bin/sh
> 
> prove --verbose t/*.t

(with --recurse as noted later.)

Yeah, I'm not aware of anything more generic. I wonder how many test
suites will want to write log files or the like under the source tree.
I guess we'll find out. I see there's a 'rw-build-tree' Restriction
available that could accommodate such test suites.

Another standard test could be just a 'use Foo::Bar' test without the
build-deps installed. This would catch obvious runtime dependency errors.
I suppose a generic script would have to get the module name from the
source tree, perhaps by parsing META.yml. 

Hm, maybe running 'perl -wc' on all the .pm files could be useful too.

Would it be worthwile to externalize a generic test runner into a separate
binary package (say pkg-perl-autopkgtest)? That way we wouldn't end up
having to update every package if we want to change something later.
Something like

 debian/tests/pkg-perl:
 #!/bin/sh
 for runner in /usr/share/pkg-perl-autopkgtest/runners/*
 do
     $runner
 done

with e.g. /usr/share/pkg-perl-autopkgtest/runners/prove containing the
'prove -v' snippet? 

(A downside is that all of those would share the same autopkgtest
test attributes, which suggests expanding this even more into
something like debian/tests/pkg-perl-with-build-depends and
debian/tests/pkg-perl-without-build-depends. I suspect I'm
overengineering this badly and will stop now.)
-- 
Niko Tyni   ntyni@debian.org


Reply to: