X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=tox.ini;h=8dc20c9a25280f0aec561c01c1476f842c05d4f8;hb=HEAD;hp=1606b9b80c809e3ce2916b2b0f7a697743ae8478;hpb=053c09a2ed1a8fc8aeef3f8185902634feec8000;p=optf%2Fosdf.git diff --git a/tox.ini b/tox.ini index 1606b9b..0bd2d9e 100644 --- a/tox.ini +++ b/tox.ini @@ -4,16 +4,19 @@ skipsdist=True envlist = py3, pylint, flake8diff [testenv] +allowlist_externals=/bin/cp, /bin/bash, /bin/rm distribute = False basepython=python3 setenv = OSDF_CONFIG_FILE={toxinidir}/test/config/osdf_config.yaml commands = + /bin/cp config/slicing_config.yaml test/config/ /bin/bash test/functest/scripts/start-simulators.sh coverage run --module pytest --junitxml xunit-results.xml coverage xml --omit=".tox/py3/*","test/*" coverage report -m --omit=".tox/py3/*","test/*" /bin/bash test/functest/scripts/stop-simulators.sh + /bin/rm test/config/slicing_config.yaml # TODO: need to update the above "omit" when we package osdf as pip-installable deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test/test-requirements.txt @@ -24,14 +27,15 @@ deps = -r{toxinidir}/requirements.txt source=./apps/,./osdf/,osdfapp.py,./runtime/,solverapp.py [testenv:pylint] -whitelist_externals=bash +allowlist_externals=bash commands = bash -c "pylint --reports=y osdf apps runtime| tee pylint.out" [testenv:py3] -basepython=python3.6 +basepython=python3 [testenv:flake8diff] -whitelist_externals=bash +basepython=python3 +allowlist_externals=bash deps = hacking>=2.0.0 commands = bash -c "files=$(git diff HEAD^ HEAD --diff-filter=d --name-only | grep -E '(^apps\/|osdf\/|runtime\/)'| grep -E '*\.py$'); if [[ -z $files ]]; then exit 0; else flake8 $files; fi" @@ -39,5 +43,5 @@ commands = [flake8] select = E,H,W,F max-line-length = 119 -ignore = -per-file-ignores= +ignore = W503 #conflict with W504 +per-file-ignores= apps/pci/optimizers/__init__.py:F401