Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced device filter #526

Open
mabae opened this issue Jun 14, 2021 · 2 comments
Open

Enhanced device filter #526

mabae opened this issue Jun 14, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@mabae
Copy link
Contributor

mabae commented Jun 14, 2021

Is your feature request related to a problem? Please describe.
Device filtering is currently possible in the Gradle plugin based on the serial number only.

Describe the solution you'd like
A filtering on further device attributes, such as model, with a syntax similar to the filteringConfiguration. For example:
Kotlin DSL

deviceFilteringConfiguration {
  allowlist {
    add(DeviceSerialFilter("A.*".toRegex()))
  }
  blocklist {
    add(DeviceModelFilter("^B.*".toRegex()))
  }
}

YAML:

deviceFilteringConfiguration:
allowlist:
  - type: "serial"
    regex: "A.*"
blocklist:
  - type: "model"
    regex: "^B.*"

Describe alternatives you've considered
none

Additional context
Parameters deprecated by this enhancement: includeSerialRegexes, excludeSerialRegexes.

@mabae mabae added the enhancement New feature or request label Jun 14, 2021
@Malinskiy
Copy link
Member

Hey @mabae. Thanks for this request, I've been waiting for a use-case to expand the device filtering logic.
Currently every device is expected to report:

val operatingSystem: OperatingSystem
val serialNumber: String
val model: String
val manufacturer: String
val networkState: NetworkState
val deviceFeatures: Collection<DeviceFeature>
val healthy: Boolean
val abi: String

From your request you seem to be interested in model and serialNumber only, is that correct?

@mabae
Copy link
Contributor Author

mabae commented Jun 15, 2021

The snippets above with model and serialNumber are just examples. The suggested device filtering syntax is inspired by the test filtering syntax. I think it would be good to cover all attributes of the device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants