aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/ci/tier_handler.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-07-12 08:31:31 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-07-12 09:18:19 +0200
commita507f38dc69019523ff02006622eb4ab84cd5ba1 (patch)
treecd117c2060a669a2fd9c07174912ad8c5ca74d20 /xtesting/ci/tier_handler.py
parent0249623ab94035ca0ea363d9a86847c2e7a5ee93 (diff)
Improve dependency management
It avoids declaring dependencies if needed. Negative regex are correcty managed as well. Change-Id: I0e978823526246bc4a5192e63a8a893a4add0e2a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/ci/tier_handler.py')
-rw-r--r--xtesting/ci/tier_handler.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/xtesting/ci/tier_handler.py b/xtesting/ci/tier_handler.py
index 915985f5..0adc9b81 100644
--- a/xtesting/ci/tier_handler.py
+++ b/xtesting/ci/tier_handler.py
@@ -115,15 +115,9 @@ class TestCase(object):
def is_compatible(self, ci_installer, ci_scenario):
try:
- if not ci_installer:
- if self.dependency.get_installer():
- return False
- elif not re.search(self.dependency.get_installer(), ci_installer):
+ if not re.search(self.dependency.get_installer(), ci_installer):
return False
- if not ci_scenario:
- if self.dependency.get_scenario():
- return False
- elif not re.search(self.dependency.get_scenario(), ci_scenario):
+ if not re.search(self.dependency.get_scenario(), ci_scenario):
return False
return True
except TypeError:
@@ -155,7 +149,7 @@ class TestCase(object):
class Dependency(object):
- def __init__(self, installer, scenario):
+ def __init__(self, installer='.*', scenario='.*'):
self.installer = installer
self.scenario = scenario