Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/performance/api/config.py')
-rw-r--r--tests/performance/api/config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/performance/api/config.py b/tests/performance/api/config.py
index 900cac0a0bb..68f4df8d487 100644
--- a/tests/performance/api/config.py
+++ b/tests/performance/api/config.py
@@ -10,12 +10,14 @@ from typing import Dict, List
from .test import TestCollection
+
def get_build_hash(args: None) -> str:
import bpy
import sys
build_hash = bpy.app.build_hash.decode('utf-8')
return '' if build_hash == 'Unknown' else build_hash
+
@dataclass
class TestEntry:
"""Test to run, a combination of revision, test and device."""
@@ -42,6 +44,7 @@ class TestEntry:
for field in self.__dataclass_fields__:
setattr(self, field, json_dict[field])
+
class TestQueue:
"""Queue of tests to be run or inspected. Matches JSON file on disk."""
@@ -99,6 +102,7 @@ class TestQueue:
with open(self.filepath, 'w') as f:
json.dump(json_entries, f, indent=2)
+
class TestConfig:
"""Test configuration, containing a subset of revisions, tests and devices."""