Code Review
/
releng.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "[doctor] merge doctor verify jobs"
[releng.git]
/
utils
/
test
/
reporting
/
functest
/
reporting-status.py
diff --git
a/utils/test/reporting/functest/reporting-status.py
b/utils/test/reporting/functest/reporting-status.py
old mode 100644
(file)
new mode 100755
(executable)
index
622c375
..
ef567f1
--- a/
utils/test/reporting/functest/reporting-status.py
+++ b/
utils/test/reporting/functest/reporting-status.py
@@
-34,7
+34,7
@@
tempest = tc.TestCase("tempest_smoke_serial", "functest", -1)
cf = conf.TEST_CONF
response = requests.get(cf)
cf = conf.TEST_CONF
response = requests.get(cf)
-functest_yaml_config = yaml.load(response.text)
+functest_yaml_config = yaml.
safe_
load(response.text)
logger.info("*******************************************")
logger.info("* Generating reporting scenario status *")
logger.info("*******************************************")
logger.info("* Generating reporting scenario status *")
@@
-99,8
+99,9
@@
for version in conf.versions:
for test_case in testValid:
test_case.checkRunnable(installer, s,
test_case.getConstraints())
for test_case in testValid:
test_case.checkRunnable(installer, s,
test_case.getConstraints())
- logger.debug("testcase %s is %s" %
+ logger.debug("testcase %s
(%s)
is %s" %
(test_case.getDisplayName(),
(test_case.getDisplayName(),
+ test_case.getName(),
test_case.isRunnable))
time.sleep(1)
if test_case.isRunnable:
test_case.isRunnable))
time.sleep(1)
if test_case.isRunnable:
@@
-131,8
+132,10
@@
for version in conf.versions:
for test_case in otherTestCases:
test_case.checkRunnable(installer, s,
test_case.getConstraints())
for test_case in otherTestCases:
test_case.checkRunnable(installer, s,
test_case.getConstraints())
- logger.info("testcase %s is %s" %
- (test_case.getName(), test_case.isRunnable))
+ logger.debug("testcase %s (%s) is %s" %
+ (test_case.getDisplayName(),
+ test_case.getName(),
+ test_case.isRunnable))
time.sleep(1)
if test_case.isRunnable:
dbName = test_case.getDbName()
time.sleep(1)
if test_case.isRunnable:
dbName = test_case.getDbName()
@@
-172,6
+175,8
@@
for version in conf.versions:
scenario_criteria = conf.MAX_SCENARIO_CRITERIA
s_score = str(scenario_score) + "/" + str(scenario_criteria)
scenario_criteria = conf.MAX_SCENARIO_CRITERIA
s_score = str(scenario_score) + "/" + str(scenario_criteria)
+ s_score_percent = float(
+ scenario_score) / float(scenario_criteria) * 100
s_status = "KO"
if scenario_score < scenario_criteria:
logger.info(">>>> scenario not OK, score = %s/%s" %
s_status = "KO"
if scenario_score < scenario_criteria:
logger.info(">>>> scenario not OK, score = %s/%s" %
@@
-188,11
+193,13
@@
for version in conf.versions:
";" + installer + ";" + s + "\n")
f.write(info)
";" + installer + ";" + s + "\n")
f.write(info)
- scenario_result_criteria[s] = sr.ScenarioResult(s_status, s_score)
+ scenario_result_criteria[s] = sr.ScenarioResult(s_status, s_score,
+ s_score_percent)
logger.info("--------------------------")
templateLoader = jinja2.FileSystemLoader(conf.REPORTING_PATH)
logger.info("--------------------------")
templateLoader = jinja2.FileSystemLoader(conf.REPORTING_PATH)
- templateEnv = jinja2.Environment(loader=templateLoader)
+ templateEnv = jinja2.Environment(
+ loader=templateLoader, autoescape=True)
TEMPLATE_FILE = "/template/index-status-tmpl.html"
template = templateEnv.get_template(TEMPLATE_FILE)
TEMPLATE_FILE = "/template/index-status-tmpl.html"
template = templateEnv.get_template(TEMPLATE_FILE)