Martin Pitt <mp...@debian.org> writes:

> Thanks to Matthias for pointing this out to me. I try to reply
> in-thread. Please keep CC:ing me as I'm not subscribed.

Done.

> > The goal is to perform a simple “smoke test” to verify the correct
> > installation of the Python libraries from the Debian packages, for all
> > relevant Python interpreters.
> > 
> > A secondary goal is to have the actual smoke test code be re-usable,
> > possibly incorporated into a standard Debian Python packager toolkit.
>
> Very nice! There's precedent for Perl, Ruby and DKMS packages which
> have a fairly standard way to run the upstream test suite. For Python
> there are some conventions, like "./setup.py test" or running
> nosetests, maybe it's worth experimenting with those after getting the
> initial "import works" smoketest in place.

I'll limit this work to just a smoke test, whatever that comes to mean
through consensus here.

As discussed elsewhere in this thread, I think running upstream's test
suite is beyond the scope of this simple smoke test. The autopkgtest
framework will allow adding more tests if someone else wants to add
them.

> The "generate" script [from ‘autodep8’] could iterate over all binary
> packages of the source and pick out the python-* or the python3-*
> ones, respectively.

Thanks, I will look into that.

> >   These scripts are very simple, but not simple enough that I was
> >   comfortable stuffing them directly into the ‘debian/tests/control’
> >   file. Is that a shortcoming of the Autopkgtest specification?
>
> Not sure what you mean with "shortcoming", you can put arbitrary shell
> code into Test-Command:.

It becomes very messy when there are more than a line or so; and the
test becomes anonymous in the build output.

That led me to add the extra indirection layer of some simple named
programs; but I'd prefer if that indirection layer could be removed
while keeping the test names and clean look of the code.

> That seems like an excellent starting point indeed.

Thanks for the positive feedback.

This belongs IMO in an existing “build Debian packages for Python” tool.
As it stands, I'll need to manually add a bundle of files to every
Python package I maintain.

Who can recommend a way to make this a more automated part of the Debian
Python package build workflow?

-- 
 \       “I have always wished for my computer to be as easy to use as |
  `\       my telephone; my wish has come true because I can no longer |
_o__)          figure out how to use my telephone.” —Bjarne Stroustrup |
Ben Finney

Reply via email to