From 9a3a490fadc5b61e0fa14cde2d4f79164115ae25 Mon Sep 17 00:00:00 2001 From: Ryan Harper Date: Thu, 3 Mar 2016 13:30:30 -0600 Subject: Makefile: add make check target to run pep8, pyflakes, unittests Run a check of pep8, pyflakes (py27), pyflakes3 (py34), and use nosetest and nosetest3 to run unittests. We should pass all of these. --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index bb0c5253..058ac199 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ YAML_FILES+=$(shell find doc/examples -name "cloud-config*.txt" -type f ) CHANGELOG_VERSION=$(shell $(CWD)/tools/read-version) CODE_VERSION=$(shell python -c "from cloudinit import version; print version.version_string()") +noseopts ?= -vv --nologcapture PIP_INSTALL := pip install @@ -16,12 +17,21 @@ endif all: test check_version +check: pep8 pyflakes pyflakes3 unittest + pep8: @$(CWD)/tools/run-pep8 $(PY_FILES) +pyflakes: + @$(CWD)/tools/tox-venv py27 pyflakes $(PY_FILES) + pyflakes: @$(CWD)/tools/tox-venv py34 pyflakes $(PY_FILES) +unittest: + nosetests $(noseopts) tests/unittests + nosetests3 $(noseopts) tests/unittests + pip-requirements: @echo "Installing cloud-init dependencies..." $(PIP_INSTALL) -r "$@.txt" -q -- cgit v1.2.3