• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 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"""Utility methods for Skia Gold functionality unittests."""
5
6import argparse
7import collections
8import typing
9from typing import Optional
10
11import dataclasses  # Built-in, but pylint gives an ordering false positive.
12
13
14@dataclasses.dataclass
15class _SkiaGoldArgs():
16  local_pixel_tests: Optional[bool] = None
17  no_luci_auth: Optional[bool] = None
18  service_account: Optional[str] = None
19  code_review_system: Optional[str] = None
20  continuous_integration_system: Optional[str] = None
21  git_revision: Optional[str] = None
22  gerrit_issue: Optional[int] = None
23  gerrit_patchset: Optional[int] = None
24  buildbucket_id: Optional[int] = None
25  bypass_skia_gold_functionality: Optional[bool] = None
26  skia_gold_local_png_write_directory: Optional[str] = None
27
28
29def createSkiaGoldArgs(*args, **kwargs):
30  return typing.cast(argparse.Namespace, _SkiaGoldArgs(*args, **kwargs))
31