Commit e43d359150f77d7bf431b811f375481171502350

Roman Lavrov 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>