[test-runner] Add iOS RenderTestRunner test metrics (#16139)

* [test-runner] Add iOS RenderTestRunner test metrics

* [test-runner] Add ios probe metrics
This commit is contained in:
zmiao
2020-01-24 15:45:47 +02:00
committed by GitHub
parent 61ab64906e
commit 429292fb98
1118 changed files with 38881 additions and 46 deletions

View File

@@ -9,9 +9,9 @@
#define EXPORT __attribute__((visibility("default")))
EXPORT
bool TestRunner::startTest(const std::string& manifest) {
bool TestRunner::startTest(const std::string& manifestBasePath) {
auto runTestWithManifest = [](const std::string& manifest) -> bool {
std::vector<std::string> arguments = {"mbgl-render-test-runner", "-p", manifest};
std::vector<std::string> arguments = {"mbgl-render-test-runner", "-p", manifest, "-u", "rebaseline"};
std::vector<char*> argv;
for (const auto& arg : arguments) {
argv.push_back(const_cast<char*>(arg.data()));
@@ -24,17 +24,26 @@ bool TestRunner::startTest(const std::string& manifest) {
};
mbgl::Log::Info(mbgl::Event::General, "Start running RenderTestRunner with manifest: '%s'", manifest.c_str());
auto result = mbgl::runRenderTests(static_cast<int>(argv.size() - 1), argv.data(), testStatus) == 0;
mbgl::Log::Info(mbgl::Event::General, "End running RenderTestRunner with manifest: '%s'", manifest.c_str());
return result;
auto result = mbgl::runRenderTests(static_cast<int>(argv.size() - 1), argv.data(), testStatus);
mbgl::Log::Info(mbgl::Event::General,
"End running RenderTestRunner with manifest: '%s' with result value %d",
manifest.c_str(),
result);
return result == 0;
};
auto ret = false;
bool status = false;
try {
ret = runTestWithManifest(manifest);
status = runTestWithManifest(manifestBasePath + "/next-ios-render-test-runner-style.json");
status = runTestWithManifest(manifestBasePath + "/next-ios-render-test-runner-metrics.json") && status;
} catch (...) {
mbgl::Log::Info(mbgl::Event::General, "testFailed");
mbgl::Log::Info(mbgl::Event::General, "Failed with exception");
}
mbgl::Log::Info(mbgl::Event::General, "All tests are finished!");
return ret;
if (!status) {
mbgl::Log::Info(mbgl::Event::General, "There are failing test cases");
}
return status;
}