Add genconfig tox job for sample config file generation

If someone tries to run generate_sample.sh outside a venv
or without installing project dependencies, you could encounter
error messages related to missing or outdated dependencies.

This change wraps generate_sample.sh execution in tox. Wrapping it
in a tox job makes sure all dependencies found in requirements.txt and
test-requirements.txt are properly installed prior to its execution.

This change does not propose the removal of the sample config file
already in place in the repository and it does not propose adding
it to the list of jobs automatically ran by tox.

This change is merely the introduction of a more convenient way
to execute generate_sample.sh in a proper venv.

You can now (re)generate the sample config file with this tox job:

  tox -egenconfig

Change-Id: I1058a306a462ba8349a4433c78070fabd6d03e39
This commit is contained in:
Mathieu Gagné 2014-06-20 13:53:17 -04:00
parent 2a9c6acd57
commit 0076328a44

View File

@ -30,6 +30,10 @@ setenv = VIRTUAL_ENV={envdir}
commands =
python setup.py testr --coverage {posargs}
[testenv:genconfig]
commands =
bash tools/config/generate_sample.sh -b . -p ironic -o etc/ironic
[testenv:venv]
commands = {posargs}