DEP8 tests using the built package source
mpitt at debian.org
Tue Mar 18 11:08:02 UTC 2014
Jakub Wilk [2014-03-18 11:37 +0100]:
> What I've been doing to my packages, is to copy all the bits
> necessary to run tests from the package directory to $ADTTMP, then
> chdir to $ADTTMP, and run tests from there. This greatly mitigates
> the risk of accidentally testing against not-installed code.
That's a nice approach indeed.
> But the alternative of building the required bits inside the tests
> itself is not appealing either, because to do that you would
> typically need to add stuff to Depends.
> It would be great if there was a way to tell the test runner to run
> a dedicated debian/rules target (say, "debian/rules adt-prepare"),
> instead of doing full-blown build.
It's not too complicated to do that with the current specs: add
@builddeps@ to debian/tests/control's Depends: and just call
"debian/rules build-tests" (or whichever target you have) in
autopkgtest calls dpkg-buildpackage to do the actual package build, so
for adding this to autopkgtest explicitly, we could add a flag for
that and call dpkg-buildpackage --target.
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the autopkgtest-devel