summaryrefslogtreecommitdiffstats
path: root/utils/test
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2017-01-31 18:24:30 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2017-02-06 10:01:34 +0100
commit3c8300833a73d72afa89e38d05bbb5a28c58aade (patch)
tree3c4f3d6ae2939825f8c4b845407a98135a8452c0 /utils/test
parentc9340c59ae2e4796c678f1f6e0996afbcb1e6dd7 (diff)
Update on Functest reporting processing
- new param to exclude or not results from virtual PODs - new param to exclude or not noha results - fix path - add rally_sanity in black list until we fixed the format issue Change-Id: Ie952f7d6968a322edbcf2effffbc1a75beddc52f Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test')
-rwxr-xr-xutils/test/reporting/functest/reporting-status.py9
-rw-r--r--utils/test/reporting/reporting.yaml14
-rw-r--r--utils/test/reporting/utils/reporting_utils.py15
3 files changed, 27 insertions, 11 deletions
diff --git a/utils/test/reporting/functest/reporting-status.py b/utils/test/reporting/functest/reporting-status.py
index 66bdd57c1..158ee597b 100755
--- a/utils/test/reporting/functest/reporting-status.py
+++ b/utils/test/reporting/functest/reporting-status.py
@@ -40,6 +40,9 @@ versions = rp_utils.get_config('general.versions')
installers = rp_utils.get_config('general.installers')
blacklist = rp_utils.get_config('functest.blacklist')
log_level = rp_utils.get_config('general.log.log_level')
+exclude_noha = rp_utils.get_config('functest.exclude_noha')
+exclude_virtual = rp_utils.get_config('functest.exclude_virtual')
+
response = requests.get(cf)
functest_yaml_config = yaml.safe_load(response.text)
@@ -48,7 +51,10 @@ logger.info("*******************************************")
logger.info("* *")
logger.info("* Generating reporting scenario status *")
logger.info("* Data retention: %s days *" % period)
-logger.info("* Log level: %s *" % log_level)
+logger.info("* Log level: %s *" % log_level)
+logger.info("* *")
+logger.info("* Virtual PODs exluded: %s *" % exclude_virtual)
+logger.info("* NOHA scenarios excluded: %s *" % exclude_noha)
logger.info("* *")
logger.info("*******************************************")
@@ -90,7 +96,6 @@ for version in versions:
scenario_stats = rp_utils.getScenarioStats(scenario_results)
items = {}
scenario_result_criteria = {}
-
scenario_file_name = ("./display/" + version +
"/functest/scenario_history.txt")
# initiate scenario file if it does not exist
diff --git a/utils/test/reporting/reporting.yaml b/utils/test/reporting/reporting.yaml
index fa9862615..9db0890b2 100644
--- a/utils/test/reporting/reporting.yaml
+++ b/utils/test/reporting/reporting.yaml
@@ -2,13 +2,13 @@ general:
installers:
- apex
- compass
+ - daisy
- fuel
- joid
- - daisy
versions:
- master
- - colorado
+
log:
log_file: reporting.log
log_level: ERROR
@@ -30,17 +30,19 @@ general:
testapi:
url: testresults.opnfv.org/test/api/v1/results
-
+
functest:
blacklist:
- ovno
- security_scan
+ - rally_sanity
max_scenario_criteria: 50
test_conf: https://git.opnfv.org/cgit/functest/plain/functest/ci/testcases.yaml
log_level: ERROR
- jenkins_url: https://build.opnfv.org/ci/view/functest/job
-
-
+ jenkins_url: https://build.opnfv.org/ci/view/functest/job/
+ exclude_noha: False
+ exclude_virtual: True
+
yardstick:
test_conf: https://git.opnfv.org/cgit/yardstick/plain/tests/ci/report_config.yaml
log_level: ERROR
diff --git a/utils/test/reporting/utils/reporting_utils.py b/utils/test/reporting/utils/reporting_utils.py
index 0af60c78a..da979531b 100644
--- a/utils/test/reporting/utils/reporting_utils.py
+++ b/utils/test/reporting/utils/reporting_utils.py
@@ -127,7 +127,15 @@ def getScenarios(case, installer, version):
# Retrieve all the scenarios per installer
if not r['scenario'] in scenario_results.keys():
scenario_results[r['scenario']] = []
- scenario_results[r['scenario']].append(r)
+ # Do we consider results from virtual pods ...
+ # Do we consider results for non HA scenarios...
+ exclude_virtual_pod = get_config('functest.exclude_virtual')
+ exclude_noha = get_config('functest.exclude_noha')
+ if ((exclude_virtual_pod and "virtual" in r['pod_name']) or
+ (exclude_noha and "noha" in r['scenario'])):
+ print "exclude virtual pod results..."
+ else:
+ scenario_results[r['scenario']].append(r)
return scenario_results
@@ -254,13 +262,14 @@ def getResult(testCase, installer, scenario, version):
def getJenkinsUrl(build_tag):
# e.g. jenkins-functest-apex-apex-daily-colorado-daily-colorado-246
# id = 246
+ # jenkins-functest-compass-huawei-pod5-daily-master-136
+ # id = 136
# note it is linked to jenkins format
# if this format changes...function to be adapted....
url_base = get_config('functest.jenkins_url')
try:
build_id = [int(s) for s in build_tag.split("-") if s.isdigit()]
- jenkins_path = filter(lambda c: not c.isdigit(), build_tag)
- url_id = jenkins_path[8:-1] + "/" + str(build_id[0])
+ url_id = build_tag[8:-(len(build_id)+3)] + "/" + str(build_id[0])
jenkins_url = url_base + url_id + "/console"
except:
print 'Impossible to get jenkins url:'