From d148908cf14c78505ebc924a1783bbd44de0e399 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Wed, 8 Jan 2020 13:46:05 +0200 Subject: [render-test] Make the manifest mandatory At the moment we have an invalid path as default. --- render-test/manifest_parser.cpp | 4 ++-- render-test/render_test.cpp | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'render-test') diff --git a/render-test/manifest_parser.cpp b/render-test/manifest_parser.cpp index 18b4b98cdd..4d2952c761 100644 --- a/render-test/manifest_parser.cpp +++ b/render-test/manifest_parser.cpp @@ -282,8 +282,8 @@ mbgl::optional ManifestParser::parseManifest(const std::string& manife expectedMetricPaths.emplace_back("/sdcard/baselines/"); #endif testPaths.emplace_back(testPath, - getTestExpectations(defaultExpectationPath, testId, expectationPaths), - getTestExpectations(defaultExpectationPath, testId, expectedMetricPaths)); + getTestExpectations(defaultExpectationPath, testId, expectationPaths), + getTestExpectations(defaultExpectationPath, testId, expectedMetricPaths)); } } diff --git a/render-test/render_test.cpp b/render-test/render_test.cpp index c6595a7b7f..c4ea7e64ab 100644 --- a/render-test/render_test.cpp +++ b/render-test/render_test.cpp @@ -43,8 +43,7 @@ void operator delete(void* ptr, size_t) noexcept { namespace { -using ArgumentsTuple = std:: - tuple; +using ArgumentsTuple = std::tuple; ArgumentsTuple parseArguments(int argc, char** argv) { const static std::unordered_map updateResultsFlags = { {"default", TestRunner::UpdateResults::DEFAULT}, @@ -62,7 +61,7 @@ ArgumentsTuple parseArguments(int argc, char** argv) { argumentParser, "online", "Toggle online mode (by default tests will run offline)", {'o', "online"}); args::ValueFlag seedValue(argumentParser, "seed", "Shuffle seed (default: random)", {"seed"}); args::ValueFlag testPathValue( - argumentParser, "manifestPath", "Test manifest file path", {'p', "manifestPath"}); + argumentParser, "manifestPath", "Test manifest file path", {'p', "manifestPath"}, args::Options::Required); args::ValueFlag testFilterValue(argumentParser, "filter", "Test filter regex", {'f', "filter"}); args::MapFlag testUpdateResultsValue( argumentParser, @@ -95,7 +94,7 @@ ArgumentsTuple parseArguments(int argc, char** argv) { exit(2); } - mbgl::filesystem::path manifestPath{testPathValue ? args::get(testPathValue) : std::string{TEST_RUNNER_ROOT_PATH}}; + mbgl::filesystem::path manifestPath = args::get(testPathValue); if (!mbgl::filesystem::exists(manifestPath) || !manifestPath.has_filename()) { mbgl::Log::Error(mbgl::Event::General, "Provided test manifest file path '%s' does not exist", @@ -130,8 +129,7 @@ int runRenderTests(int argc, char** argv, std::function testStatus) { std::string testFilter; TestRunner::UpdateResults updateResults; - std::tie(recycleMap, shuffle, online, seed, manifestPath, updateResults, testFilter) = - parseArguments(argc, argv); + std::tie(recycleMap, shuffle, online, seed, manifestPath, updateResults, testFilter) = parseArguments(argc, argv); ProxyFileSource::setOffline(!online); -- cgit v1.2.1