summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/test/reporting/functest/img/gauge_0.pngbin0 -> 3644 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_100.pngbin0 -> 3191 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_16.7.pngbin0 -> 3170 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_25.pngbin0 -> 3108 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_33.3.pngbin0 -> 3081 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_41.7.pngbin0 -> 3169 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_50.pngbin0 -> 3123 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_58.3.pngbin0 -> 3161 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_66.7.pngbin0 -> 3069 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_75.pngbin0 -> 3030 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_8.3.pngbin0 -> 2993 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_83.3.pngbin0 -> 3122 bytes
-rw-r--r--utils/test/reporting/functest/img/gauge_91.7.pngbin0 -> 3008 bytes
-rwxr-xr-xutils/test/reporting/functest/reporting-status.py8
-rw-r--r--utils/test/reporting/functest/scenarioResult.py7
-rw-r--r--utils/test/reporting/functest/template/index-status-tmpl.html38
16 files changed, 42 insertions, 11 deletions
diff --git a/utils/test/reporting/functest/img/gauge_0.png b/utils/test/reporting/functest/img/gauge_0.png
new file mode 100644
index 000000000..ecefc0e66
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_0.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_100.png b/utils/test/reporting/functest/img/gauge_100.png
new file mode 100644
index 000000000..e199e1561
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_100.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_16.7.png b/utils/test/reporting/functest/img/gauge_16.7.png
new file mode 100644
index 000000000..3e3993c3b
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_16.7.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_25.png b/utils/test/reporting/functest/img/gauge_25.png
new file mode 100644
index 000000000..4923659b9
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_25.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_33.3.png b/utils/test/reporting/functest/img/gauge_33.3.png
new file mode 100644
index 000000000..364574b4a
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_33.3.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_41.7.png b/utils/test/reporting/functest/img/gauge_41.7.png
new file mode 100644
index 000000000..8c3e910fa
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_41.7.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_50.png b/utils/test/reporting/functest/img/gauge_50.png
new file mode 100644
index 000000000..2874b9fcf
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_50.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_58.3.png b/utils/test/reporting/functest/img/gauge_58.3.png
new file mode 100644
index 000000000..beedc8aa9
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_58.3.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_66.7.png b/utils/test/reporting/functest/img/gauge_66.7.png
new file mode 100644
index 000000000..93f44d133
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_66.7.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_75.png b/utils/test/reporting/functest/img/gauge_75.png
new file mode 100644
index 000000000..9fc261ff8
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_75.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_8.3.png b/utils/test/reporting/functest/img/gauge_8.3.png
new file mode 100644
index 000000000..59f86571e
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_8.3.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_83.3.png b/utils/test/reporting/functest/img/gauge_83.3.png
new file mode 100644
index 000000000..27ae4ec54
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_83.3.png
Binary files differ
diff --git a/utils/test/reporting/functest/img/gauge_91.7.png b/utils/test/reporting/functest/img/gauge_91.7.png
new file mode 100644
index 000000000..280865714
--- /dev/null
+++ b/utils/test/reporting/functest/img/gauge_91.7.png
Binary files differ
diff --git a/utils/test/reporting/functest/reporting-status.py b/utils/test/reporting/functest/reporting-status.py
index 0b80fe49a..ef567f17d 100755
--- a/utils/test/reporting/functest/reporting-status.py
+++ b/utils/test/reporting/functest/reporting-status.py
@@ -175,6 +175,8 @@ for version in conf.versions:
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" %
@@ -191,11 +193,13 @@ for version in conf.versions:
";" + 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)
- templateEnv = jinja2.Environment(loader=templateLoader, autoescape=True)
+ templateEnv = jinja2.Environment(
+ loader=templateLoader, autoescape=True)
TEMPLATE_FILE = "/template/index-status-tmpl.html"
template = templateEnv.get_template(TEMPLATE_FILE)
diff --git a/utils/test/reporting/functest/scenarioResult.py b/utils/test/reporting/functest/scenarioResult.py
index 743346adc..c6c337330 100644
--- a/utils/test/reporting/functest/scenarioResult.py
+++ b/utils/test/reporting/functest/scenarioResult.py
@@ -9,12 +9,17 @@
class ScenarioResult(object):
- def __init__(self, status, score=0):
+
+ def __init__(self, status, score=0, score_percent=0):
self.status = status
self.score = score
+ self.score_percent = score_percent
def getStatus(self):
return self.status
def getScore(self):
return self.score
+
+ def getScorePercent(self):
+ return self.score_percent \ No newline at end of file
diff --git a/utils/test/reporting/functest/template/index-status-tmpl.html b/utils/test/reporting/functest/template/index-status-tmpl.html
index da2213bc0..96240de5b 100644
--- a/utils/test/reporting/functest/template/index-status-tmpl.html
+++ b/utils/test/reporting/functest/template/index-status-tmpl.html
@@ -48,11 +48,33 @@
{% for scenario,iteration in scenario_stats.iteritems() -%}
<tr class="tr-ok">
<td>{{scenario}}</td>
- <td>{%if scenario_results[scenario].getStatus() is sameas "OK" -%}
- <img src="../../img/icon-ok.png">
- {%- else -%}
- <img src="../../img/icon-nok.png">
- {%- endif %}</td>
+ <td>{%if scenario_results[scenario].getScorePercent() < 8.3 -%}
+ <img src="../../img/gauge_0.png">
+ {%elif scenario_results[scenario].getScorePercent() < 16.7 -%}
+ <img src="../../img/gauge_8.3.png">
+ {%elif scenario_results[scenario].getScorePercent() < 25 -%}
+ <img src="../../img/gauge_16.7.png">
+ {%elif scenario_results[scenario].getScorePercent() < 33.3 -%}
+ <img src="../../img/gauge_25.png">
+ {%elif scenario_results[scenario].getScorePercent() < 41.7 -%}
+ <img src="../../img/gauge_33.3.png">
+ {%elif scenario_results[scenario].getScorePercent() < 50 -%}
+ <img src="../../img/gauge_41.7.png">
+ {%elif scenario_results[scenario].getScorePercent() < 58.3 -%}
+ <img src="../../img/gauge_50.png">
+ {%elif scenario_results[scenario].getScorePercent() < 66.7 -%}
+ <img src="../../img/gauge_58.3.png">
+ {%elif scenario_results[scenario].getScorePercent() < 75 -%}
+ <img src="../../img/gauge_66.7.png">
+ {%elif scenario_results[scenario].getScorePercent() < 83.3 -%}
+ <img src="../../img/gauge_75.png">
+ {%elif scenario_results[scenario].getScorePercent() < 91.7 -%}
+ <img src="../../img/gauge_83.3.png">
+ {%elif scenario_results[scenario].getScorePercent() < 100 -%}
+ <img src="../../img/gauge_91.7.png">
+ {%- else -%}
+ <img src="../../img/gauge_100.png">
+ {%- endif %}</td>
<td>{{scenario_results[scenario].getScore()}}</td>
<td>{{iteration}}</td>
</tr>
@@ -78,14 +100,14 @@
{% if test.getCriteria() > -1 -%}
{{test.getDisplayName() }}
{%- endif %}
- {% if test.getTier() > 3 -%}
+ {% if test.getTier() > 3 -%}
*
{%- endif %}
- </th>
+ </th>
{%- endfor %}
</tr>
<tr class="tr-weather-weather">
- {% for test in items[scenario] -%}
+ {% for test in items[scenario] -%}
{% if test.getCriteria() > 2 -%}
<td><img src="../../img/weather-clear.png"></td>
{%- elif test.getCriteria() > 1 -%}