diff options
Diffstat (limited to 'qtip/runner/suite.py')
-rw-r--r-- | qtip/runner/suite.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/qtip/runner/suite.py b/qtip/runner/suite.py index 0086a20e..55033d2b 100644 --- a/qtip/runner/suite.py +++ b/qtip/runner/suite.py @@ -7,16 +7,16 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -from os import path +from qtip.base.benchmark import Property +from qtip.spec.qpi import QPISpec +from qtip.runner.case import Case -from benchmark import Benchmark - -class Suite(Benchmark): - """WIP(yujunz): - a suite is consist of one or several perf tests and produces one QPI. - It must be executed as part of testplan - """ - - # paths to search for suites - _paths = [path.join(p, 'suite') for p in Benchmark._paths] +class Suite(object): + """a suite of benchmark cases under specified condition""" + def __init__(self, spec, paths=None): + self._paths = paths + self.qpi_spec = QPISpec(spec[Property.QPI_SPEC], paths=paths) + self.condition = spec.get(Property.CONDITION, {}) + self.cases = [Case(case_spec, paths) + for case_spec in spec.get(Property.CASES, [])] |