Commit 2eac50d4 authored by Chong Gu's avatar Chong Gu Committed by Commit Bot

[Fuchsia] Helper script to launch gpu integration tests in Fuchsia.

Bug: 1058255
Change-Id: Ic42f11923c0426d62e7274d908dd8e872dce154d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2090627Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Commit-Queue: Chong Gu <chonggu@google.com>
Cr-Commit-Position: refs/heads/master@{#747532}
parent e54c88e7
#!/usr/bin/env vpython
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Wrapper for running gpu integration tests on Fuchsia devices."""
import argparse
import logging
import os
import subprocess
import sys
import time
from gpu_tests import path_util
sys.path.insert(0, os.path.join(path_util.GetChromiumSrcDir(),
'build', 'fuchsia'))
from common_args import AddCommonArgs, ConfigureLogging, GetDeploymentTargetForArgs
def main():
parser = argparse.ArgumentParser()
AddCommonArgs(parser)
args, gpu_test_args = parser.parse_known_args()
ConfigureLogging(args)
gpu_script = [os.path.join(path_util.GetChromiumSrcDir(), 'content',
'test', 'gpu', 'run_gpu_integration_test.py')]
# Pass all other arguments to the gpu integration tests.
gpu_script.extend(gpu_test_args)
with GetDeploymentTargetForArgs(args) as target:
target.Start()
_, fuchsia_ssh_port = target._GetEndpoint()
gpu_script.extend(['--fuchsia-ssh-config-dir', args.output_directory])
gpu_script.extend(['--fuchsia-ssh-port', str(fuchsia_ssh_port)])
web_engine_dir = os.path.join(args.output_directory, 'gen',
'fuchsia', 'engine')
# Install necessary packages on the device.
target.InstallPackage([
os.path.join(web_engine_dir, 'web_engine', 'web_engine.far'),
os.path.join(web_engine_dir, 'web_engine_shell',
'web_engine_shell.far')
])
return subprocess.call(gpu_script)
if __name__ == '__main__':
sys.exit(main())
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