samba.tests.docs: Assume docs are generated by waf.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 19 Oct 2012 07:16:55 +0000 (09:16 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 19 Oct 2012 07:16:55 +0000 (09:16 +0200)
source4/scripting/python/samba/tests/docs.py

index d4d4a6249dbefa457a76c3b407e28ea1231e0f72..7105afd6220fe4b70330bbdc668006c774d3710e 100644 (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()