1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32

content / test / gpu / unexpected_passes / gpu_unittest_utils.py [blame]

# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Helper methods for GPU unittests."""

from __future__ import print_function

import typing

from unexpected_passes import gpu_expectations
from unexpected_passes import gpu_queries
from unexpected_passes_common import unittest_utils as uu


def CreateGenericGpuQuerier(*args, **kwargs) -> gpu_queries.GpuBigQueryQuerier:
  return typing.cast(
      gpu_queries.GpuBigQueryQuerier,
      uu.CreateGenericQuerier(cls=gpu_queries.GpuBigQueryQuerier,
                              *args,
                              **kwargs))


class GenericGpuExpectations(gpu_expectations.GpuExpectations):
  def GetExpectationFilepaths(self) -> list:
    return []

  def _GetExpectationFileTagHeader(self, _) -> str:
    return """\
# tags: [ linux mac win ]
# tags: [ amd intel nvidia ]
# results: [ Failure RetryOnFailure Skip Pass ]
"""