Commit 45cd2f0c authored by Brian Sheedy's avatar Brian Sheedy Committed by Commit Bot

Ensure device screen is on for GPU tests

Adds a check before running a GPU Telemetry test for if the test device
is an Android one, and if so, ensures that the screen is on. This is
necessary to prevent flakes on the bots that occur if the screen is
somehow accidentally turned off.

Bug: 1132297
Change-Id: I08c0daaff92260c5c9fc1f52e7f0f7d22b448564
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436779Reviewed-by: default avatarYuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811792}
parent acdddaa9
...@@ -242,6 +242,11 @@ class GpuIntegrationTest( ...@@ -242,6 +242,11 @@ class GpuIntegrationTest(
if len(args) == 1 and isinstance(args[0], tuple): if len(args) == 1 and isinstance(args[0], tuple):
args = args[0] args = args[0]
expected_crashes = self.GetExpectedCrashes(args) expected_crashes = self.GetExpectedCrashes(args)
os_name = self.browser.platform.GetOSName()
# The GPU tests don't function correctly if the screen is not on, so
# ensure that this is the case.
if os_name == 'android':
self.browser.platform.android_action_runner.TurnScreenOn()
self.RunActualGpuTest(url, *args) self.RunActualGpuTest(url, *args)
except Exception: except Exception:
if ResultType.Failure in expected_results or should_retry_on_failure: if ResultType.Failure in expected_results or should_retry_on_failure:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment