X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tox.ini;h=f365a14dfe31b1048323baca03848ea1dc614924;hb=47f0321523d7be8e24abcb65668d438182048e4e;hp=5e6b31a236f4ccbfc7d0ec19e7a5018e010bfd7f;hpb=cd6a3a8e3ef1ec285c7c764d3ddf87c575cfce79;p=transportpce.git diff --git a/tox.ini b/tox.ini index 5e6b31a23..f365a14df 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,8 @@ setupdir = tests/ [testenv] passenv = USE_LIGHTY http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY +setenv = + USE_LIGHTY = True usedevelop = True basepython = python3 deps = @@ -37,7 +39,7 @@ commands = {py3,portmapping,topoPortMapping,flexgrid,rspn,topology,pce,olm,end2end,portmapping221,rspn221,otnrenderer,otnshrenderer,topology221,otntopology,olm221,tapi221,otnend2end,end2end221,gnpy}: - sh -c 'if [ "$USE_LIGHTY" = "True" ]; then (cd ../lighty && ./build.sh); fi' #run 1.2.1 functional tests {py3,portmapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_portmapping.py - {py3,topoPortMapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_topoPortMapping.py + {py3,topoPortMapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_topo_portmapping.py {py3,topology}: nosetests --with-xunit transportpce_tests/1.2.1/test_topology.py {py3,rspn}: nosetests --with-xunit transportpce_tests/1.2.1/test_renderer_service_path_nominal.py {py3,pce}: nosetests --with-xunit transportpce_tests/1.2.1/test_pce.py @@ -74,6 +76,14 @@ basepython = python3 deps = -rdocs/requirements.txt commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ../docs/ {toxinidir}/docs/_build/linkcheck +[testenv:spelling] +basepython = python3 +deps = + -rdocs/requirements.txt + sphinxcontrib-spelling + PyEnchant +commands = sphinx-build -b spelling -d {envtmpdir}/doctrees ../docs/ {toxinidir}/docs/_build/spelling + [testenv:autopep8] basepython = python3 deps = autopep8 @@ -85,4 +95,21 @@ basepython = python3 deps = pylint whitelist_externals = find commands = - find transportpce_tests/ -name *.py -exec pylint --max-line-length=120 --disable=missing-docstring --reports=y --score=y --output-format=colorized \{\} + + find transportpce_tests/ -name *.py -exec pylint --max-line-length=120 --disable=missing-docstring --method-rgx="(([a-z_][a-zA-Z0-9_]{2,})|(_[a-z0-9_]*)|(__[a-zA-Z][a-zA-Z0-9_]+__))$" --variable-rgx="[a-zA-Z_][a-zA-Z0-9_]{1,30}$" --reports=y --score=y --output-format=colorized \{\} + + +[testenv:pyang] +basepython = python3 +deps = pyang +whitelist_externals = find +commands = + pyang --version + find ../api/ -name target -prune -o -name *.yang -exec pyang --lint --canonical --max-line-length=120 -p../api/src/main/yang/:../ordmodels/common/src/main/yang/:../ordmodels/service/src/main/yang/:../tapimodels/src/main/yang/ \{\} + +#find ../api/ ../ordmodels/ ../tapimodels/ -name target -prune -o -name *.yang -exec pyang --lint --canonical --max-line-length=120 -p../api/src/main/yang/:../ordmodels/common/src/main/yang/:../ordmodels/service/src/main/yang/:../tapimodels/src/main/yang/ \{\} + + +[testenv:pyangformat] +basepython = python3 +deps = pyang +whitelist_externals = sh +commands = + pyang --version + sh -c 'find ../api/ -name target -prune -o -name *.yang -print | while read -r fname; do pyang -f yang --yang-canonical --yang-remove-unused-imports --max-line-length=120 --keep-comments -p../api/src/main/yang/:../ordmodels/common/src/main/yang/:../ordmodels/service/src/main/yang/:../tapimodels/src/main/yang/ "$fname" -o /tmp/tmpfile.$$ && mv /tmp/tmpfile.$$ "$fname";done'