aboutsummaryrefslogtreecommitdiffstats
path: root/test/Makefile
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-01-17 10:37:05 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-01-17 18:35:21 +0000
commit72715ee4e2bba6fd4ce5c077bca68bb08ac729a0 (patch)
tree0d12a2ab578ec74b4f76bd6e407f948b46a4628c /test/Makefile
parent46f133d522b0f247f3b395ad39a12f6898cb67eb (diff)
make test: add checkstyle target
Change-Id: I59d3c3bc77474c96e1d6fa51811c1b13fb9a6c5b Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
index 543fe913..db64ad93 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -77,6 +77,20 @@ cov: wipe-cov reset verify-python-path $(PAPI_INSTALL_DONE)
wipe-cov: wipe
@rm -rf $(BUILD_COV_DIR)
+.PHONY: checkstyle
+checkstyle: verify-python-path
+ @virtualenv $(PYTHON_VENV_PATH) -p python2.7
+ @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install $(PYTHON_DEPENDS) pep8"
+ @bash -c "source $(PYTHON_VENV_PATH)/bin/activate &&\
+ pep8 --show-source -v $(WS_ROOT)/test/*.py ||\
+ (echo \"*******************************************************************\" &&\
+ echo \"* Test framework PEP8 compliance check FAILED \" &&\
+ echo \"*******************************************************************\" &&\
+ false)"
+ @echo "*******************************************************************"
+ @echo "* Test framework PEP8 compliance check passed"
+ @echo "*******************************************************************"
+
help:
@echo "Running tests:"
@echo ""
@@ -106,3 +120,6 @@ help:
@echo " test-cov - generate code coverage report for test framework"
@echo " test-wipe-cov - wipe code coverage report for test framework"
@echo ""
+ @echo "Verifying code-style"
+ @echo " test-checkstyle - check PEP8 compliance"
+ @echo ""