gpu_integration_test_adapter.py 1.4 KB

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