Commit f51e58db authored by Zhenyao Mo's avatar Zhenyao Mo Committed by Commit Bot

Avoid power measurement script failure when running in --url mode

In --url mode, we zip telemetry_gpu_integration_test_scripts_only target and
copy it over to target machine to test against external websites.

That target doesn't include the data folder /media/test/data that's required
for built-in power measurement video tests, but not required in --url mode.

BUG=867155
TEST=manual
R=kbr@chromium.org,magchen@chromium.org

Change-Id: If64402f90001880039f053a5a62d6780c8478932
Reviewed-on: https://chromium-review.googlesource.com/c/1484972
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634947}
parent b16078f0
...@@ -210,6 +210,9 @@ class PowerMeasurementExpectations(GpuTestExpectations): ...@@ -210,6 +210,9 @@ class PowerMeasurementExpectations(GpuTestExpectations):
pass pass
class PowerMeasurementIntegrationTest(gpu_integration_test.GpuIntegrationTest): class PowerMeasurementIntegrationTest(gpu_integration_test.GpuIntegrationTest):
_url_mode = None
@classmethod @classmethod
def Name(cls): def Name(cls):
return 'power' return 'power'
...@@ -264,6 +267,7 @@ class PowerMeasurementIntegrationTest(gpu_integration_test.GpuIntegrationTest): ...@@ -264,6 +267,7 @@ class PowerMeasurementIntegrationTest(gpu_integration_test.GpuIntegrationTest):
if options.url is not None: if options.url is not None:
# This is for local testing convenience only and is not to be added to # This is for local testing convenience only and is not to be added to
# any bots. # any bots.
cls._url_mode = True
yield ('URL', options.url, yield ('URL', options.url,
{'test_func': 'URL', {'test_func': 'URL',
'repeat': options.repeat, 'repeat': options.repeat,
...@@ -276,6 +280,7 @@ class PowerMeasurementIntegrationTest(gpu_integration_test.GpuIntegrationTest): ...@@ -276,6 +280,7 @@ class PowerMeasurementIntegrationTest(gpu_integration_test.GpuIntegrationTest):
'resolution': options.resolution, 'resolution': options.resolution,
'bypass_ipg': options.bypass_ipg}) 'bypass_ipg': options.bypass_ipg})
else: else:
cls._url_mode = False
yield ('Basic', '-', yield ('Basic', '-',
{'test_func': 'Basic', {'test_func': 'Basic',
'bypass_ipg': options.bypass_ipg}) 'bypass_ipg': options.bypass_ipg})
...@@ -310,7 +315,9 @@ class PowerMeasurementIntegrationTest(gpu_integration_test.GpuIntegrationTest): ...@@ -310,7 +315,9 @@ class PowerMeasurementIntegrationTest(gpu_integration_test.GpuIntegrationTest):
path_util.SetupTelemetryPaths() path_util.SetupTelemetryPaths()
cls.CustomizeBrowserArgs(cls._AddDefaultArgs([])) cls.CustomizeBrowserArgs(cls._AddDefaultArgs([]))
cls.StartBrowser() cls.StartBrowser()
cls.SetStaticServerDirs(_DATA_PATHS) assert cls._url_mode is not None
if not cls._url_mode:
cls.SetStaticServerDirs(_DATA_PATHS)
def RunActualGpuTest(self, test_path, *args): def RunActualGpuTest(self, test_path, *args):
test_params = args[0] test_params = args[0]
......
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