[render-test] Wrap test data inside RenderTestRunner App + Add a new test app (#15887)

* [render-test] Wrap test resources inside app

* [render-test] Add test app

* fix test app failure

* [render-test]add callback + add javaObjectWrapper
This commit is contained in:
zmiao
2019-11-19 20:45:30 +02:00
committed by GitHub
parent abdd32d11f
commit 1b58e87f15
17 changed files with 400 additions and 79 deletions

View File

@@ -100,7 +100,7 @@ ArgumentsTuple parseArguments(int argc, char** argv) {
} // namespace
namespace mbgl {
int runRenderTests(int argc, char** argv) {
int runRenderTests(int argc, char** argv, std::function<void()> testStatus) {
bool recycleMap;
bool shuffle;
uint32_t seed;
@@ -198,10 +198,12 @@ int runRenderTests(int argc, char** argv) {
}
metadatas.push_back(std::move(metadata));
if (testStatus) {
testStatus();
}
}
const auto& testRootPath = manifest.getManifestPath();
const auto resultPath =
testRootPath + "/" + (testNames.empty() ? "render-tests" : testNames.front()) + "_index.html";
manifest.getResultPath() + "/" + (testNames.empty() ? "render-tests" : testNames.front()) + "_index.html";
std::string resultsHTML = createResultPage(stats, metadatas, shuffle, seed);
mbgl::util::write_file(resultPath, resultsHTML);