summaryrefslogtreecommitdiff
path: root/render-test/render_test.cpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-01-08 13:41:35 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-01-08 14:58:05 +0200
commit5a0f43037fc77d200a3759e15b258fc4e5717b43 (patch)
treed6f88a23fc74cbc93b0c360d936af5c788b2c21d /render-test/render_test.cpp
parent87013ad6e1138af44f5d37d18973ec6c4236db56 (diff)
downloadqtlocation-mapboxgl-5a0f43037fc77d200a3759e15b258fc4e5717b43.tar.gz
[render-test] Remove positional argument
Not in use, for running a single test, use -f instead.
Diffstat (limited to 'render-test/render_test.cpp')
-rw-r--r--render-test/render_test.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/render-test/render_test.cpp b/render-test/render_test.cpp
index f140b7d5b3..c6595a7b7f 100644
--- a/render-test/render_test.cpp
+++ b/render-test/render_test.cpp
@@ -44,7 +44,7 @@ void operator delete(void* ptr, size_t) noexcept {
namespace {
using ArgumentsTuple = std::
- tuple<bool, bool, bool, uint32_t, std::string, TestRunner::UpdateResults, std::vector<std::string>, std::string>;
+ tuple<bool, bool, bool, uint32_t, std::string, TestRunner::UpdateResults, std::string>;
ArgumentsTuple parseArguments(int argc, char** argv) {
const static std::unordered_map<std::string, TestRunner::UpdateResults> updateResultsFlags = {
{"default", TestRunner::UpdateResults::DEFAULT},
@@ -74,8 +74,6 @@ ArgumentsTuple parseArguments(int argc, char** argv) {
{'u', "update"},
updateResultsFlags);
- args::PositionalList<std::string> testNameValues(argumentParser, "URL", "Test name(s)");
-
try {
argumentParser.ParseCLI(argc, argv);
} catch (const args::Help&) {
@@ -105,7 +103,6 @@ ArgumentsTuple parseArguments(int argc, char** argv) {
exit(3);
}
- auto testNames = testNameValues ? args::get(testNameValues) : std::vector<std::string>{};
auto testFilter = testFilterValue ? args::get(testFilterValue) : std::string{};
const auto shuffle = shuffleFlag ? args::get(shuffleFlag) : false;
const auto online = onlineFlag ? args::get(onlineFlag) : false;
@@ -118,7 +115,6 @@ ArgumentsTuple parseArguments(int argc, char** argv) {
seed,
manifestPath.string(),
updateResults,
- std::move(testNames),
std::move(testFilter)};
}
} // namespace
@@ -131,16 +127,15 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) {
bool online;
uint32_t seed;
std::string manifestPath;
- std::vector<std::string> testNames;
std::string testFilter;
TestRunner::UpdateResults updateResults;
- std::tie(recycleMap, shuffle, online, seed, manifestPath, updateResults, testNames, testFilter) =
+ std::tie(recycleMap, shuffle, online, seed, manifestPath, updateResults, testFilter) =
parseArguments(argc, argv);
ProxyFileSource::setOffline(!online);
- auto manifestData = ManifestParser::parseManifest(manifestPath, testNames, testFilter);
+ auto manifestData = ManifestParser::parseManifest(manifestPath, testFilter);
if (!manifestData) {
exit(5);
}
@@ -246,9 +241,8 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) {
}
}
- const auto manifestName = std::string("_").append(mbgl::filesystem::path(manifestPath).stem());
- const auto resultPath = manifest.getResultPath() + "/" + (testNames.empty() ? "render-tests" : testNames.front()) +
- manifestName + "_index.html";
+ const std::string manifestName = mbgl::filesystem::path(manifestPath).stem();
+ const std::string resultPath = manifest.getResultPath() + "/" + manifestName + ".html";
std::string resultsHTML = createResultPage(stats, metadatas, shuffle, seed);
mbgl::util::write_file(resultPath, resultsHTML);