aboutsummaryrefslogtreecommitdiffstats
path: root/tox.ini
blob: 64ccb7bdc11f214b9cf087f32ee8f2bfba3435b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-
[tox]
envlist = docs,pep8,pylint,yamllint,bashate,py35,py27,perm,cover

[testenv]
usedevelop = True
deps =
  -c{toxinidir}/upper-constraints.txt
  -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens}
  -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 \
  --cover-xml \
  --cover-html \
  functest/tests/unit

[testenv:docs]
basepython = python2.7
commands =
  doc8 \
    --ignore-path api/build \
    --ignore-path docs/release/release-notes/build \
    --ignore-path docs/testing/developer/devguide/build \
    --ignore-path docs/testing/developer/internship/security_group/build \
    --ignore-path docs/testing/developer/internship/testapi_evolution/build \
    --ignore-path docs/testing/developer/internship/unit_tests/build \
    --ignore-path docs/testing/developer/internship/vnf_catalog/build \
    --ignore-path docs/testing/user/configguide/build \
    --ignore-path docs/testing/user/userguide/build \
    api \
    docs/release/release-notes \
    docs/testing/user/configguide \
    docs/testing/user/userguide
  sphinx-build -W -b html api/ api/build
  sphinx-build -W -b html docs/release/release-notes docs/release/release-notes/build/html
  sphinx-build -W -b html docs/testing/developer/devguide docs/testing/developer/devguide/build/html
  sphinx-build -W -b html docs/testing/developer/internship/security_group docs/testing/developer/internship/security_group/build/html
  sphinx-build -W -b html docs/testing/developer/internship/testapi_evolution docs/testing/developer/internship/testapi_evolution/build/html
  sphinx-build -W -b html docs/testing/developer/internship/unit_tests docs/testing/developer/internship/unit_tests/build/html
  sphinx-build -W -b html docs/testing/developer/internship/vnf_catalog docs/testing/developer/internship/vnf_catalog/build/html
  sphinx-build -W -b html docs/testing/user/configguide docs/testing/user/configguide/build/html
  sphinx-build -W -b html docs/testing/user/userguide docs/testing/user/userguide/build/html

[testenv:pep8]
basepython = python2.7
commands = flake8

[testenv:pylint]
basepython = python2.7
whitelist_externals = bash
modules =
  functest.ci
  functest.opnfv_tests.openstack.rally
  functest.opnfv_tests.openstack.refstack
  functest.opnfv_tests.openstack.snaps
  functest.opnfv_tests.openstack.tempest
  functest.opnfv_tests.openstack.vping
  functest.opnfv_tests.openstack.cinder
  functest.opnfv_tests.sdn.odl
  functest.opnfv_tests.vnf.router
  functest.tests.unit.ci
  functest.tests.unit.odl
  functest.tests.unit.openstack.rally
  functest.tests.unit.openstack.snaps
  functest.tests.unit.openstack.tempest
  functest.tests.unit.openstack.vping
  functest.tests.unit.vnf.router
  functest.tests.unit.utils
  functest.utils.config
  functest.utils.constants
  functest.utils.env
  functest.utils.functest_utils
commands =
  bash -c "\
    pylint -f parseable --ignore-imports=y --disable=locally-disabled functest | \
    tee pylint.out | sed -ne '/Raw metrics/,//p'"
  pylint --reports=n --errors-only functest
  pylint --disable=locally-disabled \
    --disable=duplicate-code \
    --ignore-imports=y --reports=n {[testenv:pylint]modules}

[testenv:yamllint]
basepython = python2.7
files =
  .travis.yml
  docker
  functest/ci
  functest/opnfv_tests/vnf
commands =
  yamllint -s {[testenv:yamllint]files}

[testenv:py35]
dirs =
  functest/tests/unit/ci
  functest/tests/unit/core
  functest/tests/unit/odl
  functest/tests/unit/openstack
  functest/tests/unit/vnf/epc
  functest/tests/unit/utils
commands = nosetests {[testenv:py35]dirs}

[testenv:bashate]
basepython = python2.7
files =
  functest/opnfv_tests/openstack/cinder/write_data.sh
  functest/opnfv_tests/openstack/cinder/read_data.sh
  functest/opnfv_tests/openstack/rally/scenario/support/instance_dd_test.sh
  functest/ci/download_images.sh
  build.sh
commands = bashate {[testenv:bashate]files}

[testenv:cover]
basepython = python2.7
dirs =
  functest/tests/unit/ci
  functest/tests/unit/odl
commands = nosetests --with-coverage --cover-tests \
  --cover-package functest.ci.check_deployment \
  --cover-package functest.opnfv_tests.sdn.odl \
  --cover-package functest.tests.unit \
  --cover-min-percentage 100 {[testenv:cover]dirs}

[testenv:perm]
basepython = python2.7
whitelist_externals = bash
path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/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"