From a0194a51d897b0364379efea90e87293c7b982b6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 8 Jan 2014 22:22:25 +0100 Subject: [PATCH] Setup for openstack-doc-tools Setup repository so that we can gate using the openstack-doc-tools tools. Update documentation with details. Change-Id: I8c0dd9131d45f1711d2b1c1916b2c668c6827e1a --- .gitignore | 8 ++++++++ README.rst | 19 +++++++++++++++++++ test-requirements.txt | 1 + tox.ini | 28 ++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 test-requirements.txt create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index ba57bce..d82d500 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,11 @@ target/ # NetBeans user-specific build actions nbactions.xml + +# Testenvironment +.tox/ + +# Editors +*~ +.*.swp +.bak diff --git a/README.rst b/README.rst index f18af0c..dbd86f4 100644 --- a/README.rst +++ b/README.rst @@ -42,6 +42,25 @@ The root of the generated HTML documentation is:: v2.0/target/docbkx/webhelp/openstack-network/index.html +Testing of changes and building of the manual +============================================= + +Install the python tox package and run ``tox`` from the top-level +directory to use the same tests that are done as part of our Jenkins +gating jobs. + +If you like to run individual tests, run: +* ``tox -e checkniceness`` - to run the niceness tests +* ``tox -e checksyntax`` - to run syntax checks +* ``tox -e checkdeletions`` - to check that no deleted files are referenced +* ``tox -e checkbuild`` - to actually build the manual + +tox will use the `openstack-doc-tools package +`_ for execution of +these tests. openstack-doc-tools has a requirement on maven for the +build check. + + Installing ========== Refer to http://docs.openstack.org to see where these documents are published diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..5090e85 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +openstack-doc-tools diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..f61e353 --- /dev/null +++ b/tox.ini @@ -0,0 +1,28 @@ +[tox] +minversion = 1.6 +envlist = checkniceness,checksyntax,checkdeletions,checkbuild +skipsdist = True + +[testenv] +setenv = + VIRTUAL_ENV={envdir} + LANG=en_US.UTF-8 + LANGUAGE=en_US:en + LC_ALL=C +deps = -r{toxinidir}/test-requirements.txt + +[testenv:venv] +commands = {posargs} + +[testenv:checkniceness] +commands = openstack-doc-test --api-site --check-niceness {posargs} + +[testenv:checksyntax] +commands = openstack-doc-test --api-site --check-syntax {posargs} + +[testenv:checkdeletions] +commands = openstack-doc-test --api-site --check-deletions {posargs} + +[testenv:checkbuild] +# ignore directory v1.0, it is not published +commands = openstack-doc-test --api-site --ignore-dir=v1.0 --check-build {posargs}