1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

samba.tests.docs: Assume docs are generated by waf.

This commit is contained in:
Jelmer Vernooij 2012-10-19 09:16:55 +02:00
parent cfa72bcc5e
commit ed37b8ad14

View File

@ -44,10 +44,14 @@ class NoXsltProc(Exception):
def get_documented_parameters(sourcedir):
path = os.path.join(sourcedir, "bin", "default", "docs-xml", "smbdotconf")
if not os.path.exists(os.path.join(path, "parameters.all.xml")):
raise Exception("Unable to find parameters.all.xml")
try:
p = subprocess.Popen(
["xsltproc", "--xinclude", "--param", "smb.context", "ALL", "generate-context.xsl", "parameters.all.xml"],
stderr=subprocess.STDOUT, stdout=subprocess.PIPE, cwd=os.path.join(sourcedir, "docs-xml", "smbdotconf"))
["xsltproc", "--xinclude", "--param", "smb.context", "ALL", os.path.join(sourcedir, "docs-xml", "smbdotconf", "generate-context.xsl"), "parameters.all.xml"],
stderr=subprocess.STDOUT, stdout=subprocess.PIPE,
cwd=path)
except OSError, e:
if e.errno == errno.ENOENT:
raise NoXsltProc()