summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2021-03-15 11:20:17 +0200
committerPekka Paalanen <pq@iki.fi>2021-04-17 11:53:16 +0000
commit640682115ec32a3964362cc87ce660fe67de35cb (patch)
tree7cf52e0a542eb667ca4f5a6eb859d2f43809225e
parent0db9176cbda0e8ac85b432935163785f1e606182 (diff)
downloadweston-640682115ec32a3964362cc87ce660fe67de35cb.tar.gz
CI: a new style for LCOV reports
The standard style of LCOV HTML reports is a bit harsh to look at. This commit replaces it with a new one. The new CSS was written from scratch by looking at the HTML source code of a generated LCOV report. The original gcov.css file was not used. The color scheme is neutral, trying to avoid a Christmas tree effect. The colors are intended to be calm while also distinguishable, and not hamper text readability. The font lists were taken from Gitlab with the hope that it will blend in a little better when viewing from MR artifacts. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-rw-r--r--.gitlab-ci.yml3
-rw-r--r--doc/style/lcov-style.css158
-rw-r--r--doc/style/nottaken.pngbin0 -> 149 bytes
-rw-r--r--doc/style/taken.pngbin0 -> 947 bytes
4 files changed, 161 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index db2e42bf..c52dca96 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -139,6 +139,9 @@ docs-and-coverage:
script:
- mv prefix-weston-build-docs/share/doc/weston Documentation
- mv build-weston-build-native-meson-default-options/meson-logs/coveragereport Test_Coverage
+ - rm Test_Coverage/gcov.css
+ - cp doc/style/lcov-style.css Test_Coverage/gcov.css
+ - cp doc/style/*.png Test_Coverage/
- rm -rf build-* prefix-*
dependencies:
- build-docs
diff --git a/doc/style/lcov-style.css b/doc/style/lcov-style.css
new file mode 100644
index 00000000..e5b35219
--- /dev/null
+++ b/doc/style/lcov-style.css
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2021 Collabora, Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+body {
+ background-color: #f2f2f2;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
+ "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif,
+ "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
+ "Noto Color Emoji";
+}
+
+.sourceHeading, .source, .coverFn,
+.testName, .testPer, .testNum,
+.coverLegendCovLo, .headerCovTableEntryLo, .coverPerLo, .coverNumLo,
+.coverLegendCovMed, .headerCovTableEntryMed, .coverPerMed, .coverNumMed,
+.coverLegendCovHi, .headerCovTableEntryHi, .coverPerHi, .coverNumHi,
+.coverFile {
+ font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono",
+ "Consolas", "Ubuntu Mono", "Courier New", "andale mono",
+ "lucida console", monospace;
+}
+
+pre {
+ font-size: 0.7875rem;
+}
+
+.headerCovTableEntry, .testPer, .testNum, .testName,
+.coverLegendCovLo, .headerCovTableEntryLo, .coverPerLo, .coverNumLo,
+.coverLegendCovMed, .headerCovTableEntryMed, .coverPerMed, .coverNumMed,
+.coverLegendCovHi, .headerCovTableEntryHi, .coverPerHi, .coverNumHi {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.coverPerLo, .coverPerMed, .coverPerHi, .testPer {
+/* font-weight: bold;*/
+}
+
+.coverNumLo, .coverNumMed, .coverNumHi, .testNum {
+ font-style: italic;
+ font-size: 90%;
+ padding-left: 1em;
+}
+
+.title {
+ font-size: 200%;
+}
+
+.tableHead {
+ text-align: center;
+ font-weight: bold;
+ background-color: #bfbfbf;
+}
+
+.coverFile, .coverBar, .coverFn {
+ background-color: #d9d9d9;
+}
+
+.headerCovTableHead {
+ font-weight: bold;
+ text-align: right;
+}
+
+.headerCovTableEntry {
+ background-color: #d9d9d9;
+}
+
+.coverFnLo,
+.coverLegendCovLo, .headerCovTableEntryLo, .coverPerLo, .coverNumLo {
+ background-color: #f2dada;
+}
+
+.coverFnHi,
+.coverLegendCovMed, .headerCovTableEntryMed, .coverPerMed, .coverNumMed {
+ background-color: #add9ad;
+}
+
+.coverLegendCovHi, .headerCovTableEntryHi, .coverPerHi, .coverNumHi {
+ background-color: #59b359;
+}
+
+.coverBarOutline {
+ border-style: solid;
+ border-width: 1px;
+ border-color: black;
+ padding: 0px;
+}
+
+.coverFnLo, .coverFnHi {
+ text-align: right;
+}
+
+.lineNum {
+ background-color: #d9d9d9;
+}
+
+.coverLegendCov, .lineCov, .branchCov {
+ background-image: url("taken.png");
+ background-repeat: repeat-y;
+ background-position: left top;
+ background-color: #c6ffb8;
+}
+
+.coverLegendNoCov, .lineNoCov, .branchNoCov, .branchNoExec {
+ background-image: url("nottaken.png");
+ background-repeat: repeat-y;
+ background-position: left top;
+ background-color: #ffcfbb;
+}
+
+.coverLegendCov, .coverLegendNoCov {
+ padding: 0em 1em 0em 1em;
+}
+
+.headerItem, .headerValue, .headerValueLeg {
+ white-space: nowrap;
+}
+
+.headerItem {
+ text-align: right;
+ font-weight: bold;
+}
+
+.ruler {
+ background-color: #d9d9d9;
+}
+
+.detail {
+ font-size: 80%;
+}
+
+.versionInfo {
+ font-size: 80%;
+ text-align: right;
+}
+
diff --git a/doc/style/nottaken.png b/doc/style/nottaken.png
new file mode 100644
index 00000000..ebe34ec8
--- /dev/null
+++ b/doc/style/nottaken.png
Binary files differ
diff --git a/doc/style/taken.png b/doc/style/taken.png
new file mode 100644
index 00000000..6a07a1b7
--- /dev/null
+++ b/doc/style/taken.png
Binary files differ