aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/core/task.py
diff options
context:
space:
mode:
authorJingLu5 <lvjing5@huawei.com>2017-07-04 07:44:52 +0000
committerJingLu5 <lvjing5@huawei.com>2017-07-04 12:11:16 +0000
commitae486999cfe50da16993200519859f11806bb7de (patch)
treedc07ca29cbaddc03ccf0eed6bec6f407db9d755f /yardstick/benchmark/core/task.py
parent8e2da9dd467f0e0a28bb92097d80d707d579bd4f (diff)
Bugfix: test case constraint not work if "INSTALLER_TYPE" and "NODE_NAME" absent
Change-Id: Idffc07c28fabda590b58c9501f388099f84f06b2 Signed-off-by: JingLu5 <lvjing5@huawei.com>
Diffstat (limited to 'yardstick/benchmark/core/task.py')
-rw-r--r--yardstick/benchmark/core/task.py6
1 files changed, 3 insertions, 3 deletions
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