summaryrefslogtreecommitdiff
path: root/render-test/render_test.cpp
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2019-11-19 20:45:30 +0200
committerGitHub <noreply@github.com>2019-11-19 20:45:30 +0200
commit1b58e87f154bf7d3d5f38ef32cc4b171362f73a2 (patch)
treecf692c1fbee906e2370ec0f6d684d5b5bb838e61 /render-test/render_test.cpp
parentabdd32d11fcd9cebe0631afbfd2aba9e78c7d790 (diff)
downloadqtlocation-mapboxgl-1b58e87f154bf7d3d5f38ef32cc4b171362f73a2.tar.gz
[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
Diffstat (limited to 'render-test/render_test.cpp')
-rw-r--r--render-test/render_test.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/render-test/render_test.cpp b/render-test/render_test.cpp
index 38d6c15f3f..5753065a7e 100644
--- a/render-test/render_test.cpp
+++ b/render-test/render_test.cpp
@@ -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);