提交 2c8122e5 编写于 作者: L Lukáš Doktor

avocado.plugins.remote: Add --remote-no-copy argument

This argument disables copying the tests and only executes the tests as
they are specified inside the remote or vm machine.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 8883765a
......@@ -121,6 +121,8 @@ class RemoteTestResult(HumanTestResult):
"""
# TODO: Use `avocado.loader.TestLoader` instead
self.remote.makedir(self.remote_test_dir)
if self.args.remote_no_copy: # Leave everytihng as is
return
paths = set()
for i in xrange(len(self.urls)):
url = self.urls[i]
......@@ -193,6 +195,11 @@ class RunRemote(plugin.Plugin):
dest='remote_password', default=None,
help='Specify the password to login on'
' remote machine')
self.remote_parser.add_argument('--remote-no-copy',
dest='remote_no_copy',
action='store_true',
help="Don't copy tests and use the "
"exact uri on guest machine.")
self.configured = True
@staticmethod
......
......@@ -71,6 +71,7 @@ class VMTestResult(RemoteTestResult):
self.args.remote_hostname = self.args.vm_hostname
self.args.remote_username = self.args.vm_username
self.args.remote_password = self.args.vm_password
self.args.remote_no_copy = self.args.vm_no_copy
super(VMTestResult, self).setup()
except Exception:
self.tear_down()
......@@ -122,6 +123,11 @@ class RunVM(plugin.Plugin):
default=False,
help='Restore VM to a previous state, '
'before running tests')
self.vm_parser.add_argument('--vm-no-copy',
dest='vm_no_copy',
action='store_true',
help="Don't copy tests and use the "
"exact uri on VM machine.")
self.configured = True
@staticmethod
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册