From 9a38c37d2fb2f0e7b477429041caa30f3a018eaf Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Tue, 21 Feb 2017 08:27:28 +0000 Subject: 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 --- yardstick/benchmark/core/task.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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, -- cgit 1.2.3-korg