diff options
Diffstat (limited to 'source4/scripting/swig/torture/pytorture')
-rwxr-xr-x | source4/scripting/swig/torture/pytorture | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source4/scripting/swig/torture/pytorture b/source4/scripting/swig/torture/pytorture new file mode 100755 index 0000000000..89ecfbabcf --- /dev/null +++ b/source4/scripting/swig/torture/pytorture @@ -0,0 +1,37 @@ +#!/usr/bin/python + +from optparse import OptionParser + +# Parse command line + +parser = OptionParser() + +parser.add_option("-b", "--binding", action="store", type="string", + dest="binding") + +parser.add_option("-d", "--domain", action="store", type="string", + dest="domain") + +parser.add_option("-u", "--username", action="store", type="string", + dest="username") + +parser.add_option("-p", "--password", action="store", type="string", + dest="password") + +(options, args) = parser.parse_args() + +if not options.binding: + parser.error('You must supply a binding string') + +if not options.username or not options.password or not options.domain: + parser.error('You must supply a domain, username and password') + +binding = options.binding +domain = options.domain +username = options.username +password = options.password + +# Run tests + +import samr +samr.runtests(binding, domain, username, password) |