summaryrefslogtreecommitdiff
path: root/render-test/parser.cpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2019-12-16 00:49:04 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2019-12-16 22:52:01 +0200
commitad1a7c595d240ea22fcb2609f29626dd3b96c6be (patch)
tree45ed22079f7a062f57abcc920995fa9a36190d9a /render-test/parser.cpp
parente298435206b6f7631a6e85f2e75544f201866909 (diff)
downloadqtlocation-mapboxgl-ad1a7c595d240ea22fcb2609f29626dd3b96c6be.tar.gz
[render-test] Cleanup on the render tests results
Simplify the code path and make it print both rendering error and metrics on fail.
Diffstat (limited to 'render-test/parser.cpp')
-rw-r--r--render-test/parser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/render-test/parser.cpp b/render-test/parser.cpp
index 05f0e16293..88c5f5cac2 100644
--- a/render-test/parser.cpp
+++ b/render-test/parser.cpp
@@ -1311,6 +1311,10 @@ std::string createResultItem(const TestMetadata& metadata, bool hasFailedTests)
html.append(" src=\"data:image/png;base64," + encodeBase64(metadata.actual) + "\">\n");
}
}
+
+ if (metadata.metricsFailed) {
+ html.append("<p style=\"color: red\"><strong>Error:</strong> " + metadata.errorMessage + "</p>\n");
+ }
} else {
// FIXME: there are several places that errorMessage is not filled
// comment out assert(!metadata.errorMessage.empty());