Assigned
Status Update
Comments
cc...@google.com <cc...@google.com> #2
When I run Macrobenchmark via the `connectedCheck` target with info logs on, I can see the arg being set:
```
INFO: Configuring Android Instrumentation driver: android_instrumentation_runtime {
instrumentation_info {
...
args_map {
key: "androidx.benchmark.suppressErrors"
value: "DEBUGGABLE"
}
}
}
```
Attempted to pass the flag via the `-e` option to the `instrument` command of ADB, but no change to error output:
```
$ adb shell am instrument -w com.ring.benchmark/androidx.test.runner.AndroidJUnitRunner -e androidx.benchmark.suppressErrors DEBUGGABLE
...
ERROR: Benchmark Target is Debuggable
```
```
INFO: Configuring Android Instrumentation driver: android_instrumentation_runtime {
instrumentation_info {
...
args_map {
key: "androidx.benchmark.suppressErrors"
value: "DEBUGGABLE"
}
}
}
```
Attempted to pass the flag via the `-e` option to the `instrument` command of ADB, but no change to error output:
```
$ adb shell am instrument -w com.ring.benchmark/androidx.test.runner.AndroidJUnitRunner -e androidx.benchmark.suppressErrors DEBUGGABLE
...
ERROR: Benchmark Target is Debuggable
```
ys...@google.com <ys...@google.com> #3
Are you seeing a line like the following? :
ERRORS (not suppressed): ...
WARNINGS (suppressed): ...
Can you try suppressing other errors, does that work? E.g. run the macrobenchmark on an emulator, which should require adding "EMULATOR" to the suppression list, and show it as a suppressed warning.
Description
Version used: Macrobenchmark
Very speculative request, I understand if out of scope. Feel free to close with prejudice.
For Wear devices on a charger, for accurate testing we would ideally
- start the test
- confirm it's running
- invoke a lifecycle hook allowing developers to disconnect the USB charger programmatically
- wait for the expected duration of the test
- invoke a lifecycle hook allowing developers to reconnect the USB charger programmatically
- Confirm test completed and collect results
My observation is that macrobenchmark test fail if ADB connections are lost. Is it feasible to
1) Have these hooks in Macrobenchmark,
2) or an alternative custom runner using the macrobenchmark library
3) Have tests run while disconnected
An alternative idea would just be an on device macrobenchmark launcher app that performs the same role as the gradle command. How much logic would that involve duplicating?