summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-02-09 13:12:06 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-02-10 01:45:16 +0100
commit209d3c0b7187f2c4e6be5a972206094cdf70224f (patch)
tree277f63bdc0b22fdbf38131500a489b00cee5ff6d /source4
parent88a041aa21c520fef46fae5a7db8958d4202cc8f (diff)
downloadsamba-209d3c0b7187f2c4e6be5a972206094cdf70224f.tar.gz
samba-209d3c0b7187f2c4e6be5a972206094cdf70224f.tar.bz2
samba-209d3c0b7187f2c4e6be5a972206094cdf70224f.zip
tests/source: Add wafsamba/ files to list of Python files to check.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Fri Feb 10 01:45:16 CET 2012 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/tests/source.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/tests/source.py b/source4/scripting/python/samba/tests/source.py
index 260d753801..0f39412f08 100644
--- a/source4/scripting/python/samba/tests/source.py
+++ b/source4/scripting/python/samba/tests/source.py
@@ -38,14 +38,16 @@ from samba.tests import (
def get_python_source_files():
"""Iterate over all Python source files."""
- library_dir = os.path.join(os.path.dirname(__file__), "..", "..", "samba")
+ library_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "samba"))
+ assert os.path.isdir(library_dir), library_dir
for root, dirs, files in os.walk(library_dir):
for f in files:
if f.endswith(".py"):
yield os.path.abspath(os.path.join(root, f))
- bindir = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "bin")
+ bindir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "bin"))
+ assert os.path.isdir(bindir), bindir
for f in os.listdir(bindir):
p = os.path.abspath(os.path.join(bindir, f))
if not os.path.islink(p):
@@ -53,6 +55,12 @@ def get_python_source_files():
target = os.readlink(p)
if os.path.dirname(target).endswith("scripting/bin"):
yield p
+ wafsambadir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "buildtools", "wafsamba"))
+ assert os.path.isdir(wafsambadir), wafsambadir
+ for root, dirs, files in os.walk(wafsambadir):
+ for f in files:
+ if f.endswith(".py"):
+ yield os.path.abspath(os.path.join(root, f))
def get_source_file_contents():
@@ -85,6 +93,9 @@ class TestSource(TestCase):
if fname.endswith("ms_schema.py"):
# FIXME: Not sure who holds copyright on ms_schema.py
continue
+ if "wafsamba" in fname:
+ # FIXME: No copyright headers in wafsamba
+ continue
match = copyright_re.search(text)
if not match:
incorrect.append((fname, 'no copyright line found\n'))
@@ -121,6 +132,9 @@ class TestSource(TestCase):
gpl_re = re.compile(re.escape(gpl_txt), re.MULTILINE)
for fname, text in get_source_file_contents():
+ if "wafsamba" in fname:
+ # FIXME: License to wafsamba hasn't been clarified yet
+ continue
if not gpl_re.search(text):
incorrect.append(fname)