From c5e6b1d277af2ef8b28e9f38b6d4d956f46bfa92 Mon Sep 17 00:00:00 2001 From: Billy Olsen Date: Tue, 15 Mar 2016 20:09:03 -0700 Subject: [PATCH] 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: I32c2829af2a44e25c429bb603098a1249d415356 --- Makefile | 7 ++----- tox.ini | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index bd801215..1dc09f78 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,11 @@ PYTHON := /usr/bin/env python lint: - @flake8 --exclude hooks/charmhelpers,tests/charmhelpers \ - actions hooks unit_tests tests - @charm proof + @tox -e pep8 test: - @# Bundletester expects unit tests here. @echo Starting unit tests... - @$(PYTHON) /usr/bin/nosetests -v --nologcapture --with-coverage unit_tests + @tox -e py27 functional_test: @echo Starting Amulet tests... diff --git a/tox.ini b/tox.ini index 75fbf463..8278f3dc 100644 --- a/tox.ini +++ b/tox.ini @@ -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