From 9302870534c1ef95f579efb787c51164a9881f69 Mon Sep 17 00:00:00 2001 From: Rachel Powers Date: Tue, 26 May 2020 18:06:38 -0600 Subject: [PATCH 1/5] add regession test summeries to head of suit blocks --- _includes/regrtest_summery.html | 64 +++++++++++++++++++++++++++++++++ _layouts/regrtests_results.html | 48 +++++++++++++++---------- 2 files changed, 94 insertions(+), 18 deletions(-) create mode 100644 _includes/regrtest_summery.html diff --git a/_includes/regrtest_summery.html b/_includes/regrtest_summery.html new file mode 100644 index 000000000..c7e52fea8 --- /dev/null +++ b/_includes/regrtest_summery.html @@ -0,0 +1,64 @@ +{% assign result_total = include.pass | plus: include.skip | plus: include.fail %} +{% assign pass_percent = include.pass | times: 100.0 | divided_by: result_total | round: 2 %} +{% assign skip_percent = include.skip | times: 100.0 | divided_by: result_total | round: 2 %} +{% assign fail_percent = include.fail | times: 100.0 | divided_by: result_total | round: 2 %} + +{% assign pass_color = "#4c1" %} +{% assign skip_color = "#dfb317" %} +{% assign fail_color = "#fe7d37" %} + +{%if include.svg %} + + + + + + + + + + Results + Pass {{ pass_percent }}% + Skip {{ skip_percent }}% + Fail {{ fail_percent }}% + + + +{% endif %} + +{% if include.table or include.svg == nil or include.svg == false %} + +
+
+
+ Total Tests: + {{ result_total }} +
+
+
+
+ Passed: + {{ result.num_passed }} ({{ pass_percent }}%) +
+
+ Skipped: + {{ result.num_skipped }} ({{ skip_percent }}%) +
+
+ Failed: + {{ result.num_failed }} ({{ fail_percent }}%) +
+
+
+ +
+
+{% endif %} diff --git a/_layouts/regrtests_results.html b/_layouts/regrtests_results.html index 827656661..84c0dcf03 100644 --- a/_layouts/regrtests_results.html +++ b/_layouts/regrtests_results.html @@ -28,30 +28,42 @@
{% for test in site.data.regrtests_results.suites %} +
{% for result in test %} +
+
+
+ {% if result.module %} +
+ Module: + {{result.module }} +
+ {% endif %} - {% if result.module %} -
- Module: - {{result.module }} -
- {% endif %} + {% if result.name %} +
+ Name: + {{result.name }} +
+ {% endif %} - {% if result.name %} -
- Name: - {{result.name }} -
- {% endif %} + {% if result.class %} +
+ Class: + {{result.class }} +
+ {% endif %} - {% if result.class %} -
- Class: - {{result.class }} + +
+ {% if result.num_passed and result.num_skipped and result.num_failed %} +
+ {% include regrtest_summery.html pass=result.num_passed skip=result.num_skipped fail=result.num_failed %} +
+ {% endif %}
- {% endif %}
{% for cases in result.cases %} @@ -97,4 +109,4 @@
- \ No newline at end of file + From 4a178f4f3a8d5aacd2da1394d23e981d217c1e94 Mon Sep 17 00:00:00 2001 From: Rachel Powers Date: Tue, 26 May 2020 18:28:13 -0600 Subject: [PATCH 2/5] Add total summary at top --- ...test_summery.html => regrtest_summary.html} | 7 +++++++ _layouts/regrtests_results.html | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) rename _includes/{regrtest_summery.html => regrtest_summary.html} (93%) diff --git a/_includes/regrtest_summery.html b/_includes/regrtest_summary.html similarity index 93% rename from _includes/regrtest_summery.html rename to _includes/regrtest_summary.html index c7e52fea8..c3e0d98d9 100644 --- a/_includes/regrtest_summery.html +++ b/_includes/regrtest_summary.html @@ -36,6 +36,13 @@ Total Tests: {{ result_total }}
+
+ {% if include.extime %} + Exec Time: + {{ include.extime }} + {% endif %} +
+
diff --git a/_layouts/regrtests_results.html b/_layouts/regrtests_results.html index 84c0dcf03..07924b5d5 100644 --- a/_layouts/regrtests_results.html +++ b/_layouts/regrtests_results.html @@ -27,6 +27,22 @@
+ +
+
+
+

Summary: +

+ {% assign regrtests_results = site.data.regrtests_results %} + {% include regrtest_summary.html + pass=regrtests_results.num_passed + skip=regrtests_results.num_skipped + fail=regrtests_results.num_failed + extime=regrtests_results.execution_time + %} +
+
+ {% for test in site.data.regrtests_results.suites %}
@@ -60,7 +76,7 @@
{% if result.num_passed and result.num_skipped and result.num_failed %}
- {% include regrtest_summery.html pass=result.num_passed skip=result.num_skipped fail=result.num_failed %} + {% include regrtest_summary.html pass=result.num_passed skip=result.num_skipped fail=result.num_failed extime=result.execution_time %}
{% endif %}
From 4cf049261473073406b2298ad0ca4904ea3def63 Mon Sep 17 00:00:00 2001 From: Rachel Powers Date: Tue, 26 May 2020 18:45:51 -0600 Subject: [PATCH 3/5] round the number for svg output --- _includes/regrtest_summary.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_includes/regrtest_summary.html b/_includes/regrtest_summary.html index c3e0d98d9..b49639975 100644 --- a/_includes/regrtest_summary.html +++ b/_includes/regrtest_summary.html @@ -20,9 +20,9 @@ text-rendering="geometricPrecision" font-size="110"> Results - Pass {{ pass_percent }}% - Skip {{ skip_percent }}% - Fail {{ fail_percent }}% + Pass {{ pass_percent | round: 1 }}% + Skip {{ skip_percent | round: 1 }}% + Fail {{ fail_percent | round: 1 }}% From 83f15eda0d504b3c736abce98907b2102c403c4a Mon Sep 17 00:00:00 2001 From: Rachel Powers Date: Tue, 26 May 2020 18:58:29 -0600 Subject: [PATCH 4/5] make sure the summary is only dependant on passed in values --- _includes/regrtest_summary.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_includes/regrtest_summary.html b/_includes/regrtest_summary.html index b49639975..7e7c25dae 100644 --- a/_includes/regrtest_summary.html +++ b/_includes/regrtest_summary.html @@ -47,15 +47,15 @@
Passed: - {{ result.num_passed }} ({{ pass_percent }}%) + {{ include.pass }} ({{ pass_percent }}%)
Skipped: - {{ result.num_skipped }} ({{ skip_percent }}%) + {{ include.skip }} ({{ skip_percent }}%)
Failed: - {{ result.num_failed }} ({{ fail_percent }}%) + {{ include.fail }} ({{ fail_percent }}%)
Date: Tue, 26 May 2020 22:09:02 -0600 Subject: [PATCH 5/5] adjust colors and bar height --- _includes/regrtest_summary.html | 21 +++++++++++---------- assets/style.css | 10 +++++++++- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/_includes/regrtest_summary.html b/_includes/regrtest_summary.html index 7e7c25dae..159263b55 100644 --- a/_includes/regrtest_summary.html +++ b/_includes/regrtest_summary.html @@ -4,8 +4,9 @@ {% assign fail_percent = include.fail | times: 100.0 | divided_by: result_total | round: 2 %} {% assign pass_color = "#4c1" %} -{% assign skip_color = "#dfb317" %} +{% assign skip_color = "#e4df12" %} {% assign fail_color = "#fe7d37" %} +{% assign bar_height = "20px" %} {%if include.svg %} @@ -32,11 +33,11 @@
-
+
Total Tests: {{ result_total }}
-
+
{% if include.extime %} Exec Time: {{ include.extime }} @@ -45,26 +46,26 @@
-
+
Passed: {{ include.pass }} ({{ pass_percent }}%)
-
+
Skipped: {{ include.skip }} ({{ skip_percent }}%)
-
+
Failed: {{ include.fail }} ({{ fail_percent }}%)
+ height: {{ bar_height }};">
diff --git a/assets/style.css b/assets/style.css index 040f7116a..972cc3c31 100644 --- a/assets/style.css +++ b/assets/style.css @@ -334,4 +334,12 @@ ul.list-inline { .filter.active { background-color: #FFD43B; -} \ No newline at end of file +} + +/* classes used in the results summary */ + +.cell_summary { + flex: 4; + border-bottom: 1px solid white; + align-self: end; +}