Use tox in Makefile targets

Modify the Makefile to point at the appropriate tox targets
so that tox and Make output can be equivalent. This involves
mapping the lint target to the pep8 target and the test target
to the py27 target.

Update tox.ini to not use site-packages as the PyYAML installed
version conflicts with pip requirements.

Change-Id: I4c236be7fad1ce15b561832b1368ca2a789bc38a
This commit is contained in:
Billy Olsen 2016-03-15 20:09:37 -07:00
parent 2bc5d6e2f9
commit d2fbcdb809
2 changed files with 3 additions and 6 deletions

View File

@ -3,13 +3,11 @@ PYTHON := /usr/bin/env python
export PYTHONPATH := hooks
lint:
@flake8 --exclude hooks/charmhelpers,tests/charmhelpers \
actions hooks unit_tests tests
@charm proof
@tox -e pep8
test:
@# Bundletester expects unit tests here.
@$(PYTHON) /usr/bin/nosetests -v --nologcapture --with-coverage unit_tests
@echo Starting unit tests...
@tox -e py27
functional_test:
@echo Starting amulet tests...

View File

@ -8,7 +8,6 @@ setenv = VIRTUAL_ENV={envdir}
install_command =
pip install --allow-unverified python-apt {opts} {packages}
commands = ostestr {posargs}
sitepackages = True
[testenv:py27]
basepython = python2.7