Commit 1c4f18d0 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Ben Gamari

testsuite: More type signatures

parent 44d08c32
......@@ -9,6 +9,7 @@
# (which defaults to 'local' if not given by --test-env).
#
from enum import Enum
import colorsys
import tempfile
import json
......@@ -62,7 +63,7 @@ PerfStat = namedtuple('PerfStat', ['test_env','test','way','metric','value'])
# A baseline recovered form stored metrics.
Baseline = namedtuple('Baseline', ['perfStat','commit','commitDepth'])
class MetricChange:
class MetricChange(Enum):
NewMetric = 'NewMetric'
NoChange = 'NoChange'
Increase = 'Increase'
......
......@@ -225,20 +225,22 @@ class TestRun:
self.n_expected_failures = 0
self.missing_libs = [] # type: List[TestResult]
self.framework_failures = []
self.framework_warnings = []
self.framework_failures = [] # type: List[TestResult]
self.framework_warnings = [] # type: List[TestResult]
self.expected_passes = []
self.unexpected_passes = []
self.unexpected_failures = []
self.unexpected_stat_failures = []
self.fragile_results = []
self.expected_passes = [] # type: List[TestResult]
self.unexpected_passes = [] # type: List[TestResult]
self.unexpected_failures = [] # type: List[TestResult]
self.unexpected_stat_failures = [] # type: List[TestResult]
# Results from tests that have been marked as fragile
self.fragile_results = [] # type: List[TestResult]
# List of all metrics measured in this test run.
# [(change, PerfStat)] where change is one of the MetricChange
# constants: NewMetric, NoChange, Increase, Decrease.
# NewMetric happens when the previous git commit has no metric recorded.
self.metrics = []
self.metrics = [] # type: List[Tuple[MetricChange, PerfStat]]
global t
t = TestRun()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment