Fetch traces async

Due to the large amount of traces on flicker, the tests take 15min+ to copy the files from the device to the host after the test execution. Instead, start copying the files asynchronously.

It is not possible to use the async mechanism from Tradefed's FilePullerLogCollector because it either: (1) pushes the files form the directory multiple times -- once per test -- creating a lot of duplicates; or (2) cleans up the directory without checking for new files, losing some files.

This CL creates an asynchronous file upload mechanism for flicker using coroutines

Bug: 216111397
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I5bbae834cf3439950626823c6b665c733e27e517
This commit is contained in:
Nataniel Borges
2022-02-01 20:01:59 +01:00
parent 1826221d68
commit ccc875cc97
2 changed files with 16 additions and 0 deletions

View File

@@ -26,7 +26,15 @@
<option name="shell-timeout" value="6600s" />
<option name="test-timeout" value="6000s" />
<option name="hidden-api-checks" value="false" />
<option name="device-listeners"
value="com.android.server.wm.flicker.TraceFileReadyListener" />
</test>
<metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
<option name="pull-pattern-keys" value="(\w)+\.winscope" />
<option name="pull-pattern-keys" value="(\w)+\.mp4" />
<option name="collect-on-run-ended-only" value="false" />
<option name="clean-up" value="true" />
</metrics_collector>
<metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
<option name="directory-keys" value="/sdcard/flicker" />
<option name="collect-on-run-ended-only" value="true" />

View File

@@ -26,7 +26,15 @@
<option name="shell-timeout" value="6600s" />
<option name="test-timeout" value="6600s" />
<option name="hidden-api-checks" value="false" />
<option name="device-listeners"
value="com.android.server.wm.flicker.TraceFileReadyListener" />
</test>
<metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
<option name="pull-pattern-keys" value="(\w)+\.winscope" />
<option name="pull-pattern-keys" value="(\w)+\.mp4" />
<option name="collect-on-run-ended-only" value="false" />
<option name="clean-up" value="true" />
</metrics_collector>
<metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
<option name="directory-keys" value="/sdcard/flicker" />
<option name="collect-on-run-ended-only" value="true" />