1# Copyright 2019 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import os 6import sys 7 8# Add src/testing/ into sys.path for importing common without pylint errors. 9sys.path.append( 10 os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) 11from scripts import common 12 13 14class GpuIntegrationTestAdapater(common.BaseIsolatedScriptArgsAdapter): 15 16 def generate_test_output_args(self, output): 17 return ['--write-full-results-to', output] 18 19 def generate_test_also_run_disabled_tests_args(self): 20 return ['--all'] 21 22 def generate_test_filter_args(self, test_filter_str): 23 # isolated_script_test_filter comes in like: 24 # WebglExtension_WEBGL_depth_texture::conformance/textures/misc/copytexsubimage2d-subrects.html # pylint: disable=line-too-long 25 return ['--test-filter=%s' % test_filter_str] 26 27 def generate_sharding_args(self, total_shards, shard_index): 28 return ['--total-shards=%d' % total_shards, 29 '--shard-index=%d' % shard_index] 30 31 def generate_test_launcher_retry_limit_args(self, retry_limit): 32 return ['--retry-limit=%d' % retry_limit] 33 34 def generate_test_repeat_args(self, repeat_count): 35 return ['--repeat=%d' % repeat_count] 36