[tox]
envlist = py35,py34,py27,pep8,cover

[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
         PYTHONDONTWRITEBYTECODE = 1
         LANGUAGE=en_US
         LC_ALL=en_US.UTF-8
         TESTS_DIR=./proliantutils/tests/
deps = -r{toxinidir}/test-requirements.txt
commands = ostestr {posargs}

[testenv:pep8]
basepython = python2.7
deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/test-requirements.txt
commands =
    flake8 proliantutils

[testenv:cover]
# After running this target, visit proliantutils/htmlcov/index.html
# in your browser, to see a nicer presentation report with annotated
# HTML listings detailing missed lines.
basepython = python2.7
deps = {[testenv]deps}
commands = coverage erase
           python setup.py testr --coverage --testr-args='{posargs}'
           coverage report --omit=*test*
           coverage html --omit=*test*

[flake8]
# Exclude MIB directories from flake8/pep8 tests as these are
# autogenerated files.
exclude = ./proliantutils/ilo/snmp/cpqdisk_mibs
max-complexity=15

[testenv:venv]
setenv = PYTHONHASHSEED=0
commands = {posargs}

[tox]
envlist = py35,py34,py27,pep8,cover

[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
         PYTHONDONTWRITEBYTECODE = 1
         LANGUAGE=en_US
         LC_ALL=en_US.UTF-8
         TESTS_DIR=./proliantutils/tests/
deps = -r{toxinidir}/test-requirements.txt
commands = ostestr {posargs}

[testenv:pep8]
basepython = python2.7
deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/test-requirements.txt
commands =
    flake8 proliantutils

[testenv:cover]
# After running this target, visit proliantutils/cover/index.html
# in your browser, to see a nicer presentation report with annotated
# HTML listings detailing missed lines.
basepython = python2.7
deps = {[testenv]deps}
commands = coverage erase
           python setup.py testr --coverage --omit='*test*' --testr-args='{posargs}'
           coverage report --omit=*test*

[flake8]
# Exclude MIB directories from flake8/pep8 tests as these are
# autogenerated files.
exclude = ./proliantutils/ilo/snmp/cpqdisk_mibs
max-complexity=15

[testenv:venv]
setenv = PYTHONHASHSEED=0
commands = {posargs}

Stop hosting coverage results in htmlcov dir
Stop hosting coverage results in htmlcov dir

We now have a new Jenkins check job (code-coverage) running as
part of any proliantutils patch submitted upstream; and the dir
which is hosted as part of the coverage-job results is 'cover',
and not 'htmlcov' which we use to place the html output of the
code coverage results. As part of 'cover' dir we place the html
results in which the coverage takes into account the unit test
files also. Ideally code coverage should include only the
source files.

This patch addresses this concern by not using the htmlcov dir
any more and will use the cover dir only to host the actual
coverage results (i.e. devoid of unit test files).

Change-Id: I7cba8d4f0f2b9231b5f04b93b8a012889dd04c10
