diff --git a/.gitignore b/.gitignore index 83a8f6f29..3b587c0a8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ # Hidden files .eggs +.coverage* .stestr .test .testrepository @@ -15,6 +16,7 @@ __pycache__ AUTHORS build/* ChangeLog +cover/ doc/build/* dist/ etc/ diff --git a/test-requirements.txt b/test-requirements.txt index 773614d6d..090787fc0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,5 @@ mock >= 2.0 # BSD testscenarios>=0.4 testtools>=2.2.0 -tempest>=17.1.0 +tempest>=17.1.0 # Apache-2.0 +coverage!=4.4,>=4.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 2450cb655..dbcea8c03 100644 --- a/tox.ini +++ b/tox.ini @@ -11,13 +11,23 @@ install_command = setenv = VIRTUAL_ENV={envdir} - PYTHONWARNINGS=default::DeprecationWarning,{env:PYTHONWARNINGS:} + PYTHONWARNINGS=ignore::Warning,{env:PYTHONWARNINGS:} OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true} OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true} OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true} + PYTHON=coverage run --source tobiko --parallel-mode + +whitelist_externals= + find commands = - stestr run {posargs} + coverage erase + find . -type f -name "*.pyc" -delete + stestr --test-path ./tobiko/tests run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report deps = -r{toxinidir}/test-requirements.txt