New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 627284 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Improve user experience for adding a test bed

Project Member Reported by sbasi@chromium.org, Jul 11 2016

Issue description

Adding KrisR as FYI.

To add a testbed now you need to do:
atest host create localhost -i serials=92c52320\\,90cc2318

Lets adjust it so we users of testbeds don't need to know the special magic to add a test bed.

It should allow for this:
atest host create localhost -i serials=92c52320,90cc2318

 
Status: Started (was: Untriaged)
Since commas are not allowed in attribute keys (a-z, A-Z, 0-9 and _ are acceptable) I could change the regex to match a key=value pair followed by either the end of the string or a comma and another key=value pair. Escaping commas in values would not be necessary but it would look a little ugly when setting multiple attributes when one value contains commas.

As an example: '-i serials=foo,bar,other_attribute=zip' would set serials = foo,bar and other_attribute = zip.

I'll post a CL shortly.
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/9261f9f6076df5ad0588553f65a40d0406e9881b

commit 9261f9f6076df5ad0588553f65a40d0406e9881b
Author: Justin Giorgi <jgiorgi@google.com>
Date: Tue Jul 12 00:48:52 2016

[autotest] Improved atest attribute matching.

Commas in values no longer need to be escaped. Multiple attributes are
now passed by repeating the argument ie: -i foo=bar -i baz=zip,bang

BUG= chromium:627284 
TEST=Added unit test.

Change-Id: I9c975dc451fba19536804b853fcb25fd00b8f716
Reviewed-on: https://chromium-review.googlesource.com/359953
Commit-Ready: Justin Giorgi <jgiorgi@google.com>
Tested-by: Justin Giorgi <jgiorgi@google.com>
Reviewed-by: Simran Basi <sbasi@chromium.org>

[modify] https://crrev.com/9261f9f6076df5ad0588553f65a40d0406e9881b/cli/host_unittest.py
[modify] https://crrev.com/9261f9f6076df5ad0588553f65a40d0406e9881b/cli/host.py

Status: Fixed (was: Started)
Labels: VerifyIn-54
Status: Verified (was: Fixed)
bulk verified

Sign in to add a comment