From ae486999cfe50da16993200519859f11806bb7de Mon Sep 17 00:00:00 2001 From: JingLu5 Date: Tue, 4 Jul 2017 07:44:52 +0000 Subject: Bugfix: test case constraint not work if "INSTALLER_TYPE" and "NODE_NAME" absent Change-Id: Idffc07c28fabda590b58c9501f388099f84f06b2 Signed-off-by: JingLu5 --- yardstick/benchmark/core/task.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'yardstick/benchmark/core/task.py') diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index d1a4d7561..f9c2551a8 100644 --- a/yardstick/benchmark/core/task.py +++ b/yardstick/benchmark/core/task.py @@ -375,10 +375,10 @@ class TaskParser(object): # pragma: no cover tc_fit_installer = constraint.get('installer', None) LOG.info("cur_pod:%s, cur_installer:%s,tc_constraints:%s", cur_pod, cur_installer, constraint) - if cur_pod and tc_fit_pod and cur_pod not in tc_fit_pod: + if (cur_pod is None) or (tc_fit_pod and cur_pod not in tc_fit_pod): return False - if cur_installer and tc_fit_installer and \ - cur_installer not in tc_fit_installer: + if (cur_installer is None) or (tc_fit_installer and cur_installer + not in tc_fit_installer): return False return True -- cgit 1.2.3-korg