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

Bug#749242: integration with debuild to run autopkgtest tests after build



On Mon, Jun 02, 2014 at 12:08:01PM +0200, Martin Pitt wrote:
> Jelmer Vernooij [2014-05-25 17:25 +0200]:
> > I realize this is kind of hand-wavy, and it likely requires changes to
> > debuild, but it would be great if it was possible to automatically run
> > the DEP-8 tests after a package build, much like is currently done for
> > lintian.
> 
> This is already kind of possible with debuild's hooks. E. g. you can put that
> into ~/.devscripts:
> 
>   DEBUILD_POST_DPKG_BUILDPACKAGE_HOOK="adt-run %p_%s.dsc --- null"
> 
> I figure this won't be a very popular option as running tests for
> every single debuild invocation would be a rather awful time sink and
> make developers rather angry :)
> 
> Writing the hook might be easier if there were some more macros such
> as the path to the directory that debuild was invoked in (as it
> changes directory to ..), the destination release, etc. For these I
> think this bug should be reassigned to devscripts.
> 
> But TBH I think it would make more sense to integrate this into
> sbuild. With that you already have an appropriate testbed (and know
> the target release etc.), and sbuild has really flexible hooks. The
> main question is how to tell sbuild to run the tests or not which
> should be as simple as possible; e. g. one could run a package build
> in schrootname-test and write the hook so that it only invokes adt-run
> in *-test schroots.
> 
> But this depends on some more specific description when you'd like to
> run autopkgtest. Personally I just tend to manually call adt-run
> before an upload, and not after each test build.
Perhaps it helps if I explain my workflow a little bit.

Generally when I hack on packages I build using git-buildpackage, directly
invoking debuild or using ./debian/rules. 

When I am happy, I do a final build using pbuilder (and experimenting with
sbuild). Here I would like to run as many sanity checks (like piuparts,
lintian - and autopkgtest) as possible. This is the build I eventually upload.

I realize it is possible to use debuild hooks; I can also write my own wrapper
for sbuild that would take care of all of this. It'd be nice if there was
something more discoverable.

Cheers,

Jelmer



Reply to: