src/tests/py_utils


Log

Author Commit Date CI Message
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 ebfb9b9f 2022-04-26T10:37:52 Configure logging in perf and gold tests to include time. Currently no timestamp is logged: [I2022-04-25T18:45:14.761163Z 548 0 cmd_stream.go:336] {cmd} INFO:root:adb --version ... Before switching to android_helper relative timestamps in seconds were printed, set up by catapult. Timestamps proposed in this CL are more consistent with outer logging but keep prefix short. Example: [I2022-04-25T18:45:14.761163Z 548 0 cmd_stream.go:336] {cmd} I18:45:14.999999Z adb --version ... Bug: angleproject:6854 Change-Id: I8ef7c9ae44eb5dba564a41456ce9417e3fe0f06c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3606913 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
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 4ac3ec13 2022-04-22T12:15:51 Switch py_utils import to pathlib. os.stat path before adding just to catch future copy-paste mistakes. Bug: angleproject:6854 Change-Id: If58c46f99aca93e6aeda90a987ceebbbb1b66955 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3600911 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>
Roman Lavrov b5d34da0 2022-04-11T18:17:03 Add src/tests/py_utils/ for utils, angle_path_util for imports. Detect if angle or chromium checkout when adding deps paths, so that random paths from above angle_root don't get added to sys.path when imported from an angle checkout. Bug: angleproject:6854 Change-Id: I4cd3334a2313d921f8651de7056f4f3798b8e072 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3582978 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>