Enable Render test CI (#837)

Co-authored-by: wei chen <wei.chen@grabtaxi.com>
This commit is contained in:
Wei Chen
2023-02-22 19:48:24 +08:00
committed by GitHub
parent c967074af3
commit ea9091fc98
70 changed files with 716 additions and 130 deletions

View File

@@ -564,6 +564,12 @@ TestMetadata parseTestMetadata(const TestPaths& paths) {
}
metadata.renderTest = false;
}
if (testValue.HasMember("ignoreProbing")) {
if (testValue["ignoreProbing"].IsBool()) {
metadata.ignoreProbing = testValue["ignoreProbing"].GetBool();
}
}
if (testValue.HasMember("queryOptions")) {
assert(testValue["queryOptions"].IsObject());
@@ -997,7 +1003,6 @@ TestOperations parseTestOperations(TestMetadata& metadata) {
} else if (operationArray[0].GetString() == networkProbeStartOp) {
// probeNetworkStart
result.emplace_back([](TestContext&) {
assert(!mbgl::ProxyFileSource::isTrackingActive());
mbgl::ProxyFileSource::setTrackingActive(true);
return true;
});
@@ -1007,7 +1012,6 @@ TestOperations parseTestOperations(TestMetadata& metadata) {
assert(operationArray[1].IsString());
std::string mark = std::string(operationArray[1].GetString(), operationArray[1].GetStringLength());
result.emplace_back([mark](TestContext& ctx) {
assert(mbgl::ProxyFileSource::isTrackingActive());
ctx.getMetadata().metrics.network.emplace(
std::piecewise_construct,
std::forward_as_tuple(std::move(mark)),
@@ -1018,7 +1022,6 @@ TestOperations parseTestOperations(TestMetadata& metadata) {
} else if (operationArray[0].GetString() == networkProbeEndOp) {
// probeNetworkEnd
result.emplace_back([](TestContext&) {
assert(mbgl::ProxyFileSource::isTrackingActive());
mbgl::ProxyFileSource::setTrackingActive(false);
return true;
});
@@ -1252,7 +1255,6 @@ TestOperations parseTestOperations(TestMetadata& metadata) {
} else if (operationArray[0].GetString() == gfxProbeStartOp) {
// probeGFXStart
result.emplace_back([](TestContext& ctx) {
assert(!ctx.gfxProbeActive);
ctx.gfxProbeActive = true;
ctx.baselineGfxProbe = ctx.activeGfxProbe;
return true;