add api-samples tox target
api-samples generation is no longer straight forward, now that tox is blocking environment changes, and that PYTHONHASHSEED is randomized in each run. This creates a tox target to make it easy to generate the api-samples. Change-Id: Ie88597fecee5ce81fb29ce2cfb73b15d60f3f389
This commit is contained in:
parent
b8fa68daf3
commit
237ceeae5b
@ -7,11 +7,11 @@ tests in this directory.
|
||||
|
||||
To add a new api sample, add tests for the common passing and failing
|
||||
cases in this directory for your extension, and modify test_samples.py
|
||||
for your tests. There should be both JSON and XML tests included.
|
||||
for your tests.
|
||||
|
||||
Then run the following command:
|
||||
|
||||
GENERATE_SAMPLES=True tox -e functional
|
||||
tox -e api-samples
|
||||
|
||||
Which will create the files on doc/api_samples.
|
||||
|
||||
|
12
tox.ini
12
tox.ini
@ -66,6 +66,18 @@ commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash tools/pretty_tox.sh '{posargs}'
|
||||
|
||||
[testenv:api-samples]
|
||||
usedevelop = True
|
||||
install_command = pip install -U --force-reinstall {opts} {packages}
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
GENERATE_SAMPLES=True
|
||||
PYTHONHASHSEED=0
|
||||
OS_TEST_PATH=./nova/tests/functional/api_sample_tests
|
||||
LANGUAGE=en_US
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash tools/pretty_tox.sh '{posargs}'
|
||||
|
||||
[testenv:functional-constraints]
|
||||
usedevelop = {[testenv:functional]usedevelop}
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
|
Loading…
Reference in New Issue
Block a user