Android: Update script with sync progress
When running lots of traces, there can be a long pause
when syncing traces to the device.
Add a small update so it is clear that work is happening.
Example output:
I12:21:51.806619Z Syncing 1945_air_force trace (1/238)
I12:21:52.178401Z Syncing 20_minutes_till_dawn trace (2/238)
I12:21:52.463608Z Syncing 2_3_4_player_mini_games trace (3/238)
...
Test: angle_trace_tests
Bug: b/276742336
Change-Id: Id81d69b3fc678cb94c2e683a907c44950ead2117
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4690745
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
diff --git a/src/tests/py_utils/android_helper.py b/src/tests/py_utils/android_helper.py
index f32b344..01e7c21 100644
--- a/src/tests/py_utils/android_helper.py
+++ b/src/tests/py_utils/android_helper.py
@@ -314,19 +314,23 @@
_AdbShell('run-as ' + TEST_PACKAGE_NAME + ' mkdir -p angle_traces')
# Set up each trace
- for trace in traces:
+ for idx, trace in enumerate(sorted(traces)):
+ logging.info('Syncing %s trace (%d/%d)', trace, idx + 1, len(traces))
+
path_from_root = 'src/tests/restricted_traces/' + trace + '/' + trace + '.angledata.gz'
_Push('../../' + path_from_root, path_from_root)
tracegz = 'gen/tracegz_' + trace + '.gz'
_Push(tracegz, tracegz)
- if _Global.traces_outside_of_apk:
- _PushLibToAppDir('libangle_trace_interpreter' + _Global.lib_extension)
- for trace in traces:
+ if _Global.traces_outside_of_apk:
lib_name = 'libangle_restricted_traces_' + trace + _Global.lib_extension
_PushLibToAppDir(lib_name)
+ # Push one additional file when running outside the APK
+ if _Global.traces_outside_of_apk:
+ _PushLibToAppDir('libangle_trace_interpreter' + _Global.lib_extension)
+
logging.info('Synced files for %d traces (%.1fMB, %d files already ok) in %.1fs', len(traces),
total_size / 1e6, skipped,
time.time() - start)