Browse Source

Add tox env to build docs

In django-based projects, we need to specify DJANGO_SETTINGS_MODULE
when running docs build. It is required to addresses the warnings of
docs build job in the gate.

This commit also changes run_tests.sh --docs to use "python setup.py
build_sphinx" to match tox docs env. This change addresses all sphinx
build warning except keystone v3 related following warning.
I believe it is useful.
  NoReverseMatch: u'domains' is not a registered namespace
  inside 'horizon:admin'

Closes-Bug: #1302532
Related-Bug: #1257725

Change-Id: I3663b81b58be3c6cb05e4af914f768c28b21ea07
tags/2014.2.b1
Akihiro Motoki 5 years ago
parent
commit
c4146c4016
2 changed files with 5 additions and 2 deletions
  1. 1
    2
      run_tests.sh
  2. 4
    0
      tox.ini

+ 1
- 2
run_tests.sh View File

@@ -158,8 +158,7 @@ function run_pep8 {
158 158
 
159 159
 function run_sphinx {
160 160
     echo "Building sphinx..."
161
-    export DJANGO_SETTINGS_MODULE=openstack_dashboard.settings
162
-    ${command_wrapper} sphinx-build -b html doc/source doc/build/html
161
+    ${command_wrapper} python setup.py build_sphinx
163 162
     echo "Build complete."
164 163
 }
165 164
 

+ 4
- 0
tox.ini View File

@@ -44,6 +44,10 @@ commands = /bin/bash run_tests.sh -N --integration
44 44
 basepython = python2.6
45 45
 commands = /bin/bash run_tests.sh -N --integration
46 46
 
47
+[testenv:docs]
48
+setenv = DJANGO_SETTINGS_MODULE=openstack_auth.tests.settings
49
+commands = python setup.py build_sphinx
50
+
47 51
 [tox:jenkins]
48 52
 downloadcache = ~/cache/pip
49 53
 

Loading…
Cancel
Save