summaryrefslogtreecommitdiff
path: root/cli/cros/tests
diff options
context:
space:
mode:
authorYiming Chen <yimingc@chromium.org>2015-04-29 11:25:24 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-04-30 02:31:14 +0000
commit818d8f2ed0b05aa34e57fa952958cd5c5a4e47c0 (patch)
tree96e3f6daaac382e1d55cc21d039ff93ac221602b /cli/cros/tests
parentac5297760647346282833892967b2ac44015d31a (diff)
downloadchromite-818d8f2ed0b05aa34e57fa952958cd5c5a4e47c0.tar.gz
command_vm_test: Add devices command test.
Add the devices command test and remove SSHConnectionError handling. BUG=brillo:526 TEST=Manual tests and tryjob Change-Id: I7320a0e14c9949f7ec72c57588639de472ce9cda Reviewed-on: https://chromium-review.googlesource.com/267839 Reviewed-by: David Pursell <dpursell@chromium.org> Commit-Queue: Yiming Chen <yimingc@chromium.org> Tested-by: Yiming Chen <yimingc@chromium.org>
Diffstat (limited to 'cli/cros/tests')
-rw-r--r--cli/cros/tests/cros_vm_test.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/cros/tests/cros_vm_test.py b/cli/cros/tests/cros_vm_test.py
index 8e1ec0e95..ca7fb8a16 100644
--- a/cli/cros/tests/cros_vm_test.py
+++ b/cli/cros/tests/cros_vm_test.py
@@ -29,7 +29,11 @@ class CrosVMTest(command_vm_test.CommandVMTest):
if opt_args:
cmd.extend(opt_args)
if device:
- cmd.append(device)
+ if command == 'devices':
+ # The device argument is optional for 'cros devices' command.
+ cmd.extend(['--device', device])
+ else:
+ cmd.append(device)
if pos_args:
cmd.extend(pos_args)
return cmd