src/tests/py_utils/android_helper.py


Log

Author Commit Date CI Message
Alex Dean 3818d37d 2025-04-04T15:07:59 CL: Add end_capture to capture/replay tool Many different applications don't explicitly make it clear the ending frame of what's being run. With the end_capture utility, when the user sets end_capture to 0, the application automatically finishes the capture immediately. Example OpenCL applications where this is useful: AI-Benchmark, Geekbench Compute, Geekbench AI Bug: angleproject:402174922 Change-Id: I1710ae1b1703f710865a9862c4cf3de753c2ccbd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6339791 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Cody Northrop 2657dba2 2025-03-17T10:07:52 restricted_trace_perf: Use run-as when needed On non-rooted devices, commands that access storage need to use run-as. Test: restricted_trace_perf.py Bug: b/404239853 Change-Id: I38bc54c4f4eb9c986106e1773cb1e0796577eaeb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6361299 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Renato Pereyra f20fd2fe 2025-03-14T12:41:11 Tests: Make unpacked tarball files from tests world-readable If the origin system did not have these world-readable, tests can fail to open these files during runtime. Also makes SELinux warning in multiuser mode more noticeable since permissive mode is necessary for the test to run successfully. Bug: b/403616641 Change-Id: Id23ce572d46054fea60c03cfa9c30871ab5e50dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6357935 Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Renato Pereyra <renatopereyra@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Mark Lobodzinski d50cd35e 2025-02-20T08:29:07 Tests: Add expectations file for angle_trace_tests Skipping trace tests was handled in the TracePerfTest source and is now specified in angle_trace_tests_expectations.txt. Bug: b/398048048 Change-Id: Idbf5e95e74699374eb46330dc3880a0c2dfc9bc1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6302912 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Roman Lavrov 729b55ba 2025-03-04T10:45:34 Tests: Fix --gtest_repeat reporting Pass on intermediate Fail When running with --gtest_repeat=N, the same test is executed multiple times and the harness was overwriting a previous Fail status with a subsequent Pass. Also made Android logging more clear. Bug: None Change-Id: Ib1d71ca89e9e9b2af8f6a0df2c9e280b86143265 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6320657 Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Roman Lavrov f3404c4d 2024-11-14T18:47:18 Tests: improve Windows support in android_helper * Avoid using the Linux binary from platform-tools when running from a trace bundle, use adb.exe from PATH instead * Remove dependency on aapt with reading apk as zipfile * handle CRLF from adb shell output Bug: b/376300037 Change-Id: I4428e66aaa782d3e582c2562ebb3f6c206c4de5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6021260 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 54e8e665 2024-11-12T12:53:54 Trace tests: generate and use trace list according to gn args Generates out/<config>/gen/trace_list.json which contains the list of traces included in the build according to the angle_restricted_traces gn arg (or all traces if not set). Test runner uses that file instead of the full restricted_traces.json. Android runner pushes that file to the device to the usual location (e.g. /sdcard/chroimum_tests_root/gen/trace_list.json) This also fixes the issue where `angle_trace_tests --list-tests` lists all traces, not just those that were selected with the gn arg. Similarly, running all traces without a filter would be limited to the same list. This transitively applies to trace bundles. Bug: b/376923930 Change-Id: I63506a074d766a51b860472f7211842f8a080ecd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011956 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 2c7e9830 2024-11-04T10:05:25 restricted_trace_perf: Setup and wrapper support This CL adds support for installing and setting up traces. Also allows running via the wrapper in http://crrev/c/5985570 With this change, if you run without using the wrapper, you must provide the --build-dir flag. It allows running the script from any directory: --build-dir ../../../out/Android Bug: b/376300037 Change-Id: I2259ee120b2af5e1917a2a57a27fa3dcfca761e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5983806 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 47fafdb9 2024-11-04T10:05:12 Disable tracegz (trace interpreter) by default, remove from CI Trace interpreter is incomplete and we've been punting on it. Can be re-enabled with angle_enable_tracegz=true in gn args. This avoids accidentally pulling trace sources into builds. Bug: b/376300037 Change-Id: Ib755fa9f57885216b02a481fd670a1bb0266f0db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5987382 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov e43d3591 2024-11-01T16:23:27 Tests: allow choosing Chromium/our test runner + screen checks Chromium test runner (build/android/test_runner.py) is currently the default runner for most suites. One exception is angle_trace_tests where we're always using our scripts instead (android_helper.py etc). We do that by setting android_test_runner_script to our runner for that angle_test instance. This CL supports setting android_test_runner_script to our script but then choose whether to run with the Chromium runner or android_helper depending on the command-line arg (--angle-test-runner) This CL also adds a check for the screen state which will be performed regardless of the runner. This is to have a fast and clean failure when the device wasn't properly initialized by the infra (see bug). The check is based on the output of `dumpsys deviceidle | grep mScreen` (this is the most generic check I found, I previously used nfc but that depends on nfc and turns out the output is device-dependent) This CL enables this mode for angle_end2end_tests. Bots will continue to run with Chromium runner as before (but with the added screen checks). Locally, we will now be able to switch to our scripts directly: out/Android/angle_end2end_tests \ --gtest_filter='*ClearTextureEXT2DMSStencil*' \ --angle-test-runner Now when running end2end tests locally (regardless of the runner) with a locked device screen, we'll see the following error right away instead of sporadic failures or stuckness during execution: Exception: Unexpected device screen state: ['mScreenOn=false', 'mScreenLocked=true']; expected: ['mScreenOn=true', 'mScreenLocked=false'] The plan is to enable this mode for all suites, after which the current local script run_angle_android_test.py will no longer be needed. Bug: b/344849382 Change-Id: I77e7733804ab37e2f3d26bf3574a52a9553e4274 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5985232 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 3a265f14 2024-10-24T17:34:15 Android tests: raise if --render-test-output-dir doesn't exist For convenience when testing locally, otherwise we get an obscure error later on Bug: angleproject:370089935 Change-Id: I94f52aef90afb600baae45540e0e53f899554ee9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5960260 Auto-Submit: Roman Lavrov <romanl@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Roman Lavrov 3cabe8c2 2024-09-16T11:09:45 Tests: fix python assertion android_helper.py:43: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (cls.current_user != None, "Call _GetCurrentUser before using IsMultiUser") This does "assert x" where x=tuple (bool, str) and is never falsey Bug: b/361388557 Change-Id: I79a2d07ac59d611cf5e47f54f3ddb6a336322655 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5866133 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Auto-Submit: Roman Lavrov <romanl@google.com>
Cody Northrop e19377af 2024-08-21T14:52:09 Tests: Support multiple users on Android On most Android platforms, the userId is '0' and many of our defaults just work. But on some, the default is non-zero, and that complicates things. To support this, we have to specify which user is correct, which can be determined with: adb shell am get-current-user Update everywhere we were using sdcard directly and use: Before: /sdcard After: /storage/emulated/<userId> Incorporate the userId to find the application's home directory: Before: /data/data/com.android.angle.test After: /data/user/<userId>/com.android.angle.test This CL: - Starts using a user flag in our Android scripts - Updates where tests look for test data and binaries - Updates where scripts use temp and external storage - Updates script to not use sdcard at all when root - Disables run-as when user is not default Bug: b/361388557 Change-Id: I0fb556ecb2d0f6bc6569a858c290b127217d4638 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5825122 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Roman Lavrov da0b30f0 2024-06-07T10:00:37 Android perf tests: add temp-based throttling to pixel6 bots. Seems like we don't have sufficient airflow to run heavy tests at full throttle. Some shards start >10C hotter, so add custom throttling to avoid aggressive throttling by the phone itself skewing perf results. This might noticeably increase shard runtime on bots with poor airflow. Implementation is similar to https://crrev.com/c/5288455 but relies on data available on current bot OS build (no IThermal) and does _not_ disable phone throttling. Bug: b/345514719 Change-Id: I582838c2448c9b014381a4f8ba847343b68e4d3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5608312 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 3ab0cbfd 2024-06-06T15:41:51 Perf tests: log /dev/thermal temps on Android Bug: b/345514719 Change-Id: Id72bcffc17454ec0d9c3043a2f1e0b51cbf4b4a3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5606162 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi e92b8e8d 2024-04-16T13:27:19 Manual roll VK-GL-CTS from 491cfc2dbec9 to b529676d0523 (1 revisions) https://chromium.googlesource.com/external/github.com/KhronosGroup/VK-GL-CTS.git/+log/491cfc2dbec9..b529676d0523 2024-03-29 yuxinhu@google.com Move external/openglcts/data into a new subdirectory If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll Please CC angle-team@google.com,syoussefi@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: None Change-Id: I5e07217cca190ec243f1b700348cde0384dbf052 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5457892 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 8482f44f 2024-03-25T12:21:48 android_helper cleanup: Inline test package name We continue using a single package name, inlining makes code easier to follow Bug: b/331179435 Change-Id: I45e42ba313a3cfaf97f00e1aeef4dcc3b5f9aedf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5391983 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 3ed8c5f4 2024-03-07T16:05:26 Android: workaround broken run-as due to /data permissions Bug: b/331179435 Change-Id: I4617b1724e08ad8ab24a91ac1378132fb6641be0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5354107 Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 4a5b9307 2024-03-07T08:57:12 android_helper: support angle_deqp_egl_tests Appears to just require that this dir exists: gen/vk_gl_cts_data/data/ Bug: b/328586468 Change-Id: Ic941ea9b99bc5c84663914c1e0a6ed9d91a35c58 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5352806 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
angle-autoroll 298abbc1 2024-02-16T08:50:43 Roll Chromium from 29bec8631d2f to 9d4a35b46e1e (1220 revisions) Amend the roll with http://crrev.com/c/5301614 courtesy agrieve@. https://chromium.googlesource.com/chromium/src.git/+log/29bec8631d2f..9d4a35b46e1e If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/chromium-angle-autoroll Please CC angle-team@google.com,geofflang@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Chromium: https://bugs.chromium.org/p/chromium/issues/entry To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/2cece96e17..a11ae4664a * buildtools/linux64: git_revision:a2e2717ea670249a34b0de4b3e54f268d320bdfa..git_revision:8b973aa51d02aa1ab327100007d4070c24b862b0 * buildtools/mac: git_revision:a2e2717ea670249a34b0de4b3e54f268d320bdfa..git_revision:8b973aa51d02aa1ab327100007d4070c24b862b0 * buildtools/win: git_revision:a2e2717ea670249a34b0de4b3e54f268d320bdfa..git_revision:8b973aa51d02aa1ab327100007d4070c24b862b0 * testing: https://chromium.googlesource.com/chromium/src/testing/+log/c37870b5fd..5e8f58ef80 * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/d353dfb095..984707e65c * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/f39e9d8c1a..ad0b8e7a0e * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/51589f432d..3d6c15240b * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/a5a09d23fa..b1b1a43f07 * third_party/fuchsia-sdk/sdk: version:18.20240207.3.1..version:18.20240215.1.1 * third_party/r8: tp4vVuXzmyHJxDFlwxDb7RYZLLEufc3EnGTyOTCTNkgC..f7pPpoVTaC3WoBY5dURVrI-N1_4YZpSYipdiDUeWDAEC * third_party/siso: git_revision:3cd0e6e55246b8eca6646e33b124e54e67fc5660..git_revision:4bede4f49669d3a8bdaa8dbd01620c3a07ae0c4e * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/894ad691c6..47756615f5 No update to Clang. Bug: angleproject:6081, chromium:324916799 Change-Id: Ib097e6dca9374111632838beab4f0224ff6196fc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5302166 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Roman Lavrov 2ba5bb12 2024-01-22T15:16:55 android_helper: fix corner-case byte/string mismatch When --isolated-script-test-output is provided and --list-tests is added, the string gets written to a file in binary mode raising an exception. Bug: None Change-Id: Id73ae49f849e0c1bd609d4b37ad39f5515e1f02b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5225485 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Roman Lavrov <romanl@google.com>
Roman Lavrov 49fd8eda 2023-10-20T14:23:38 android_helper: improve _RemovePrefix logging Random stuff gets in there sometimes, such as: "cmd: Failure calling service package: Broken pipe (32)" RemovePrefix just raises that it doesn't start with "package:" so the issue doesn't show up in logs. Bug: b/296921272 Change-Id: Ifae4e3c0c7717514401bf1109febf8e70fff6527 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4959473 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 1eccf863 2023-10-03T16:18:07 Handle non-debuggable com.android.angle.test on device Noticed in capture_tests on CI, and angle_perftests also runs into this. When a non-debuggable test apk is installed on the device the hash check fails as run-as does not work for non-debuggable apps. It's just an optimization to avoid re-installing the apk though, so just warn about the error and re-install the apk. Bug: b/303276423 Change-Id: Iecc68de285454043fc7f090163af373a22e11e41 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4910152 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 1249fc1f 2023-09-07T14:39:26 Tests: Support capture_tests on Android and enable on CI Enables angle_with_capture_by_default = true on Android bots similarly to Linux and Windows. Enables the capture test on Pixel 4 and 6 bots (it takes only a few seconds to run) Enables support for capture in android_helper in general. For example, this now works the same way it would on say Linux, but runs the capture on the device an pulls files to OUT_DIR. % ANGLE_CAPTURE_LABEL=gacha_club ANGLE_CAPTURE_OUT_DIR=/tmp/capt2 ANGLE_CAPTURE_FRAME_START=16 ANGLE_CAPTURE_FRAME_END=16 out/AndroidPerformance/angle_trace_tests --gtest_filter=TraceTest.gacha_club --use-angle=vulkan --retrace-mode --max-steps-performed=20 For end2end tests it's a bit trickier as we're still using the Chromium wrappers for e.g. out/AndroidPerformance/angle_end2end_tests - which is why capture_tests.py is currently using angle_android_test_runner.py Bug: b/296397568 Change-Id: I2606e74a17c90e381bb49ec8d555a6d24851b4f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850889 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov d41ac4da 2023-08-18T11:25:05 Cleanup: 'am instrument' readability and consistency Reconcile android_helper and restricted_trace_perf formatting of 'am instrument' command. The only real difference is that restricted_trace_perf uses 'shell=True' in subprocess which requires escaping spaces inside "" Bug: b/292249127 Change-Id: I002e49ae5b2913db46b92a7b643bc12d21abce1e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794430 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 2c624a5e 2023-08-17T15:36:37 android_helper cleanup: remove smoke test and timeout This was added to help debug cases of stuck tests on bots, but this doesn't seem to have happened in over a year and the code (and timeout) keeps getting in the way. Bug: angleproject:7242 Change-Id: Ic30d976408bd32a745d830921f6e4d98d17e863c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4789845 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov d85b2905 2023-08-15T16:50:03 Android: improve error message due to missing trace libs I think this only happens when angle_restricted_traces wasn't set in gn args, resulting in traces outside of the apk. Previously we'd get a confusing error about missing gen/tracegz... files, now we get this: I15:55:48.527742Z Syncing harry_potter_hogwarts_mystery trace (1/1) Error: missing library: libangle_restricted_traces_harry_potter_hogwarts_mystery.so Is angle_restricted_traces set in gn args? Also removed swallowing errors in _PushLibToAppDir, crashing seems better than running with out of date files. Bug: b/294861737 Change-Id: I5696f35a910f6db2310d90e112a83881af3a8f50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4781569 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 8e744e9f 2023-08-14T14:40:41 Android: support dEQP in android_helper and add bundle script Example: autoninja -C out/Android angle_deqp_gles31_tests && (cd out/Android; ../../src/tests/run_angle_android_test.py --suite=angle_deqp_gles31_tests --gtest_filter='dEQP-GLES31.functional.image_load_store.3d.*') For angle_deqp_bundle.py example usage see comments at the top of the file. Note: this change is not supposed to have any impact on CI. dEQP tests are still ran using Chromium's test runner, not android_helper. Bug: b/293590167 Change-Id: I605102ebea8b135f3239ffac012ce5dc13e84943 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776109 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 2fd33fc4 2023-07-17T17:07:52 Android: Make .gz sync faster by only checking last bytes In particular, some angledata.gz are hundreds of megabytes, which results in multiple seconds spend on some traces which adds up to a few minutes when running all traces. Gzip format includes an 8-byte trailer with the CRC-32 and the length of the uncompressed data https://en.wikipedia.org/wiki/Gzip#File_format Instead of checking hash(file) check hash(tail(file)). Check more than just 8 bytes (arbitrarily picked 4096) so that in a rare event of a collision we're still likely to see different bytes as compressed streams tend to diverge when data changes. This reduces the already-fully-synced sync from ~130s to ~60s in my tests. Bug: b/276742336 Change-Id: I899b80ac90ef4def498c8cb52d6b096d8b1ef826 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4691962 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 85095480 2023-07-17T12:31:48 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>
Roman Lavrov 44acab29 2023-07-07T12:02:51 Use latest build-tools from android_sdk (same as catapult) https://crsrc.org/c/third_party/catapult/devil/devil/android/sdk/build_tools.py;drc=8a3feaaaab63b383fb6b138be2986e9ad6dcaca2;l=61 Also do not fall back to just 'aapt' as that isn't hermetic. Bug: angleproject:7670 Change-Id: Ided9dfe16d6c6815c3425bdc64b2d572bbe564c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4672808 Auto-Submit: Roman Lavrov <romanl@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 8a8c8fc2 2023-07-05T13:19:25 Roll chromium_revision ad19957265..e506ce09ba (1165395:1165897) Change log: https://chromium.googlesource.com/chromium/src/+log/ad19957265..e506ce09ba Full diff: https://chromium.googlesource.com/chromium/src/+/ad19957265..e506ce09ba Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/e0690c7c78..f87ccdf42a * buildtools/linux64: git_revision:4bd1a77e67958fb7f6739bd4542641646f264e5d..git_revision:da5fe01bce4ae84b2619caca7a3aa7ec7d3eb8a7 * buildtools/mac: git_revision:4bd1a77e67958fb7f6739bd4542641646f264e5d..git_revision:da5fe01bce4ae84b2619caca7a3aa7ec7d3eb8a7 * buildtools/win: git_revision:4bd1a77e67958fb7f6739bd4542641646f264e5d..git_revision:da5fe01bce4ae84b2619caca7a3aa7ec7d3eb8a7 * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/7d4c4bf473..b5862634ee * third_party/android_sdk: https://chromium.googlesource.com/chromium/src/third_party/android_sdk/+log/f5874af13b..ea2e39562f * third_party/android_sdk/public: -VRKr36Uw8L_iFqqo9nevIBgNMggND5iWxjidyjnCgsC..YK9Rzw3fDzMHVzatNN6VlyoD_81amLZpN1AbmkdOd6AC * third_party/android_sdk/public: RSI3iwryh7URLGRgJHsCvUxj092woTPnKt4pwFcJ6L8C..HWVsGs2HCKgSVv41FsOcsfJbNcB0UFiNrF6Tc4yRArYC * third_party/android_sdk/public: eo5KvW6UVor92LwZai8Zulc624BQZoCu-yn7wa1z_YcC..u-bhWbTME6u-DjypTgr3ZikCyeAeU6txkR9ET6Uudc8C * third_party/android_system_sdk: RGY8Vyf8jjszRIJRFxZj7beXSUEHTQM90MtYejUvdMgC..4QeolYaSKWBtVTgzJU4tHUfzA9OJTDM8YUcD426IctwC * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..48b31edbfc * third_party/jdk: 2Of9Pe_OdO4xoAATuiLDiMVNebKTNO3WrwJGqil4RosC..-1zDGMOzS_Qsja50TakJCSqN9C9TYppQrsny4HATSQwC * third_party/jinja2: https://chromium.googlesource.com/chromium/src/third_party/jinja2/+log/264c07d7e6..515dd10de9 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/36a80749cf..75c7faf556 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/422351564c..159b3b88fd DEPS diff: https://chromium.googlesource.com/chromium/src/+/ad19957265..e506ce09ba/DEPS No update to Clang. BUG=None Change-Id: I4b8366a4585826221f2843682088ac100dd44f2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4661021 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Roman Lavrov 53b5d25f 2023-06-06T12:09:08 Resolve circular dependency android_helper <-> angle_test_util Ran into it causing issues in https://crrev.com/c/4545408 Bug: b/286067106 Change-Id: I9314d1e48b064a46362a65db2c3a92760111f02f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4594440 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Roman Lavrov d9192d9a 2023-05-25T14:43:41 android_helper sets return code to 1 when test json is missing e.g. FATAL failures / other crashes Bug: b/278585075 Change-Id: I01850e547d782c302658653780b93699e9e91ffa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4567831 Auto-Submit: Roman Lavrov <romanl@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Cody Northrop 64680f53 2023-05-05T15:58:21 Scripts: Fix non-root hash check Use run-as to ensure the file can be read by test app. Test: angle_trace_tests on prod device Bug: b/276742336 Change-Id: I006f40396712064ebe6d68e04de17537a8143320 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4509708 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Auto-Submit: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 7d6d18e4 2023-05-05T09:48:19 Improve adb root handling If `id -u` returns 0, adbd is already running as root (convenient fast path for local dev and seems we have that on bots too) If `which su` returns something, we should be able to get root. If "su" is there but we can't get adb root, raise. Go back to up to 10 seconds wait. On my local device adb root is routinely taking ~4 seconds. adb root restarts adbd on the device so it's expected not to be fast. Bug: b/276742336 Change-Id: If720b9176ba18ebd9734c0b8288eabc5970b5ef8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4508392 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 3ad1d702 2023-05-04T15:57:43 angle_trace_tests_android_binaries: test -> group We don't need it to be a test to begin with. But I looked into it because test with use_raw_android_executable=True makes things really complicated due to the way this is implemented upstream: ''' this __dist target here https://crsrc.org/c/testing/test.gni;drc=acb6ab509901650450fc387c0d9f09eb6f3f3248;l=265 which uses create_native_executable_dist which copies files according to the list of libs: https://crsrc.org/c/build/config/android/rules.gni;drc=a8c26a11f6cf763a5e81b2bced40584a678b9b8a;l=94 which is actually generated not at build time but by gn gen (also called when editing gn args) and so the inputs are not the libs themselves but this file which only contains a list of file names so when libs change there is no change to the inputs of this rule.. so it doesn't get invoked and the copy doesn't happen ''' One caveat is we need to produce a list of .so libs as a data dependency for them to be picked up by isolate Bug: b/276474703 Change-Id: I375a5be8499f13311654244036e36c60d945c363 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4507534 Auto-Submit: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop dd7eb1d8 2023-05-04T14:07:44 Scripts: Fix non-root support in android_helper.py Test: angle_trace_tests on production device Bug: b/276742336 Change-Id: I7c1f33adb37d8109540c70ac402e43462c046cec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4504920 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Roman Lavrov a88635c4 2023-04-28T18:54:25 Android logs also go to stdout/err, line-buffered if possible Currently logs like WARN() or INFO() only go to logcat, which doesn't make them visible in console. This change makes them go to both logcat and stdout/err. Fix android_helper choking on missing json data output when test crashes and test runner doesn't have a chance to produce that file. We still have the stdout/err in this case, so print it. However, a crash (such as SIGSEGV or __builtin_trap()) doesn't flush output so the non-flushed part of the buffer doesn't get in there. AngleNativeTest redirects stdout/err to a file which enables fully-buffered (stdlib) mode. Change this to line-buffered when stdout path is set to /data/ (/sdcard/ is slow) and use /data/data/com.android.angle.test/tmp/ as the temp path in android_helper. This makes e.g. FATAL() << "message"; show up in the logs in CI or local runs. This currently only applies to trace and perf tests, other tests will continue using fully-buffered /stdout/ as chromium's test_runner uses /sdcard/Download/ for temp files. Bug: b/276742336 Change-Id: Ia622c610f776f501223b0cca11d5ec1976eb9887 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4493463 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 84b2e9d1 2023-05-01T13:52:54 Capture/Replay: android_helper handles traces in/outside of apk * list files in apk using `aapt list` * determine lib_extension (.so vs .cr.so) based on a known lib name * determine traces_outside_of_apk based on libangle_trace_interpreter * update so libs handling to use these vars * also fixes an issue where libangle_trace_interpreter.cr.so wasn't copied to the device due to a missing check for .cr.so Bug: b/276742336 Change-Id: I5ccc6490ed3398668feec56c816dd65a444234cb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4495326 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 35461e60 2023-04-12T20:02:08 Android: Build traces outside of APK Our trace list has gotten too large for a single APK (2GB). To continue supporting compiled traces, we can now place the libraries in the test application's home directory, which is discoverable and executable without root. To build and run with all traces, use `angle_trace_perf_tests` as your build target, then use the local Android helper script: $ autoninja -C out/<config> angle_trace_perf_tests $ (cd out/<config>; ../../src/tests/run_angle_android_test.py \ angle_trace_tests --filter='*among_us' \ --verbose --local-output --verbose-logging \ --fixed-test-time-with-warmup 10) To continue using bundled libraries, specify your trace list in GN args using `angle_restricted_traces` and use steps that match other platforms: $ autoninja -C out/<config> angle_trace_tests $ out/Android/angle_trace_tests --gtest_filter='*among_us*' \ --verbose --local-output --verbose-logging \ --fixed-test-time-with-warmup 10 Bug: b/276474703 Change-Id: I3829cf7016e21894eee8890e2b0d527e8214f04e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4420279 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 4e073356 2023-04-13T15:16:53 Trace Interpreter: gzip cpp and run gold tests. New test step: angle_restricted_trace_gold_interpreted_tests similar to existing angle_restricted_trace_gold_tests but runs a subset of newest traces that have the right format. Currently there are 8 of them and the filter is hard-coded in test_suites.pyl. rise_of_empires can also be run interpreted but happened to flake during testing so it's not included for now. Trace cpp files are concatenated and gzipped as a build step producing gen/tracegz_{trace}.gz and these gz files are then distributed as part of the build --trace-interpreter flag changes from boolean to string to support: --trace-interpreter=gz: * this uses the gz file above * gold tests added in this CL use this option --trace-interpreter=c: * using uncompressed c/cpp file * existing angle_trace_interpreter_tests runs a retrace saving .c files and uses this option Bug: b/276742336 Change-Id: I69544f25bda873af191978195d02ffbdd34363c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4424690 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 2ce5a632 2023-01-18T11:01:41 Log screen state if log=debug. Prints either of: mScreenState=ON_UNLOCKED mScreenState=ON_LOCKED mScreenState=OFF_LOCKED Oddly, there doesn't seem to be a standard way to do this on Android, so using the nfc trick with "|| true" to ignore potential failures. Also setup logging using the util in run_angle_android_test as the current way seems to no longer be working. Bug: chromium:1405504 Change-Id: I448be86e8f0d72905948e68ffb076605273fa958 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 6e3f4048 2023-01-09T11:13:34 Log free space on device (df -h) if log=debug. Bug: chromium:1405504 Change-Id: I4c4f2e291bf10669b55adcd08bc57e338ca8ae62 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4147388 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 30439960 2022-10-24T17:30:18 Unbreak run_angle_android_test. Broken by ListTests removed in https://crrev.com/c/3963651 Move helper to angle_test_util. Bug: angleproject:7755 Change-Id: I1eec442cf3e2bf6c24335d4c294a68e7e868b814 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3975353 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Jamie Madill a41c6173 2022-10-16T08:28:53 Simplify trace test names. Originally we had a lot of conditionally enabled test configs in angle_perftests, that we enabled behind a flag because the total runtime would be too large if we left everything enabled. This CL switches to using a single test set, one for each trace, and using a the same command-line API we use in dEQP and the ANGLE samples to pick a single configuration. This makes it easier to pick exactly what configurations you want from the command line. Because we only run one configuration each time, we don't need to specialize the test name to include the configuration info. We can also simplify TracePerfTest -> TraceTest since these tests are run for both perf and correctness. Old name: TracePerfTest.Run/vulkan_trex_200 New name: TraceTest.trex_200 Example for tests that don't use default arguments: Old args: --enable-all-trace-tests Old name: TracePerfTest.Run/native_offscreen_trex_200 New args: --use-gl=native --offscreen New name: TraceTest.trex_200 Bug: angleproject:7755 Change-Id: Id93cf5725eff2e2c6b3b14804bc2902f38306e7e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3966535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Roman Lavrov cc35022f 2022-10-21T08:42:31 Only allow missing output file when listing tests. Avoids potentially swallowing an error in non-list-test mode Bug: angleproject:7755 Change-Id: I4e7fba6a5d110d568d71c31585fffdb189ec12a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3971078 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Jamie Madill 873650f4 2022-10-19T16:51:53 run_perf_tests.py: Fix test list unexpected error. The tests were failing because of a failure to pull the test json output from the device after --list-tests. This failure was benign because the test lists still came through to the test runner and it was able to proceed, but it was causing an error message. Also changes the runner to fail early if there's any error during --list-tests. Bug: angleproject:7755 Change-Id: I67bceec6b69fd2856136313d5e456e3c1f1caccf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3964753 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com>
Jamie Madill d6ca85bd 2022-10-18T17:10:41 run_perf_tests.py: Remove unneeded Android args. These only apply to the Chromium Android test runner, which we no longer use for this script. Bug: angleproject:7755 Change-Id: I311ac204e1999a77872a76f6d0b9d149f7ac409e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963651 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Auto-Submit: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0e0ea026 2022-10-13T18:29:33 Split trace tests out into angle_trace_tests. This makes angle_perftests strictly for microbenchmarks. The trace tests are a better separated target because they are for both gold correctness tests and performance. You can now use the GN arg "build_angle_trace_tests" to control building the trace tests. "build_angle_trace_perf_tests" is still supported for compatibility. Updates the infra scripts to use this new trace tests target. Also updates the build so by default we'll build the trace tests if you check them out, without needing a custom arg. Also updates docs. Bug: angleproject:7755 Change-Id: I2b1ae67799234cc1aefe7cda5f3af945c3f867fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953340 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Roman Lavrov 6eff905c 2022-10-11T10:08:12 Make Android gold tests populate os and os_version correctly. os = Android os_version = {ro.build.fingerprint} These show up in Skia gold. Currently set to Linux info. Bug: None Change-Id: If2ffe5e8a6620fde9bd0a983f9c0d11ffe6a75c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3946179 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill b681e939 2022-09-19T13:20:23 Turn on trace data hash checking automatically. This should save time uploading trace data already present on the device. Bug: angleproject:7671 Change-Id: Ie655cba284b6b3aec2e264cd4d64e4d18ebff8a7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3905902 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Jamie Madill 094b49db 2022-09-19T10:13:28 Android Test Runner: Skip APK install if hash matches. Bug: angleproject:7670 Change-Id: I984fe9377728e5a575fd04be2f5cb3ed1cdbafb5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3904425 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov f30cfd18 2022-08-16T16:50:33 Perf and gold tests detect test SKIPs from json results. Make angle_test_util.RunTestSuite() gets and returns json results (using --isolated-script-test-output). perf tests has an additional special case (filed https://anglebug.com/7578): Previously when metrics were missing it was assumed that this was due to tests being skipped - which seems to currently be the case except for the special case of GLMark2Benchmark* tests. Those produce .fps/.score metrics instead of the metrics expected by this script. This CL keeps those tests running (once) but then marks them as SKIP in test results when no metrics are found (which is the behavior before this CL; it might actually make more sense to count this as PASS because everything matches our expectations). We're still running them once, so if they FAIL we'll get notified. gold tests: Use json results file instead of checking for '[ SKIPPED ]' in stdout. Bug: angleproject:7299 Bug: angleproject:7578 Change-Id: Ia751784ad1aa94dc855c8b58ebfe5ba3e06e462f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3826167 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 2de8bb42 2022-08-03T18:15:52 Converge run wrappers into angle_test_util.RunTestSuite Bug: angleproject:7299 Change-Id: Ifa882028a6f49579b4a9c6893053cb3bee8d83fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3808302 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 88b05d3c 2022-08-03T15:21:00 Use globals in android_helper to simplify flow. Explicit .Initialize(suite_name) call to detect Android Track suite (apk) that was installed. We use the same package com.android.angle.test in multiple apks (eg system info and perftests) so keeping track of which one is currently installed avoids the need to take care of it manually (with PrepareTestSuite). Bug: angleproject:7299 Change-Id: I4b96f0fb24e38fc42d3814fb0eeda5aae527de5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3808292 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
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>