summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKubi <jean.gaoliang@huawei.com>2017-07-06 03:58:40 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-07-06 03:58:40 +0000
commitba113ea45d2522d071fc42d29232f7248812bd44 (patch)
treea52ad6d6d0d26f7054bc42194beeeda8f17d399f
parent69049e54f6b6611bdaa9dbab9e6dc6a123583251 (diff)
parentae486999cfe50da16993200519859f11806bb7de (diff)
Merge "Bugfix: test case constraint not work if "INSTALLER_TYPE" and "NODE_NAME" absent"
-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 a985c86ef..30ad98f4b 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