Browse Source

Improving cover and docs testenv

- Add whitelist_externals envconfig setting
- Add percentage report to further analyze code-base
- Add command to rm doc/build before build sphinx

Change-Id: I996319debf8bbb8aa8792169dbc69a43e2f4cf73
Nguyen Van Trung 1 year ago
parent
commit
71226d0e9a
1 changed files with 9 additions and 2 deletions
  1. 9
    2
      tox.ini

+ 9
- 2
tox.ini View File

@@ -6,6 +6,8 @@ skipsdist = True
6 6
 [testenv]
7 7
 usedevelop = True
8 8
 install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
9
+whitelist_externals = find
10
+                      rm
9 11
 setenv =
10 12
    VIRTUAL_ENV={envdir}
11 13
    BRANCH_NAME=master
@@ -21,7 +23,11 @@ commands = flake8
21 23
 commands = {posargs}
22 24
 
23 25
 [testenv:cover]
24
-commands = python setup.py test --coverage --testr-args='{posargs}'
26
+commands = 
27
+  coverage erase
28
+  find . -type f -name "*.pyc" -delete
29
+  python setup.py test --coverage --testr-args='{posargs}'
30
+  coverage report
25 31
 
26 32
 [testenv:py27]
27 33
 commands =
@@ -30,7 +36,8 @@ commands =
30 36
     doc8 --ignore-path "doc/source/history.rst" doc/source
31 37
 
32 38
 [testenv:docs]
33
-commands = python setup.py build_sphinx
39
+commands = rm -rf doc/build
40
+           python setup.py build_sphinx
34 41
 
35 42
 [testenv:debug]
36 43
 commands = oslo_debug_helper {posargs}

Loading…
Cancel
Save