Bug#870654: autopkgtest: Please add trivial example to documentation

Martin Pitt mpitt at debian.org
Thu Aug 10 10:57:57 UTC 2017


Control: tag -1 pending

Hello Christoph,

Christoph Biedl [2017-08-03 21:56 +0200]:
> a while ago, lintian started suggesting adding a test suite declaration
> like autopkgtest to my packages. Howwever, autopkgtest's existing
> documentation gave me a hard time trying to understand the basic
> operation. To put it perhaps a bit too harsh, it feels like the first
> three chapters are missing, the chapters that provide the fundamental
> information which is so obvious to the creators forgot it might be an
> issue. Happens all the time.

Heh, sorry about that. I actually think that the "Overview" in
README.package-tests isn't too bad, but indeed some simple examples can't hurt.

> So I'm asking to provide a trivial, as simple as possible, "Hello,
> world"-ish  example on how to autopkgtest a package. Mostly to provide
> autopkgtest newcomers a feeling on how it looks, and to check whether
> the setup is otherwise working.

Added these, together with a slight clarification what the control file does:

  https://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/commit/?id=28c68d789c

> Add "Testsuite: autopkgtest" to debian/control, as already documented.

This isn't necessary any more, I updated the docs:

  https://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/commit/?id=f81861993

> Then create debian/tests/control with the following content:
> 
> | Depends: @

This is the default, so it's not even necessary to specify this.

> | Test-Command: /bin/true

I would not encourage using full paths here, but rely on a sane $PATH instead.
I wrote the examples above accordingly.

> This works and should, if I understood correctly, basically test the
> installability of the binary package. The Test-Command might be as well
> call the program shipped in my package, perhaps calling the --help
> option. Make sure it exits zero though.

Right.

Thanks,

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20170810/d216fab1/attachment.sig>


More information about the autopkgtest-devel mailing list