[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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user