google / mobly

E2E test framework for tests with complex environment requirements.
https://github.com/google/mobly
Apache License 2.0
621 stars 174 forks source link

Skip starting logcat service for fastboot devices #874

Closed SurajH1 closed 1 year ago

SurajH1 commented 1 year ago

This change is Reviewable

SurajH1 commented 1 year ago

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @SurajH1)

_mobly/controllers/android_device.py line 119 at r1 (raw file):_

  for serial in list_fastboot_devices():
    try:
      device = get_devices(ads, serial=serial)[0]

You shouldn't do this as it's instantiating some devices twice. It should be doable by simply checking the serials?

Are you referring to get_devices? get_devices is just going through the list of devices and returning which ones have the serial specified by checking the attribute of the device. This would be the same as checking serials.

xpconanfan commented 1 year ago

I have uploaded a different solution for this https://github.com/google/mobly/pull/881

It adds the API needed for other services to check this.

xpconanfan commented 1 year ago

Closing as this is fixed by #881