summaryrefslogtreecommitdiff
path: root/render-test/render_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'render-test/render_test.cpp')
-rw-r--r--render-test/render_test.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/render-test/render_test.cpp b/render-test/render_test.cpp
index df1658265a..2cf3f5fd65 100644
--- a/render-test/render_test.cpp
+++ b/render-test/render_test.cpp
@@ -44,12 +44,12 @@ int runRenderTests(int argc, char** argv) {
bool shuffle;
uint32_t seed;
std::string testRootPath;
+ std::string ignoresPath;
std::vector<TestPaths> testPaths;
- std::tie(recycleMap, shuffle, seed, testRootPath, testPaths) = parseArguments(argc, argv);
- const std::string::size_type rootLength = testRootPath.length();
+ std::tie(recycleMap, shuffle, seed, testRootPath, ignoresPath, testPaths) = parseArguments(argc, argv);
- const auto ignores = parseIgnores();
+ const auto ignores = parseIgnores(testRootPath, ignoresPath);
if (shuffle) {
printf(ANSI_COLOR_YELLOW "Shuffle seed: %d" ANSI_COLOR_RESET "\n", seed);
@@ -60,7 +60,7 @@ int runRenderTests(int argc, char** argv) {
}
mbgl::util::RunLoop runLoop;
- TestRunner runner;
+ TestRunner runner(testRootPath);
std::vector<TestMetadata> metadatas;
metadatas.reserve(testPaths.size());
@@ -68,7 +68,7 @@ int runRenderTests(int argc, char** argv) {
TestStatistics stats;
for (auto& testPath : testPaths) {
- TestMetadata metadata = parseTestMetadata(testPath);
+ TestMetadata metadata = parseTestMetadata(testPath, testRootPath);
if (!recycleMap) {
runner.reset();
@@ -78,6 +78,7 @@ int runRenderTests(int argc, char** argv) {
std::string& status = metadata.status;
std::string& color = metadata.color;
+ const std::string::size_type rootLength = getTestPath(testRootPath).length();
id = testPath.defaultExpectations();
id = id.substr(rootLength + 1, id.length() - rootLength - 2);
@@ -166,4 +167,4 @@ int runRenderTests(int argc, char** argv) {
return stats.failedTests + stats.erroredTests == 0 ? 0 : 1;
}
-} // namespace mbgl \ No newline at end of file
+} // namespace mbgl