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-08-07 05:40:36 +0200
commit12d8254ad80f974d9b733d5262af842c362fb95a (patch)
tree8fd14e0f606f90ee8af3a9ad4c1fd75433a4bfc9 /xtesting/ci/tier_handler.py
parentf990bd3c8cbac17d4c0d36b18e5debb58a72402c (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> (cherry picked from commit a507f38dc69019523ff02006622eb4ab84cd5ba1)
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