diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2016-03-03 13:30:30 -0600 |
---|---|---|
committer | Ryan Harper <ryan.harper@canonical.com> | 2016-03-03 13:30:30 -0600 |
commit | 9a3a490fadc5b61e0fa14cde2d4f79164115ae25 (patch) | |
tree | ee3f7feca77769634ff00d62ef3fb85cbd49d1af | |
parent | 568d15d7fb239e609fb70cc7c7a08205e640bf25 (diff) | |
download | vyos-cloud-init-9a3a490fadc5b61e0fa14cde2d4f79164115ae25.tar.gz vyos-cloud-init-9a3a490fadc5b61e0fa14cde2d4f79164115ae25.zip |
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.
-rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |