[render-test] Cleanup on the render tests results

Simplify the code path and make it print both rendering error and
metrics on fail.
This commit is contained in:
Thiago Marcos P. Santos
2019-12-16 00:49:04 +02:00
parent e298435206
commit ad1a7c595d
5 changed files with 129 additions and 120 deletions

View File

@@ -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());