aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-02-21 08:27:28 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-02-21 08:27:28 +0000
commit9a38c37d2fb2f0e7b477429041caa30f3a018eaf (patch)
tree6769dd54afb9f26d950015f8161e1cf89ef0ca09
parent68ff6fc22954f8a548b0473464255a8395e7881a (diff)
ci in huawei-pod1 do not run test case after tc074
JIRA: YARDSTICK-568 https://build.opnfv.org/ci/view/yardstick/job/yardstick-compass-baremetal-daily-master/814/consoleFull the test case tc075 and tc027 after tc074 does not run in the ci, which is not correct. the logs shows the suite quit after tc074 finishes. The reason is: In this patch: https://gerrit.opnfv.org/gerrit/#/c/26763/ I add a task_id to the context name, but in tc074, it do not have a name. It will cause a keyError. Change-Id: I09608675d9dadcc3ff0d825ca63db3be5e414120 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
-rw-r--r--yardstick/benchmark/core/task.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py
index 522ad4d23..aecf5bf4a 100644
--- a/yardstick/benchmark/core/task.py
+++ b/yardstick/benchmark/core/task.py
@@ -267,7 +267,11 @@ class TaskParser(object): # pragma: no cover
name_suffix = '-{}'.format(task_id[:8])
for cfg_attrs in context_cfgs:
- cfg_attrs['name'] = '{}{}'.format(cfg_attrs['name'], name_suffix)
+ try:
+ cfg_attrs['name'] = '{}{}'.format(cfg_attrs['name'],
+ name_suffix)
+ except KeyError:
+ pass
context_type = cfg_attrs.get("type", "Heat")
if "Heat" == context_type and "networks" in cfg_attrs:
# bugfix: if there are more than one network,