samba-tool: Put full command and subcommand in informative name when testing samba...
authorAndrew Bartlett <abartlet@samba.org>
Mon, 18 Jul 2016 03:47:03 +0000 (15:47 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 Jul 2016 11:41:11 +0000 (13:41 +0200)
These are not used for anything other than to print in the usage, but
it seems nicer to match normal invocation of these commands

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/tests/samba_tool/base.py

index b71a5b39338149b0ea98b565a9cc7ddf0071fd0a..de6cf18434811506ba663f3a7026776462051cf3 100644 (file)
@@ -67,7 +67,7 @@ class SambaToolCmdTest(samba.tests.BlackboxTestCase):
         cmd = cmd_sambatool.subcommands[name]
         cmd.outf = StringIO()
         cmd.errf = StringIO()
-        result = cmd._run(name, *args)
+        result = cmd._run("samba-tool %s" % name, *args)
         return (result, cmd.outf.getvalue(), cmd.errf.getvalue())
 
     def runsubcmd(self, name, sub, *args):
@@ -78,7 +78,7 @@ class SambaToolCmdTest(samba.tests.BlackboxTestCase):
         cmd = cmd_sambatool.subcommands[name].subcommands[sub]
         cmd.outf = StringIO()
         cmd.errf = StringIO()
-        result = cmd._run(name, *args)
+        result = cmd._run("samba-tool %s %s" % (name, sub), *args)
         return (result, cmd.outf.getvalue(), cmd.errf.getvalue())
 
     def assertCmdSuccess(self, val, msg=""):