Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Issue 2899093002: [devil] Allow instantiation of AdbWrapper with USB bus identifer.

Created:
3 years, 7 months ago by kavefish
Modified:
3 years, 5 months ago
CC:
catapult-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

[devil] Allow instantiation of AdbWrapper with USB bus identifier. Adb allows selection of a device using both a serial number and the device's USB bus identifier. This change makes it possible to create an AdbWrapper instance using a USB bus identifier in addition to a serial number. This option is required when multiple connected devices present the same serial number. Bug: catapult:#3595

Patch Set 1 : [devil] Refactor AdbWrapper.GetState() to support USB ids #

Total comments: 12

Patch Set 2 : [devil] Reorganize comments and add warning when instantiating an AdbWrapper from USB id. #

Total comments: 1

Patch Set 3 : Allow instantiation of AdbWrapper with USB ID, with revised tests #

Total comments: 9

Patch Set 4 : Allow AdbWrapper to specify devices using either serial number or USB id. serial number #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -25 lines) Patch
M devil/devil/android/sdk/adb_wrapper.py View 1 2 3 2 chunks +18 lines, -4 lines 0 comments Download
M devil/devil/android/sdk/adb_wrapper_test.py View 1 2 3 1 chunk +82 lines, -21 lines 4 comments Download

Messages

Total messages: 44 (18 generated)
rnephew (Reviews Here)
John, is this scenario one we care about supporting in devil? https://codereview.chromium.org/2899093002/diff/1/devil/devil/android/sdk/adb_wrapper.py File devil/devil/android/sdk/adb_wrapper.py (right): ...
3 years, 6 months ago (2017-05-24 22:53:19 UTC) #8
rnephew (Reviews Here)
This CL does not do anything for how we instantiate AdbWrapper objects. It only changes ...
3 years, 6 months ago (2017-05-24 23:04:53 UTC) #9
kavefish
On 2017/05/24 22:53:19, rnephew (Reviews Here) wrote: > It looks like your change would break ...
3 years, 6 months ago (2017-05-25 04:28:50 UTC) #10
kavefish
On 2017/05/24 23:04:53, rnephew (Reviews Here) wrote: > This CL does not do anything for ...
3 years, 6 months ago (2017-05-25 04:48:12 UTC) #11
perezju
On 2017/05/25 04:48:12, kavefish wrote: > On 2017/05/24 23:04:53, rnephew (Reviews Here) wrote: > > ...
3 years, 6 months ago (2017-05-25 09:34:14 UTC) #12
rnephew (Reviews Here)
Ah. I missed the -l being passed. Thats where my misconceptions came from. At the ...
3 years, 6 months ago (2017-05-26 00:42:39 UTC) #13
rnephew (Reviews Here)
Well shoot. There are no existing unittests for this. If you look at the existing ...
3 years, 6 months ago (2017-05-26 00:45:03 UTC) #16
kavefish
> At the very least we need a unittest to test this change. I'm thinking ...
3 years, 6 months ago (2017-05-29 12:44:30 UTC) #20
kavefish
On 2017/05/26 00:45:03, rnephew (Reviews Here) wrote: > Well shoot. There are no existing unittests ...
3 years, 6 months ago (2017-05-29 12:49:58 UTC) #21
kavefish
> > At the very least we need a unittest to test this change. > ...
3 years, 6 months ago (2017-05-30 10:58:32 UTC) #22
perezju
I would suggest trying to keep this change small and self contained. For the unit ...
3 years, 6 months ago (2017-05-30 11:11:58 UTC) #23
kavefish
Thanks for the suggestions. I attempted to go small rather than get ambitious. In adb_wrapper.py ...
3 years, 6 months ago (2017-05-30 17:42:44 UTC) #27
rnephew (Reviews Here)
I just tried running your patch locally, and the tests fail. You can run the ...
3 years, 6 months ago (2017-05-30 18:21:12 UTC) #28
kavefish
On 2017/05/30 18:21:12, rnephew (Reviews Here) wrote: > I just tried running your patch locally, ...
3 years, 6 months ago (2017-05-30 19:26:33 UTC) #29
kavefish
Pushing responses to comments... https://codereview.chromium.org/2899093002/diff/1/devil/devil/android/sdk/adb_wrapper.py File devil/devil/android/sdk/adb_wrapper.py (right): https://codereview.chromium.org/2899093002/diff/1/devil/devil/android/sdk/adb_wrapper.py#newcode123 devil/devil/android/sdk/adb_wrapper.py:123: device_serial: The device serial number ...
3 years, 6 months ago (2017-05-30 19:27:20 UTC) #30
rnephew (Reviews Here)
If its because its having problems finding adb, I wonder why only the 5 new ...
3 years, 6 months ago (2017-05-30 19:40:33 UTC) #31
kavefish
On 2017/05/30 19:40:33, rnephew (Reviews Here) wrote: > If its because its having problems finding ...
3 years, 6 months ago (2017-05-30 20:02:22 UTC) #32
rnephew (Reviews Here)
> > I just thought that the return value from adb we would want would ...
3 years, 6 months ago (2017-05-30 20:14:58 UTC) #33
rnephew (Reviews Here)
https://codereview.chromium.org/2899093002/diff/80001/devil/devil/android/sdk/adb_wrapper_test.py File devil/devil/android/sdk/adb_wrapper_test.py (right): https://codereview.chromium.org/2899093002/diff/80001/devil/devil/android/sdk/adb_wrapper_test.py#newcode23 devil/devil/android/sdk/adb_wrapper_test.py:23: '_RunDeviceAdbCmd', This is the method that has its return ...
3 years, 6 months ago (2017-05-30 20:15:05 UTC) #34
kavefish
On 2017/05/30 20:14:58, rnephew (Reviews Here) wrote: > Ah. I think this is where the ...
3 years, 6 months ago (2017-05-31 19:01:38 UTC) #35
kavefish
On 2017/05/31 19:01:38, kavefish wrote: > On 2017/05/30 20:14:58, rnephew (Reviews Here) wrote: > > ...
3 years, 6 months ago (2017-06-11 09:58:03 UTC) #38
perezju
Thanks for the changes! These are looking good. I've just added a few nits and ...
3 years, 6 months ago (2017-06-12 03:26:24 UTC) #39
kavefish
Hey there, I could be misunderstanding, but it appears to me that mocking at the ...
3 years, 6 months ago (2017-06-18 10:59:01 UTC) #40
rnephew (Reviews Here)
https://codereview.chromium.org/2899093002/diff/100001/devil/devil/android/sdk/adb_wrapper_test.py File devil/devil/android/sdk/adb_wrapper_test.py (right): https://codereview.chromium.org/2899093002/diff/100001/devil/devil/android/sdk/adb_wrapper_test.py#newcode92 devil/devil/android/sdk/adb_wrapper_test.py:92: 'usb:1-2.3'], []] On 2017/06/18 10:59:01, kavefish wrote: > On ...
3 years, 6 months ago (2017-06-19 15:30:03 UTC) #41
kavefish
On 2017/06/19 15:30:03, rnephew (Reviews Here) wrote: > https://codereview.chromium.org/2899093002/diff/100001/devil/devil/android/sdk/adb_wrapper_test.py > File devil/devil/android/sdk/adb_wrapper_test.py (right): > > ...
3 years, 5 months ago (2017-07-03 19:50:11 UTC) #43
perezju
3 years, 5 months ago (2017-07-04 08:24:01 UTC) #44
https://codereview.chromium.org/2899093002/diff/120001/devil/devil/android/sd...
File devil/devil/android/sdk/adb_wrapper_test.py (right):

https://codereview.chromium.org/2899093002/diff/120001/devil/devil/android/sd...
devil/devil/android/sdk/adb_wrapper_test.py:46: 'for settings to take effect'
nit: bad indent; try something like:

mock_return_value = (
    'Verity disabled on /system\nNow reboot your device'
    'for settings to take effect')

https://codereview.chromium.org/2899093002/diff/120001/devil/devil/android/sd...
devil/devil/android/sdk/adb_wrapper_test.py:57: 'for settings to take effect'
nit: bad indent.

https://codereview.chromium.org/2899093002/diff/120001/devil/devil/android/sd...
devil/devil/android/sdk/adb_wrapper_test.py:82: mock_return_value = 'List of
devices attached\n' \
nit: break long string using parenthesis, so you don't need to add the \ at the
end of each of line.

https://codereview.chromium.org/2899093002/diff/120001/devil/devil/android/sd...
devil/devil/android/sdk/adb_wrapper_test.py:83: 'PLACEHOLDER       no
permissions (verify udev ' \
On the real adb output the PLACEHOLDER will always be a device serial and not an
usb id. Right? Why not write directly "ABC12345678" and avoid doing the extra
replace?

Powered by Google App Engine
This is Rietveld 408576698