~smoser/git-ubuntu:cleanup/tox-use-self-test

Last commit made on 2018-12-04
Get this branch:
git clone -b cleanup/tox-use-self-test https://git.launchpad.net/~smoser/git-ubuntu
Only Scott Moser can upload to this branch. If you are Scott Moser please log in for upload directions.

Branch merges

Branch information

Name:
cleanup/tox-use-self-test
Repository:
lp:~smoser/git-ubuntu

Recent commits

01432ef... by Scott Moser

Drop tox. Instead run tests on tree in snap environment.

The use of tox for git-ubuntu unit tests and pylint is problematic
for a number of reasons.
 - as with all virtualenv, any dependency that is not pure python
   requires compilation and non-virtualenv dependencies.
 - distro_info is not installable from pypi.
 - git-ubuntu is expected to run in the snap environment.

All of these issues are not a problem in the snap environment. The
solution here is to run the tests in an already-existing snap environment.
This does present a bit of a chicken-egg problem, but one that is only
exposed when we add new python dependencies to git-ubuntu.

git-ubuntu-self-test is modified to accept a TEST_TREE environment
variable and do the right thing in both snap environment and development
tree.

So now both of these work:
  # test the snap installed git-ubuntu libraries.
  $ git-ubuntu.self-test

  # test the tree in "."
  $ ./snap-wrappers/wrappers/git-ubuntu-self-test

Other things done here:
 a.) remove DEBEMAIL from environment to avoid bug 1801948.
 b.) remove tox.ini file
 c.) remove pylintrc in favor of running with explicit command line options.
     This is preferable as pylintrc is not available when
    'git-ubuntu.self-test' is run from the snap itself.
 d.) execute pylint with --jobs=0 , which selects 1 process per core.
 e.) use 'rm -f' rather than 'unlink' for removing pycoverage file.
 f.) place 'SNAP_REVISION' and 'SNAP_VERSION' into environment.
     these are just informative.

LP: #1801748
LP: #1801948

85bef3c... by Robie Basak

Friendlier self-test output

If we change directory to the location of the gitubuntu Python module
first, the commands to pylint and pytest are simpler and additionally
has the advantage that the output from pytest is nicer.

19d1144... by Robie Basak

Stop pinning pylint

The newest astroid (a dependency of pylint) doesn't work with the pinned
version of pylint, causing it to fail.

Instead, unpin pylint. This stops us falling behind on ancient pinned
versions of modules, and we can rely on CI to pick up problems nightly
as with this particular failure.

Since we can't easily unpin with a cached copy of pylint, install it
directly from PyPI as a "dependency" of git-ubuntu itself instead of as
a separate part.

6a1e203... by Robie Basak

pylint: ignore the py.path module

The latest pylint still doesn't play well with the use of py.path, but
differently, causing an ImportError at pylint time when there is no such
problem at runtime. Add it to the list of modules to ignore.

79812f9... by Robie Basak

Add lmdb to whitelist

7fb09ce... by Robie Basak

Sort ahasenack section of whitelist

affcec6... by Robie Basak

Add pgaudit to whitelist

a8da53d... by Robie Basak

Merge remote-tracking branch 'smoser/fix/1801168-build-when-no-patches'

9922d45... by Scott Moser

add test

476bfe0... by Scott Moser

build: Use ubuntu images for build unless image provided.

This is git-ubuntu. When selecting a container to build in, it should
try to run an ubuntu container.

If the codename is not known, a info level message will be written
indicating that the ubuntu-daily:devel will be used.

LP: #1727590