aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ODL
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-03-17 18:09:12 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-03-18 10:45:44 +0100
commit7c9aef8db83e025034e3427c1330a00420fae50a (patch)
tree4eb3c1ce63dc76da10d8d00d20ca270491d9a242 /testcases/Controllers/ODL
parentd9d32a3f3f45b4f9008201e82235b33910e0f7f6 (diff)
Add criteria and version when pushing the results into test DB
JIRA: FUNCTEST-151 Change-Id: Iac36f28db5f2203d7b2977a2bb973534fe167bac Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'testcases/Controllers/ODL')
-rw-r--r--testcases/Controllers/ODL/CI/odlreport2db.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/testcases/Controllers/ODL/CI/odlreport2db.py b/testcases/Controllers/ODL/CI/odlreport2db.py
index 50731ffe1..3a696eb2d 100644
--- a/testcases/Controllers/ODL/CI/odlreport2db.py
+++ b/testcases/Controllers/ODL/CI/odlreport2db.py
@@ -130,12 +130,31 @@ def main(argv):
# -i fuel
# -p opnfv-jump-2
# -s os-odl_l2-ha
+ version = scenario
+
+ # success criteria for ODL = 100% of tests OK
+ status = "failed"
+ try:
+ tests_passed = 0
+ tests_failed = 0
+ for v in data['details']:
+ if v['test_status']['@status'] == "PASS":
+ tests_passed += 1
+ else:
+ tests_failed += 1
+
+ if (tests_failed < 1):
+ status = "passed"
+ except:
+ print("Unable to set criteria" % sys.exc_info()[0])
functest_utils.push_results_to_db(database,
"functest",
data['case_name'],
None,
data['pod_name'],
+ version,
scenario,
+ status,
build_tag,
data)
except: