X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=tox.ini;h=95a119f28aac01b9fad13d4717e45d3197f634e7;hb=63b56cf0740fd5e2e0b7b022e287b27ddb898dee;hp=6b90f0683579dd4a9f693c543a0675b7bac07e1a;hpb=22b8299e29f87158c4675892b9c3189d9eb35ba7;p=functest-kubernetes.git diff --git a/tox.ini b/tox.ini index 6b90f068..95a119f2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,35 +1,63 @@ [tox] -envlist = pep8,pylint,yamllint,py27,py35,cover +envlist = pep8,pylint,yamllint,ansiblelint,bashate,py27,py37,bandit,perm [testenv] usedevelop = True deps = -chttps://git.opnfv.org/functest/plain/upper-constraints.txt - -c{toxinidir}/upper-constraints.txt + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt install_command = pip install {opts} {packages} +commands = nosetests --with-xunit \ + --with-coverage \ + --cover-tests \ + --cover-package=functest_kubernetes \ + --cover-xml \ + --cover-html \ + functest_kubernetes [testenv:pep8] -basepython = python2.7 +basepython = python3.7 commands = flake8 [testenv:pylint] -basepython = python2.7 -whitelist_externals = bash -modules = - functest_kubernetes -commands = - pylint --disable=locally-disabled --reports=n {[testenv:pylint]modules} +basepython = python3.7 +commands = pylint --disable=locally-disabled --reports=n functest_kubernetes [testenv:yamllint] -basepython = python2.7 +basepython = python3.7 files = + .travis.yml docker + functest_kubernetes/rally/all-in-one.yaml commands = yamllint {[testenv:yamllint]files} -[testenv:cover] -basepython = python2.7 -commands = nosetests --with-coverage --cover-tests \ - --cover-package functest_kubernetes functest_kubernetes +[testenv:ansiblelint] +basepython = python3.7 +commands = ansible-lint ansible/site.yml + +[testenv:bandit] +basepython = python3.7 +commands = bandit -r functest_kubernetes -x tests -n 5 -ll + +[testenv:py37] +commands = nosetests functest_kubernetes + +[testenv:bashate] +basepython = python3.7 +files = + build.sh +commands = bashate -e E005,E006,E042,E043 {[testenv:bashate]files} + +[testenv:perm] +basepython = python3.7 +whitelist_externals = bash +path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/pres/reveal.js/*' +commands = + bash -c "\ + find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \ + -exec ls -l \{\} + | grep '.' && exit 1 || exit 0" + bash -c "\ + find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"