Closed Bug 1618286 Opened 5 years ago Closed 5 years ago

mozdevice unit tests fail if `adb features` lists more than cmd and shell_v2

Categories

(Testing :: Mozbase Rust, defect, P3)

Version 3
All
Unspecified
defect

Tracking

(firefox76 fixed)

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: barret, Assigned: barret, Mentored)

Details

(Whiteboard: [lang=rust])

Attachments

(1 file)

The unit test for feature detection checks that the set of features provided by adb is exactly cmd and shell_v2. If any other features are present, the test fails.

Ideally, we should be checking that the returned set of features contains the subset {shell_v2, cmd} instead.

Are you running it against a real device or which version of the emulator?

Priority: -- → P3

I am running this against a real device (Pixel 4 XL). Testing against a Moto G5 works fine.

Yeah, that would explain it. When I wrote those tests the reference was the Android emulator which is what we mostly run in CI for non-performance tests.

So yes, checking for a subset of features in the following test sounds fine to me:
https://searchfox.org/mozilla-central/rev/49ed791eec93335abfe6c2880f84c324e73e47e6/testing/mozbase/rust/mozdevice/src/test.rs#98-107

Mentor: hskupin
Whiteboard: [lang=rust]
Assignee: nobody → brennie
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/182f411b6a71 Test for subset of adb features in unit test, not exact set r=whimboo,webdriver-reviewers
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: