added parameters to control the behaviour
added parameters to control the behaviour

test.py is a modified copy of validate.py. I introduced a new
name to not cause race conditions with the existing Jenkins
job which actually uses validate.py.

This patch introduces the following new parameters and changes
the default behaviour of the script. By default the script will
do nothing.

--check-build: With this parameter the script tries to build
               all books affected by modified files.

--check-syntax: With this parameter the script checks if modified
                files are still using valid XML syntax.

--with-niceness: Using this parameter together with --check-syntax
                 will also check the syntax for niceness issues (for
                 example trailing whitespaces).

--non-voting: With this parameter set the script always returns 0
              as exit code.

Possible Jenkins jobs:

./tools/test.py --check-build
./tools/test.py --check-syntax
./tools/test.py --check-syntax --with-niceness --non-voting

The force parameter is also available (as in validate.py). But
I think it's not meaningful to force the build of all books
or the syntax check of all files because this will result again
in very long runtimes.

We should not use the --non-voting parameter on Jenkins. It should
be possible to simply define non-voting jobs. Then the job is
failed in the review request, but Jenkins still gives +1.

Change-Id: I2ed6f80beb109c60bd7f0ca2417426f776383973

savinash47/openstack-doc-tools,savinash47/openstack-doc-tools,openstack/openstack-doc-tools,savinash47/openstack-doc-tools,openstack/openstack-doc-tools