summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2015-07-24 01:29:37 +0200
committerJeremy Allison <jra@samba.org>2015-07-31 01:55:33 +0200
commit8ad079da0ce098f5711a42575d3f3e59b67a3e7b (patch)
tree24b36a28326125ea6f8e1149c824caef8d0baa17
parentc102ac28967fa37335a7c42c3b20211b7846282c (diff)
downloadsamba-8ad079da0ce098f5711a42575d3f3e59b67a3e7b.tar.gz
tests:docs: don't load or test the static param_table.
It is going to be removed for the generated table. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--python/samba/tests/docs.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index dc5e2129d7a..e7123b6d9ad 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -59,29 +59,6 @@ def get_documented_parameters(sourcedir):
p.close()
-def get_implementation_parameters(sourcedir):
- # Reading entries from source code
- f = open(os.path.join(sourcedir, "lib/param/param_table_static.c"), "r")
- try:
- # burn through the preceding lines
- while True:
- l = f.readline()
- if l.startswith("struct parm_struct parm_table"):
- break
-
- for l in f.readlines():
- if re.match("^\s*\}\;\s*$", l):
- break
- # pull in the param names only
- m = re.match("\s*\.label\s*=\s*\"(.*)\".*", l)
- if not m:
- continue
-
- name = m.group(1)
- yield name
- finally:
- f.close()
-
def get_param_table_full(sourcedir, filename="lib/param/param_table_static.c"):
# Reading entries from source code
f = open(os.path.join(sourcedir, filename), "r")
@@ -218,17 +195,6 @@ class SmbDotConfTests(TestCase):
self.fail("Unable to load documented parameters")
try:
- self.parameters = set(get_implementation_parameters(self.topdir))
- except:
- self.fail("Unable to load implemented parameters")
-
- try:
- self.table_static = set(get_param_table_full(self.topdir,
- "lib/param/param_table_static.c"))
- except:
- self.fail("Unable to load static parameter table")
-
- try:
self.table_gen = set(get_param_table_full(self.topdir,
"bin/default/lib/param/param_table_gen.c"))
except:
@@ -250,21 +216,6 @@ class SmbDotConfTests(TestCase):
os.unlink(self.smbconf)
os.unlink(self.blankconf)
- def test_unknown(self):
- # Filter out parametric options, since we can't find them in the parm
- # table
- documented = set([p for p in self.documented if not ":" in p])
- unknown = documented.difference(self.parameters)
- if len(unknown) > 0:
- self.fail(self._format_message(unknown,
- "Parameters that are documented but not in the implementation:"))
-
- def test_undocumented(self):
- undocumented = self.parameters.difference(self.documented)
- if len(undocumented) > 0:
- self.fail(self._format_message(undocumented,
- "Parameters that are in the implementation but undocumented:"))
-
def test_default_s3(self):
self._test_default(['bin/testparm'])
self._set_defaults(['bin/testparm'])