Disable warnings as errors for sphinx
If GENERATE_TEMPEST_PLUGIN_LIST=False, the plugin-registry page is not
generated, and then sphinx fails with:
doc/source/index.rst:69:toctree contains reference to nonexisting
document u'plugin-registry'
Setting the variable to False is a legit use case, used in isolated
build environments like CBS used for RDO packages and should be
supported.
Alternatively, we could make inclusion of the page conditional to the
environment variable value, for example using 'only' directive for
sphinx and passing an appropriate 'tag' as a flag indicating the page is
generated; setup.py interface doesn't seem to provide an explicit way to
pass tags but SPHINXOPTS variable would be handy. Sadly, table of
contents can't be controlled with the directive:
https://github.com/sphinx-doc/sphinx/issues/1420
Another alternative would be to generate a stub page with no useful
info just to upease sphinx. I figured it's easier to tweak sphinx
configuration though.
The fix still leaves warnings-as-errors enabled for tox environments
with assumption that if tox is used, the build environment is not as
constrained.
Change-Id: Id174d1679c7b141b0327d8c23d6b14f7db83fae8
2 files changed