Closed
Bug 1499511
Opened 6 years ago
Closed 6 years ago
[mozdevice] Support single-quotes in adb command line
Categories
(Testing :: Mozbase, enhancement)
Tracking
(firefox64 fixed)
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: gbrown, Assigned: bc)
References
Details
Attachments
(2 files)
1.60 KB,
patch
|
gbrown
:
review+
|
Details | Diff | Splinter Review |
1.40 KB,
patch
|
bc
:
review+
|
Details | Diff | Splinter Review |
In bug 1475648, we've found that the jittest command line may have single-quotes in it; currently it looks like they are lost. They should probably be escaped by _escape_command_line().
Reporter | ||
Comment 1•6 years ago
|
||
My first attempt was not successful:
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&revision=fc79d067e129e83dbb152304289c0d7056d274a8
Assignee: nobody → gbrown
Blocks: arm64-baseline-tests
Assignee | ||
Comment 2•6 years ago
|
||
I got it running locally and see the syntax errors but my first attempt to fix it didn't work either. Dealing with passing these commands around and getting them work in the shell may be tricky. If you get to home plate first, you win the pennant.
Assignee | ||
Comment 3•6 years ago
|
||
- don't quote already quoted elements of cmd
- expand the list of quotable characters and use the regular expression
[ ()\"&'\]]
- use " to quote
before and after android jit look good on try. doing a full android test now
<https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&author=bclary%40mozilla.com&group_state=expanded&fromchange=933c28ccafc2d094fc856739cd81ebdf72837d0c&tochange=65be8c13e7535eeacecf6b6183ad74b6d0d3bf7a>
Attachment #9017823 -
Flags: review?(gbrown)
Reporter | ||
Comment 4•6 years ago
|
||
Comment on attachment 9017823 [details] [diff] [review]
bug-1499511-escape-command-line.patch
Review of attachment 9017823 [details] [diff] [review]:
-----------------------------------------------------------------
Nice. I was heading toward this type of solution last night, but couldn't quite get it to work. Your try run looks great!
I have a simple unit test for _escape_command_line() on the go; I'll attach a patch later today.
Attachment #9017823 -
Flags: review?(gbrown) → review+
Reporter | ||
Updated•6 years ago
|
Assignee: gbrown → bob
Pushed by bclary@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/02d89c011037
[mozdevice] Support single-quotes in adb command line, r=gbrown.
Reporter | ||
Comment 6•6 years ago
|
||
I'm happy to add more cases if you like.
Attachment #9017930 -
Flags: review?(bob)
Comment 7•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Assignee | ||
Comment 8•6 years ago
|
||
Comment on attachment 9017930 [details] [diff] [review]
simple unit test
Review of attachment 9017930 [details] [diff] [review]:
-----------------------------------------------------------------
r+, lgtm.
Attachment #9017930 -
Flags: review?(bob) → review+
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/73466d27dd00
Add unit test for adb.py _escape_command_line; r=bc
Comment 10•6 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•