[buildd-tools-devel] Bug#824935: sbuild: better support for running autopkgtests

Johannes Schauer josch at debian.org
Tue Aug 2 11:26:03 UTC 2016


Control: tag -1 + pending patch

Hi Sean,

CC-ing Martin Pitt to get this right.

On Wed, 8 Jun 2016 15:13:58 +0900 Sean Whitton <spwhitton at spwhitton.name> wrote:
> So the problem is to come up with a sensible default set of options to pass
> to adt-run that will Just Work?  This should work without any schroot:
> 
>     adt-run --changes foo.changes --- null
> 
> Someone who *does* have a schroot will want to override this default to
> use their schroot: in my experience, the null test is useful but it
> doesn't catch some failures such as missing test dependencies.
> 
> So we also need --adt-run-opts.  The user will want to use %a in this,
> and ideally a percent escape sequence representing the
> suite/distribution -- this would also be useful in $piuparts_opts but I
> don't believe it is currently supported.
> 
> If we assume that sbuild implicitly passes the changes file to adt-run
> as it currently does with lintian and piuparts, I could have
> 
>     $adt_run_opts = [ '---', 'schroot', '%D-%a-sbuild'];
> 
> where %D is my imagined escape sequence giving the distribution.  If I
> need to do a build for a distribution that I don't have a schroot
> prepared for, I could use `--no-run-adt-run --no-run-piuparts` to disable
> those steps.

I now have a local patch that adds autopkgtest support in the same way that
piuparts support is added. But if I understand the changelog entry for version
4.0 correctly, then I should now use the autopkgtest binary instead of adt-run
and use '--' instead of '---'. Is that correct? Somehow the autopkgtest man
page still talks about '---' in the synopsis.

The default is now to run:

sudo -- autopkgtest foobar.changes -- null

Should the default be to run autopkgtest with sudo in front?

The '--autopkgtest-opts' command line option allows one to replace the '--
null' part in the example above with custom options. Implementing percentage
escapes will come at a later point if required. Please open a separate bug for
that and then I can also implement that for piuparts.

The 'autopkgtest-root-args' command line option allows one to replace the 'sudo
--' part in the example above.

Does this sound sensible as an initial implementation?

Patch attached.

Thanks!

cheers, josch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-feature-to-run-autopkgtest-after-a-successful-bu.patch
Type: text/x-diff
Size: 10496 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20160802/929c7e90/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20160802/929c7e90/attachment.sig>


More information about the Buildd-tools-devel mailing list