tox is not terribly useful
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-
That script is what runs in c-i.
Perhaps tox.ini should just be dropped.
Related branches
- Scott Moser (community): Needs Fixing
- Server Team CI bot: Approve (continuous-integration)
- Joshua Powers: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 138 lines (+80/-15)2 files modifieddev/null (+0/-8)
snap-wrappers/wrappers/git-ubuntu-self-test (+80/-7)
Changed in usd-importer: | |
status: | New → Confirmed |
importance: | Undecided → Low |
status: | Confirmed → In Progress |
assignee: | nobody → Scott Moser (smoser) |
Changed in usd-importer: | |
status: | In Progress → Triaged |
assignee: | Scott Moser (smoser) → nobody |
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 -test no longer works since it
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
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/CanonicalLt d/server- jenkins- jobs/commit/ c274cdeeae01123 9d43bf0f0614d49 62e2fc1512# diff-34ec321857 1d21188aa4d4c16 3d$ /github. com/CanonicalLt d/server- jenkins- jobs/commit/ 48941f90af34015 6a1cd423c9779d0 a03dd2d458# diff-34ec321857 1d21188aa4d4c16 3d$
2: https:/