Update tools/test.py for directory rename

Change-Id: Ia16ec6973740f1c27cfd17f47435ea51caef3e2e
This commit is contained in:
Andreas Jaeger 2013-09-13 04:17:35 +02:00
parent 3c1b56c1d9
commit 6eb4c5135e
1 changed files with 5 additions and 6 deletions

11
test.py
View File

@ -8,7 +8,7 @@ Validates all xml files against the DocBook 5 RELAX NG schema, and
attempts to build all books.
Options:
path Root directory, defaults to <repo root>/doc/src/doc/docbkx
path Root directory, defaults to <repo root>/doc
Ignores pom.xml files and subdirectories named "target".
@ -29,7 +29,7 @@ import sys
import urllib2
# These are files that are known to not be in DocBook format
FILE_EXCEPTIONS = ['ha-guide-docinfo.xml','bk001-ch003-associate-general.xml']
FILE_EXCEPTIONS = ['st-training-guides.xml', 'ha-guide-docinfo.xml', 'bk001-ch003-associate-general.xml', 'basic-install-pom.xml']
# These are books that we aren't checking yet
BOOK_EXCEPTIONS = []
@ -287,7 +287,7 @@ def main(args):
def default_root():
"""Return the location of openstack-manuals/doc/src/docbkx
"""Return the location of openstack-manuals/doc/
The current working directory must be inside of the openstack-manuals
repository for this method to succeed"""
@ -298,15 +298,14 @@ def default_root():
print("git failed: %s" % e)
sys.exit(1)
return os.path.join(gitroot, "doc/src/docbkx")
return os.path.join(gitroot, "doc")
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Validate XML files against "
"the DocBook 5 RELAX NG schema")
parser.add_argument('path', nargs='?', default=default_root(),
help="Root directory that contains DocBook files, "
"defaults to `git rev-parse --show-toplevel`/doc/src/"
"docbkx")
"defaults to `git rev-parse --show-toplevel`/doc")
parser.add_argument("--force", help="force the validation of all files "
"and build all books", action="store_true")
parser.add_argument("--check-build", help="try to build books using "