aboutsummaryrefslogtreecommitdiffstats
path: root/ci/tier_handler.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2016-05-25 10:19:12 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2016-05-25 14:51:08 +0200
commitf4e7709897c748b771751a92964f78e168b77bf4 (patch)
tree5ca8599af2d6d002832193c55e434e96e779bc67 /ci/tier_handler.py
parente489b32f757b4a3496711c1b827bee849b38f107 (diff)
Allow unknown ci_installer or ci_scenario in is_compatible
ci_installer and ci_scenario are only tested if they are set. At least one of theses variables must be set to get dependencies It modifies the previous logic introduced by the first implementation of tier_handler.py [1] [1] https://gerrit.opnfv.org/gerrit/#/c/12579/ Change-Id: Icc9663a620f0b18f502b3eff7c0ce0d71e4e5910 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'ci/tier_handler.py')
-rw-r--r--ci/tier_handler.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/ci/tier_handler.py b/ci/tier_handler.py
index 03db4a91d..b1ef52d8f 100644
--- a/ci/tier_handler.py
+++ b/ci/tier_handler.py
@@ -109,10 +109,15 @@ class TestCase:
def is_compatible(self, ci_installer, ci_scenario):
try:
- return not (re.search(self.dependency.get_installer(),
- ci_installer) is None or
- re.search(self.dependency.get_scenario(),
- ci_scenario) is None)
+ if ci_installer is not None:
+ if re.search(self.dependency.get_installer(),
+ ci_installer) is None:
+ return False
+ if ci_scenario is not None:
+ if re.search(self.dependency.get_scenario(),
+ ci_scenario) is None:
+ return False
+ return not (ci_scenario is None and ci_installer is None)
except TypeError:
return False