Remove doc/source/api and doc/build before building docs

doc/source/api and doc/build are build artifacts from building the docs
using the tox -e docs target. These are ignored in .gitignore since we
don't care about them from build to build - but leaving them around can
actually make the docs build fail if modules no longer exist but are
still sitting in these directories.

So this change just cleans those up each time you run tox -e docs.

Closes-Bug: #1488637

Change-Id: I646ae0b77a472c425d23815316e804b09bbe867d
This commit is contained in:
Matt Riedemann 2015-08-25 13:08:31 -07:00
parent 7a1ef0b538
commit 426a5ffa8e
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ usedevelop = True
# tox is silly... these need to be separated by a newline....
whitelist_externals = bash
find
rm
install_command = pip install -U --force-reinstall {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=./nova/tests/unit
@ -155,6 +156,7 @@ commands = {posargs}
[testenv:docs]
commands =
rm -rf doc/source/api doc/build
python setup.py build_sphinx
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
oslo-config-generator --config-file=etc/nova/nova-config-generator.conf