aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ODL/CI/odlreport2db.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-03-18 13:10:23 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-03-18 13:10:23 +0000
commit26fa022ae631922f22978f79b2912fd56f133ab2 (patch)
treefa428f2560ed5f9ccb266f8411a2dbb4295fb0e0 /testcases/Controllers/ODL/CI/odlreport2db.py
parentfd95510eb2caa63ec1613b271fb620f9c66e2278 (diff)
parent7c9aef8db83e025034e3427c1330a00420fae50a (diff)
Merge "Add criteria and version when pushing the results into test DB"
Diffstat (limited to 'testcases/Controllers/ODL/CI/odlreport2db.py')
-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 50731ffe..3a696eb2 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: