summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2019-03-17 14:47:40 +1300
committerAndrew Bartlett <abartlet@samba.org>2019-07-05 01:05:19 +0000
commit538ffe1960a8640875759ca194cc4cc9fae2c5bc (patch)
treebefa635a444d1a0c12ad1ef1a09c73d75daf0931 /source4
parenteb8f74f26d5d8facaaa13419e852aac727ba41a8 (diff)
downloadsamba-538ffe1960a8640875759ca194cc4cc9fae2c5bc.tar.gz
tests: ensure that most python scripts have usage text
When a script is run with the wrong arguments, it should at least say something like this: Usage: samba-foo [OPTIONS] For many samba scripts, especially without a server environment, having no arguments is the wrong arguments. Here we look for every executable file with '#![...]python[3]' on the first line, and exclude certain files and directories that have excuses to fail the test. For example, many selftest scripts are stream-oriented and will hang forever waiting for stdin, which is not an error. Some test modules are designed so they can be optionally run from the command line, but this option is typically only used by the developer who is writing them. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/selftest/tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 6216ee52150..1a7e8c757f0 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -1322,3 +1322,5 @@ planoldpythontestsuite("proclimitdc",
os.path.join(srcdir(), 'python/samba/tests')],
extra_args=['-U"$USERNAME%$PASSWORD"'],
name="samba.tests.process_limits")
+
+planoldpythontestsuite("none", "samba.tests.usage")