VTL: Move doc generation and linting to python3. 93/16793/2
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Sun, 13 Jan 2019 18:36:17 +0000 (10:36 -0800)
committerDamjan Marion <dmarion@me.com>
Thu, 17 Jan 2019 17:28:04 +0000 (17:28 +0000)
* running linting/pycodestyle under python3 provides the additional benefit
  of access to the python3 AST.

Change-Id: I659dbd2733471285867be95eec078f7415aa0bcd
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
test/Makefile

index 8db3482..b605428 100644 (file)
@@ -204,8 +204,8 @@ wipe: reset
        @rm -f $(PAPI_INSTALL_FLAGS)
 
 doc: verify-test-dir $(PIP_PATCH_DONE)
-       @virtualenv $(VENV_PATH) -p $(PYTHON_INTERP)
-       @bash -c "source $(VENV_PATH)/bin/activate && $(PYTHON_INTERP) -m pip install sphinx sphinx-rtd-theme"
+       @virtualenv $(VENV_PATH) -p python3
+       @bash -c "source $(VENV_PATH)/bin/activate && python3 -m pip install sphinx sphinx-rtd-theme"
        @bash -c "source $(VENV_PATH)/bin/activate && make -C doc WS_ROOT=$(WS_ROOT) BR=$(BR) NO_VPP_PAPI=1 html"
 
 .PHONY: wipe-doc
@@ -233,10 +233,10 @@ wipe-cov: wipe
 
 .PHONY: checkstyle
 checkstyle: verify-test-dir
-       @virtualenv $(VENV_PATH) -p $(PYTHON_INTERP)
-       @bash -c "source $(VENV_PATH)/bin/activate && $(PYTHON_INTERP) -m pip install pycodestyle"
+       @virtualenv $(VENV_PATH) -p python3
+       @bash -c "source $(VENV_PATH)/bin/activate && python3 -m pip install pycodestyle"
        @bash -c "source $(VENV_PATH)/bin/activate &&\
-               pycodestyle --show-source --ignore=W504,E126,E241,E226,E305,E704,E741,E722 -v $(WS_ROOT)/test/*.py ||\
+               pycodestyle --show-source --ignore=W504,E126,E241,E226,E305,E704,E741,E722 --exclude=$(WS_ROOT)/test/_*.py -v $(WS_ROOT)/test/*.py ||\
                (echo \"*******************************************************************\" &&\
                 echo \"* Test framework PEP8 compliance check FAILED \" &&\
                 echo \"*******************************************************************\" &&\
@@ -260,6 +260,7 @@ help:
        @echo ""
        @echo "Arguments controlling test runs:"
        @echo " V=[0|1|2]            - set test verbosity level"
+       @echo "                        0=ERROR, 1=INFO, 2=DEBUG"
        @echo " TEST_JOBS=[<n>|auto] - use <n> parallel processes for test execution or automatic discovery of maximum acceptable processes (default: 1)"
        @echo " CACHE_OUTPUT=[0|1]   - cache VPP stdout/stderr and log as one block after test finishes (default: 1)"
        @echo " FAILFAST=[0|1]       - fail fast if 1, complete all tests if 0"