Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8229

Autopkgtest smoke test for Python libraries

From Ben Finney <ben+debian@benfinney.id.au>
Newsgroups linux.debian.maint.python
Subject Autopkgtest smoke test for Python libraries
Date 2016-02-24 10:40 +0100
Message-ID <r5E5j-2vC-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Howdy all,

I am experimenting with Autopkgtest[0] for Python library packages.
Perhaps others can use what I've made and/or make suggestions for
improvement.

The ‘python-lockfile’ Debian packaging VCS now has a smoke test suite
<URL:https://alioth.debian.org/scm/loggerhead/collab-maint/pkg-python-lockfile/trunk/files/head:/debian/tests/>.

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.

* debian/tests/control

  Specifies two tests to run, ‘smoke-python2’ and ‘smoke-python3’.

  The dependencies explicitly specify the Python 2 and Python 3 library
  modules respectively. Can this be automated better?

* debian/tests/smoke-python2, debian/tests/smoke-python3

  These are Bash programs that just run a Python module under every
  available Python interpreter.

  Running ‘py{,3}versions -i’ gets all the installed Python
  interpreters. Can this fail, e.g. can the set of interpreters be
  different from what interpreters the package was built for?

  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?

* debian/tests/smoke_test.py

  A module that runs a simple suite of smoke tests: emit the interpreter
  description, fetch the Python distribution of the installed library
  and emit that, import the modules and emit those.

  Implemented as a command-line program so that the distribution name,
  and the set of module names, are specified by the caller. This
  hopefully makes ‘smoke_test.py’ reuseable for many Python library
  packages.

  Does this module meet your idea of a simple “smoke test” for Python
  library packages? Should it do more?


Is there interest in getting this work into one of the Debian packaging
tookits for Python packages? How should that be done?


[0] Doesn't seem to have a coherent website or documentation index. Try
    <URL:http://packaging.ubuntu.com/html/auto-pkg-test.html>.

-- 
 \     “The Vatican is not a state.… a state must have territory. This |
  `\         is a palace with gardens, about as big as an average golf |
_o__)                         course.” —Geoffrey Robertson, 2010-09-18 |
Ben Finney

Back to linux.debian.maint.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Autopkgtest smoke test for Python libraries Ben Finney <ben+debian@benfinney.id.au> - 2016-02-24 10:40 +0100
  Re: Autopkgtest smoke test for Python libraries Martin Pitt <mpitt@debian.org> - 2016-03-01 09:20 +0100
    Re: Autopkgtest smoke test for Python libraries Barry Warsaw <barry@debian.org> - 2016-03-01 16:50 +0100
      Re: Autopkgtest smoke test for Python libraries Martin Pitt <mpitt@debian.org> - 2016-03-01 18:20 +0100
        Re: Autopkgtest smoke test for Python libraries Barry Warsaw <barry@debian.org> - 2016-03-01 18:30 +0100
    Re: Autopkgtest smoke test for Python libraries Ben Finney <ben+debian@benfinney.id.au> - 2016-03-02 00:20 +0100
      Re: Autopkgtest smoke test for Python libraries Yaroslav Halchenko <debian@onerussian.com> - 2016-03-02 04:20 +0100
        Re: Autopkgtest smoke test for Python libraries Ben Finney <ben+debian@benfinney.id.au> - 2016-03-02 04:40 +0100
      Re: Autopkgtest smoke test for Python libraries Paul Wise <pabs@debian.org> - 2016-03-02 04:20 +0100

csiph-web