tox is not terribly useful

Bug #1801748 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-ubuntu
Triaged
Low
Unassigned

Bug Description

currently (d672edb0ed3ab) there are a few problems with running tox:
1. running 'tox' will fail.

The tox prepared environment will not have distro_info, so it will error like:
************* Module gitubuntu.build
E: 65, 0: Unable to import 'distro_info' (import-error)

distro_info is not installable via pip, you can only get it via package.

The simple fix to that is just to add 'distro_info' to 'ignored-modules' in .pylintrc.

That change will make pylint pass.

2. Running pylint is valuable, but we still cannot run tests in tox.

I looked a bit at getting a better answer to running tests in tox, but we have other cases where the dependencies used are not virtualenv fiendly
a.) no distro_info
b.) pygit2 is not pure python, and requires specific versions of libgit2-dev. That means that making it work in virtualenv/tox is not as sipmle as just installing libgit2-dev and build-essential.

I'm attaching a diff where I went down the road of trying to make 'tox' at least do something useful by running ./snap-wrappers/wrappers/git-ubuntu-self-test.

That script is what runs in c-i.

Perhaps tox.ini should just be dropped.

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Scott Moser (smoser)
Changed in usd-importer:
status: New → Confirmed
importance: Undecided → Low
status: Confirmed → In Progress
assignee: nobody → Scott Moser (smoser)
Revision history for this message
Bryce Harrington (bryce) wrote :

Since nothing is currently using the tox.ini in the repo, I've cleaned that up via the following commit. Sorry for the duplicate work, I didn't know about this branch.

There are some other useful sounding cleanups in Scott's branch worth looking at and applying before this bug is closable.

Author: Bryce Harrington <email address hidden>
Date: Tue Oct 29 23:07:59 2019 +0000

    Cleanup obsolete integration test code

    Prior to the introduction of git-ubuntu-self-test, bin/integration-test
    served as a testsuite runner, and tox was used for some style checks.
    These are no longer invoked in the jenkins runs[1,2] and thus are just
    vestigial now. In fact bin/integration-test no longer works since it
    calls `git-ubuntu` rather than `git ubuntu`; functionally it's just a
    smoke test like the one documented in the README.md already. To avoid
    future confusion, just drop these two old bits.

    1: https://github.com/CanonicalLtd/server-jenkins-jobs/commit/c274cdeeae011239d43bf0f0614d4962e2fc1512#diff-34ec3218571d21188aa4d4c163d$
    2: https://github.com/CanonicalLtd/server-jenkins-jobs/commit/48941f90af340156a1cd423c9779d0a03dd2d458#diff-34ec3218571d21188aa4d4c163d$

Robie Basak (racb)
Changed in usd-importer:
status: In Progress → Triaged
assignee: Scott Moser (smoser) → nobody
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.