summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2016-03-03 13:30:30 -0600
committerRyan Harper <ryan.harper@canonical.com>2016-03-03 13:30:30 -0600
commit9a3a490fadc5b61e0fa14cde2d4f79164115ae25 (patch)
treeee3f7feca77769634ff00d62ef3fb85cbd49d1af /Makefile
parent568d15d7fb239e609fb70cc7c7a08205e640bf25 (diff)
downloadvyos-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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
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