diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-08-16 16:31:44 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-08-16 16:36:26 +0800 |
commit | 86b0ef02f5c0ec0ec80ffb0f507ecf7e573611c6 (patch) | |
tree | a688aefbc1b35922ab56f807e6c22f9303fabe75 /qtip/loader | |
parent | d602404a17f1935a524e8fc46ed853d4c7717164 (diff) |
Migrate contents from benchmarks to resources
Change-Id: I189c3d5224ec58ad63851d173b94204b273c3696
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'qtip/loader')
-rw-r--r-- | qtip/loader/file.py | 2 | ||||
-rw-r--r-- | qtip/loader/qpi.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/qtip/loader/file.py b/qtip/loader/file.py index a39e15f6..6ef4bf3c 100644 --- a/qtip/loader/file.py +++ b/qtip/loader/file.py @@ -17,7 +17,7 @@ from qtip.loader.base import BaseLoader ROOT_DIR = path.join(path.dirname(__file__), path.pardir, path.pardir, - 'benchmarks') + 'resources') class FileLoader(BaseLoader): diff --git a/qtip/loader/qpi.py b/qtip/loader/qpi.py index 2a85766e..48f52e84 100644 --- a/qtip/loader/qpi.py +++ b/qtip/loader/qpi.py @@ -9,6 +9,7 @@ from yaml_file import YamlFileLoader +from qtip.base.constant import FormulaName from qtip.base.constant import SpecProp from qtip.util.formula import Formula @@ -31,5 +32,5 @@ class QPISpec(YamlFileLoader): class Section(object): def __init__(self, content, paths=None): self.name = content[SpecProp.NAME] - self.weight = content[SpecProp.WEIGHT] - self.formula = Formula(content[SpecProp.FORMULA]) + self.weight = content.get(SpecProp.WEIGHT, None) + self.formula = Formula(content.get(SpecProp.FORMULA, FormulaName.ARITHMETIC_MEAN)) |