src/tests/py_utils/android_helper.py


Log

Author Commit Date CI Message
Roman Lavrov b7bd0808 2022-06-06T10:54:30 Support running end2end tests. There is no batching though so all tests matching the filter will be ran at once which will block without any output until evertyhing is done (android runner runs tests in batches of 256 IIRC). Also make suite arg positional and explicitly list supported tests. Bug: angleproject:6854 Change-Id: Ibe108f24d6c3ec8b966eda1cf9ae92119a517548 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3691048 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Roman Lavrov b71c6427 2022-05-31T16:23:51 Add a wrapper script to run traces using android_helper. Also add missing `appops set MANAGE_EXTERNAL_STORAGE` that appears to be necessary on newer builds (catapult does it starting from Android 11). Add a hash check to skip transferring .gz files that are already there. Bug: angleproject:6854 Change-Id: Ib612d1235fe1274b8fea47718af8389e8810d34e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3679486 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Auto-Submit: Roman Lavrov <romanl@google.com>
Roman Lavrov c9794d6c 2022-04-27T14:20:47 Run a smoke test in each shard and crash on timeouts. The smoke test (words_with_friends_2) typically takes only a few seconds to run. Run it first to check that everything is working as intended. As we know it's a short test, we can set a small timeout (60s) and fail early in case something goes wrong. This will speed up tests failures when something is completely broken. I also changed the main shard run to crash when timeout is detected instead of just dumping debug info as if the tests didn't finish in 10 minutes they're also unlikely to finish in the 20 minutes after which swarming times out the shard. Bug: angleproject:7242 Change-Id: Ia99ca4b2e1676d09b9ff7d67ab116aba94f66512 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3611446 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 0c59b5d9 2022-04-26T19:20:49 Log debuggerd $PID output when instrumentation gets stuck. Bug: angleproject:7242 Change-Id: I2b12e94177bce65acf68e4420fd1fcabffdb993e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3607499 Auto-Submit: Roman Lavrov <romanl@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Roman Lavrov d0c8363e 2022-04-26T11:51:47 Dump logcat if instrumentation doesn't finish in 10 minutes. Let's see if this helps us understand stuckness as described in https://anglebug.com/6854#c46 Normally each instrumentation call takes way less than 10 minutes as we run tests individually or in small batches. When stuck, runner times out after 20 minutes. Bug: angleproject:6854 Change-Id: I20074db0fb3e783555a530b9ecef3765f1911fd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605763 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Roman Lavrov c0ac374f 2022-04-25T14:06:58 Replace `adb exec-out cat` with pull to temp location. Flaked here: https://chromium-swarm.appspot.com/task?id=5a7a6cbff20e8510 File "/b/swarming/w/ir/src/tests/py_utils/android_helper.py", line 86, in _ReadDeviceFile assert len(out) == expected_size, 'exec-out mismatch' AssertionError: exec-out mismatch Bug: angleproject:6854 Change-Id: I846474cb64c436a67bbc559839d41967108be8c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3606328 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Roman Lavrov d1788614 2022-04-22T15:52:16 Use adb instead of catapult to run perf tests on Android. Add support for replacing flags: --isolated-script-test-output --isolated-script-test-perf-output --render-test-output-dir Always set --isolated-script-test-output to check for test failures using num_failures_by_type, interrupted, is_unexpected fields. Bug: angleproject:6854 Change-Id: Ia701f4d4d5d1adc9a24c057bb5c58fd5457cbd65 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3602834 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov e6fc5e62 2022-04-22T12:45:33 Use _FindAdb (cached) directly instead of Adb wrapper. A little simpler, no need to pass around an additional `apk` arg. Also fix missed _GetAdbRoot() call. Bug: angleproject:6854 Change-Id: Id64e5f35fb21a6aef7d99e614dc0eae753c24317 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3600912 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov d988db39 2022-04-22T11:14:44 Fall back to adb on PATH if platform-tools not present. Log adb --version. Example: INFO:root:adb --version: Android Debug Bridge version 1.0.41 Version 31.0.3-7562133 Installed as /{snip}/third_party/android_sdk/public/platform-tools/adb When not found -> "Installed as /usr/bin/adb" Bug: angleproject:6854 Change-Id: I3c19c4eda2211480f2c93b7d14f72f5641b3bfc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3602821 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 7c091cb3 2022-04-19T21:12:35 Use adb directly (instead of catapult) in gold tests. Android detected by angle_perftests apk presence relative to pwd. All of the restricted_traces/*/*.json files are copied but those are small. Only the necessary .angledata.gz files are copied. angle_system_info_test is also handled via adb. Bug: angleproject:6854 Change-Id: I7a89ff57fcdd8ce5dc63a5e3a8f5c0132f766894 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3595241 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>