[test-runner] Don't update nor create metrics baseline for ignored test
This commit is contained in:
@@ -132,6 +132,7 @@ struct TestMetadata {
|
||||
mbgl::JSDocument document;
|
||||
bool renderTest = true;
|
||||
bool outputsImage = true;
|
||||
bool ignoredTest = false;
|
||||
|
||||
mbgl::Size size{ 512u, 512u };
|
||||
float pixelRatio = 1.0f;
|
||||
|
||||
@@ -169,7 +169,7 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) {
|
||||
const std::string ignoreName = id;
|
||||
const auto it = std::find_if(ignores.cbegin(), ignores.cend(), [&ignoreName](auto pair) { return pair.first == ignoreName; });
|
||||
if (it != ignores.end()) {
|
||||
shouldIgnore = true;
|
||||
metadata.ignoredTest = shouldIgnore = true;
|
||||
ignoreReason = it->second;
|
||||
if (ignoreReason.rfind("skip", 0) == 0) {
|
||||
printf(ANSI_COLOR_GRAY "* skipped %s (%s)" ANSI_COLOR_RESET "\n", id.c_str(), ignoreReason.c_str());
|
||||
|
||||
@@ -315,7 +315,7 @@ bool TestRunner::checkRenderTestResults(mbgl::PremultipliedImage&& actualImage,
|
||||
}
|
||||
|
||||
bool TestRunner::checkProbingResults(TestMetadata& resultMetadata) {
|
||||
if (resultMetadata.metrics.isEmpty()) return true;
|
||||
if (resultMetadata.metrics.isEmpty() || resultMetadata.ignoredTest) return true;
|
||||
const auto writeMetrics = [&resultMetadata](const mbgl::filesystem::path& path,
|
||||
const std::string& message = std::string()) {
|
||||
mbgl::filesystem::create_directories(path);
|
||||
@@ -1250,6 +1250,7 @@ bool runInjectedProbe(TestMetadata& metadata,
|
||||
}
|
||||
|
||||
bool TestRunner::runInjectedProbesBegin(TestMetadata& metadata_, RunContext& ctx_) {
|
||||
if (metadata_.ignoredTest) return true;
|
||||
const std::string mark = " - default - start";
|
||||
static const InjectedProbeMap beginInjectedProbeMap = {
|
||||
{// Injected memory probe begin
|
||||
@@ -1284,6 +1285,7 @@ bool TestRunner::runInjectedProbesBegin(TestMetadata& metadata_, RunContext& ctx
|
||||
}
|
||||
|
||||
bool TestRunner::runInjectedProbesEnd(TestMetadata& metadata_, RunContext& ctx_, mbgl::gfx::RenderingStats stats) {
|
||||
if (metadata_.ignoredTest) return true;
|
||||
const std::string mark = " - default - end";
|
||||
static const InjectedProbeMap endInjectedProbeMap = {
|
||||
{// Injected memory probe end
|
||||
|
||||
Reference in New Issue
Block a user