aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/ci/tier_builder.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-08-10 13:04:11 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-08-12 12:08:52 +0200
commita9491ef0948f8fe3eb3772b6b6ae44d86bde7e9b (patch)
tree9dfc1985294fed2e579dc662da9d589baa0be9b8 /xtesting/ci/tier_builder.py
parentb7f4eaa213b65a266f527d9def7679eac7e0353b (diff)
Skip the selected testcase too0.56
It completes "Allow calling a skip test" [1] [1] https://gerrit.opnfv.org/gerrit/60655 Change-Id: I02499aed56e6b23563165ea1f17b476e12408823 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/ci/tier_builder.py')
-rw-r--r--xtesting/ci/tier_builder.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/xtesting/ci/tier_builder.py b/xtesting/ci/tier_builder.py
index 42909810..66ad3250 100644
--- a/xtesting/ci/tier_builder.py
+++ b/xtesting/ci/tier_builder.py
@@ -45,11 +45,11 @@ class TierBuilder(object):
tier = tier_handler.Tier(
name=dic_tier['name'], order=dic_tier['order'],
description=dic_tier['description'])
-
for dic_testcase in dic_tier['testcases']:
testcase = tier_handler.TestCase(
name=dic_testcase['case_name'],
enabled=dic_testcase.get('enabled', True),
+ skipped=False,
criteria=dic_testcase['criteria'],
blocking=dic_testcase['blocking'],
description=dic_testcase['description'],
@@ -58,17 +58,20 @@ class TierBuilder(object):
if testcase.is_enabled():
tier.add_test(testcase)
else:
+ testcase.skipped = True
tier.skip_test(testcase)
else:
for dependency in dic_testcase['dependencies']:
kenv = dependency.keys()[0]
if not re.search(dependency[kenv], env.get(kenv)):
+ testcase.skipped = True
tier.skip_test(testcase)
break
else:
if testcase.is_enabled():
tier.add_test(testcase)
else:
+ testcase.skipped = True
tier.skip_test(testcase)
self.tier_objects.append(tier)