From 0076328a444a690e167d1fb251fd4bbe8c1bfb32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Gagne=CC=81?= Date: Fri, 20 Jun 2014 13:53:17 -0400 Subject: [PATCH] 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 --- tox.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tox.ini b/tox.ini index 64de8b9183..68a7b0697c 100644 --- a/tox.ini +++ b/tox.ini @@ -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}