Fix tox tests in an sbuild chroot

Bug #1195420 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu system image
Fix Released
High
Barry Warsaw

Bug Description

Currently the tests are disabled in debian/rules. This is because the test suite uses tox, and by default tox puts its virtualenvs inside of $HOME/.tox. In an sbuild $HOME is set to /sbuild-nonexistent so tox can't even set things up.

I actually think this is counter to tox's own documentation, which states that:

[tox]
minversion=ver # minimally required tox version
toxworkdir=path # tox working directory, defaults to {toxinidir}/.tox
setupdir=path # defaults to {toxinidir}
distdir=path # defaults to {toxworkdir}/dist
distshare=path # defaults to {homedir}/.tox/distshare
envlist=ENVLIST # defaults to the list of all environments

Notice that toxworkdir says {toxinidir}/.tox and of course in an sbuild the directory containing tox.ini is /root/package-blah/package_blah so this *should* work.

The options are:

 * See if tox 1.5 fixes this
 * Try to set a not unreasonable $HOME for the test invocation
 * Don't run the tests
 * Create a tox.ini environment setting toxinidir to something reasonable
 * Run the tests differently in sbuild (click-package does this - it uses tox but also plain unittest in the setup.py, probably specifically for this reason).

Tags: client
Barry Warsaw (barry)
Changed in ubuntu-system-image:
status: New → Triaged
importance: Undecided → High
milestone: none → 0.3
Barry Warsaw (barry)
Changed in ubuntu-system-image:
milestone: 0.3 → 0.4
Barry Warsaw (barry)
Changed in ubuntu-system-image:
milestone: 0.4 → 0.5
Revision history for this message
Barry Warsaw (barry) wrote :
Barry Warsaw (barry)
Changed in ubuntu-system-image:
assignee: nobody → Barry Warsaw (barry)
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.