diff options
author | zmiao <miao.zhao@mapbox.com> | 2019-10-29 20:59:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-29 20:59:29 +0200 |
commit | c8576e089f12438a2384a4fe822af650e94ace74 (patch) | |
tree | ad69be13bc00c2dbece7cceedd5007b7532fe173 /render-test/parser.hpp | |
parent | 84f2ff1084ccaec68c7a26243367ae657f6ebe60 (diff) | |
download | qtlocation-mapboxgl-c8576e089f12438a2384a4fe822af650e94ace74.tar.gz |
[render-test] Add manifest parser for render-test-runner (#15861)
* [render-test] Add manifest parser for render-test-runner
* [render-test] Refactory manifest parser
* [render-test] Parse full manifest file through CLI
* [render-test] Add linux probe manifest
Diffstat (limited to 'render-test/parser.hpp')
-rw-r--r-- | render-test/parser.hpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/render-test/parser.hpp b/render-test/parser.hpp index 1985b9cffc..3d79ac668a 100644 --- a/render-test/parser.hpp +++ b/render-test/parser.hpp @@ -5,15 +5,15 @@ #include <mbgl/util/rapidjson.hpp> #include <mbgl/util/variant.hpp> -#include <tuple> #include <string> +#include <tuple> #include <vector> +class Manifest; + using ErrorMessage = std::string; using JSONReply = mbgl::variant<mbgl::JSDocument, ErrorMessage>; -using ArgumentsTuple = std::tuple<bool, bool, uint32_t, std::string, std::string, std::vector<TestPaths>>; - JSONReply readJson(const mbgl::filesystem::path&); std::string serializeJsonValue(const mbgl::JSValue&); std::string serializeMetrics(const TestMetrics&); @@ -23,21 +23,9 @@ std::vector<std::string> readExpectedJSONEntries(const mbgl::filesystem::path& b TestMetrics readExpectedMetrics(const mbgl::filesystem::path& path); -const std::string getTestPath(const std::string& rootTestPath); -const mbgl::filesystem::path getValidPath(const std::string& basePath, const std::string& subPath); - -ArgumentsTuple parseArguments(int argc, char** argv); -std::vector<std::pair<std::string, std::string>> parseIgnores(const std::string& testRootPath, - const std::string& ignoresPath); - -TestMetadata parseTestMetadata(const TestPaths& paths, const std::string& testRootPath); +TestMetadata parseTestMetadata(const TestPaths& paths, const Manifest& manifest); std::string createResultPage(const TestStatistics&, const std::vector<TestMetadata>&, bool shuffle, uint32_t seed); -std::string localizeURL(const std::string& url, const std::string& testPath); - std::string toJSON(const mbgl::Value& value, unsigned indent, bool singleLine); std::string toJSON(const std::vector<mbgl::Feature>& features, unsigned indent, bool singleLine); - -void localizeSourceURLs(mbgl::JSValue& root, mbgl::JSDocument& document, const std::string& testPath); -void localizeStyleURLs(mbgl::JSValue& root, mbgl::JSDocument& document, const std::string& testPath); |