summaryrefslogtreecommitdiffstats
path: root/windriver/tox.ini
diff options
context:
space:
mode:
authorYun Huang <yun.huang@windriver.com>2018-03-13 16:39:58 +0800
committerYun Huang <yun.huang@windriver.com>2018-03-13 16:39:58 +0800
commit280526abe4be41d9e66c8d7b9d70d43c6ab61d64 (patch)
tree00069d68ced02b43d622c5c5a23d14dd203c8351 /windriver/tox.ini
parent7636ee407275885ac5227a5633a2050e7ac1fc8f (diff)
Fix sonar coverage issue for windriver
Change-Id: I6ce2f757d7847250e515529c95694c3611c09e97 Issue-ID: MULTICLOUD-171 Signed-off-by: Yun Huang <yun.huang@windriver.com>
Diffstat (limited to 'windriver/tox.ini')
-rw-r--r--windriver/tox.ini26
1 files changed, 23 insertions, 3 deletions
diff --git a/windriver/tox.ini b/windriver/tox.ini
index 0f9b2aee..36284148 100644
--- a/windriver/tox.ini
+++ b/windriver/tox.ini
@@ -1,15 +1,35 @@
[tox]
-envlist = py27,py35
+envlist = py27,py35,cov
skipsdist = true
[tox:jenkins]
downloadcache = ~/cache/pip
+[flake8]
+ignore = E501,E722
+exclude = ./venv-tox,./.tox
+max-complexity = 27
+
[testenv]
setenv =
PYTHONPATH = {toxinidir}/../share
deps = -r{toxinidir}/requirements.txt
commands =
coverage run --branch manage.py test titanium_cloud
- coverage report --omit=".tox/*,*tests*,*__init__.py,*newton*" --fail-under=30
- coverage xml -i
+ coverage report --omit=".tox/*,*tests*,*__init__.py,*newton_base*,*common*" --fail-under=30
+
+[testenv:pep8]
+deps=flake8
+commands=flake8
+
+[testenv:cov]
+commands = coverage xml --omit="*test_*,*__init__.py,*site-packages*"
+
+[testenv:cover]
+setenv=
+ DJANGO_SETTINGS_MODULE = titanium_cloud.settings-cover
+commands =
+ coverage erase
+ {[testenv]commands}
+ coverage xml -i
+