Browse Source

clean up test job configuration

Make the py27 and py35 jobs run the same commands by putting them into
the base testenv block.

Move the doc8 job into the pep8 environment to run with the other
linters.

Change the way we invoke sphinx to run the doctests to avoid issues
with pbr's sphinx integration. This also required removing skipdist
and usedevelop to ensure that all of the pbr-generated files needed by
sphinx exist before we run sphinx.

Change the way sphinx is invoked in the docs environment to avoid
issues with pbr's sphinx integration.

Change-Id: If8a24428eca4512a66dbb361e55cd73aa92c4da8
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 1 year ago
parent
commit
936a5d5f13
1 changed files with 10 additions and 11 deletions
  1. 10
    11
      tox.ini

+ 10
- 11
tox.ini View File

@@ -1,11 +1,9 @@
1 1
 [tox]
2 2
 minversion = 2.0
3 3
 envlist = py35,py27,pypy,pep8
4
-skipsdist = True
5 4
 
6 5
 [testenv]
7 6
 basepython = python3
8
-usedevelop = True
9 7
 install_command = pip install {opts} {packages}
10 8
 whitelist_externals = find
11 9
                       rm
@@ -13,31 +11,32 @@ deps =
13 11
        -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
14 12
        -r{toxinidir}/requirements.txt
15 13
        -r{toxinidir}/test-requirements.txt
16
-commands = python setup.py test --slowest --testr-args='{posargs}'
14
+commands =
15
+    python setup.py testr --slowest --testr-args='{posargs}'
16
+    sphinx-build -E -W -b doctest doc/source doc/build/doctest
17 17
 
18 18
 [testenv:pep8]
19
-commands = flake8
19
+commands =
20
+    flake8
21
+    doc8 doc/source
20 22
 
21 23
 [testenv:venv]
22 24
 commands = {posargs}
23 25
 
24 26
 [testenv:cover]
25
-commands = 
27
+commands =
26 28
   coverage erase
27 29
   find . -type f -name "*.pyc" -delete
28 30
   python setup.py test --coverage --testr-args='{posargs}'
29 31
   coverage report
30 32
 
31 33
 [testenv:py27]
32
-commands =
33
-    python setup.py testr --slowest --testr-args='{posargs}'
34
-    python setup.py build_sphinx -b doctest
35
-    doc8 doc/source
36 34
 basepython = python2.7
37 35
 
38 36
 [testenv:docs]
39
-commands = rm -rf doc/build
40
-           python setup.py build_sphinx
37
+commands =
38
+    rm -rf doc/build
39
+    sphinx-build -E -W -b html doc/source doc/build/html
41 40
 
42 41
 [testenv:debug]
43 42
 commands = oslo_debug_helper {posargs}

Loading…
Cancel
Save