tox is not terribly useful

Bug #1801748 reported by Scott Moser on 2018-11-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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
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

Scott Moser (smoser) on 2018-11-06
Changed in usd-importer:
status: New → Confirmed
importance: Undecided → Low
status: Confirmed → In Progress
assignee: nobody → Scott Moser (smoser)
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 already. To avoid
    future confusion, just drop these two old bits.


Robie Basak (racb) on 2020-03-24
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  Edit
Everyone can see this information.

Other bug subscribers