Set default Skia Gold session type
Sets the default session type for Skia Gold to be
OutputManagerlessSkiaGoldSession. This is what was being used by all
implementations except the Android instrumentation tests, so we are able
to remove some duplicate code and unnecessary child classes by setting
the default in the base implementation.
Bug: 1443021
Change-Id: I69a7a884736ae5ce39cc20228614e4d78a4d1c95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4514682
Reviewed-by: Sven Zheng <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Reviewed-by: Andrew Grieve <[email protected]>
Commit-Queue: Brian Sheedy <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1142776}
diff --git a/build/android/test_runner.pydeps b/build/android/test_runner.pydeps
index 5c1cd13..3414349 100644
--- a/build/android/test_runner.pydeps
+++ b/build/android/test_runner.pydeps
@@ -134,6 +134,7 @@
../gn_helpers.py
../print_python_deps.py
../skia_gold_common/__init__.py
+../skia_gold_common/output_managerless_skia_gold_session.py
../skia_gold_common/skia_gold_properties.py
../skia_gold_common/skia_gold_session.py
../skia_gold_common/skia_gold_session_manager.py
diff --git a/build/skia_gold_common/skia_gold_properties.py b/build/skia_gold_common/skia_gold_properties.py
index 68a175f..6ff37429 100644
--- a/build/skia_gold_common/skia_gold_properties.py
+++ b/build/skia_gold_common/skia_gold_properties.py
@@ -29,7 +29,10 @@
class SkiaGoldProperties():
def __init__(self, args: ParsedCmdArgs):
- """Abstract class to validate and store properties related to Skia Gold.
+ """Class to validate and store properties related to Skia Gold.
+
+ The base implementation is usable on its own, but is meant to be overridden
+ as necessary.
Args:
args: The parsed arguments from an argparse.ArgumentParser.
diff --git a/build/skia_gold_common/skia_gold_session_manager.py b/build/skia_gold_common/skia_gold_session_manager.py
index 976a72e..300ddf89 100644
--- a/build/skia_gold_common/skia_gold_session_manager.py
+++ b/build/skia_gold_common/skia_gold_session_manager.py
@@ -7,6 +7,7 @@
import tempfile
from typing import Optional, Type, Union
+from skia_gold_common import output_managerless_skia_gold_session
from skia_gold_common import skia_gold_properties
from skia_gold_common import skia_gold_session
@@ -16,11 +17,14 @@
class SkiaGoldSessionManager():
def __init__(self, working_dir: str,
gold_properties: skia_gold_properties.SkiaGoldProperties):
- """Abstract class to manage one or more skia_gold_session.SkiaGoldSessions.
+ """Class to manage one or more skia_gold_session.SkiaGoldSessions.
A separate session is required for each instance/corpus/keys_file
combination, so this class will lazily create them as necessary.
+ The base implementation is usable on its own, but is meant to be overridden
+ as necessary.
+
Args:
working_dir: The working directory under which each individual
SkiaGoldSessions' working directory will be created.
@@ -86,7 +90,7 @@
Returns:
A reference to a SkiaGoldSession class.
"""
- raise NotImplementedError
+ return output_managerless_skia_gold_session.OutputManagerlessSkiaGoldSession
def _GetKeysAsDict(keys_input: KeysInputType) -> dict: