#pragma once #include #include #include #include #include namespace DB { using XMLConfiguration = Poco::Util::XMLConfiguration; using XMLConfigurationPtr = Poco::AutoPtr; using XMLDocumentPtr = Poco::AutoPtr; class ConfigPreprocessor { public: ConfigPreprocessor(const Strings & paths_) : paths(paths_) {} std::vector processConfig( const Strings & tests_tags, const Strings & tests_names, const Strings & tests_names_regexp, const Strings & skip_tags, const Strings & skip_names, const Strings & skip_names_regexp) const; private: enum class FilterType { Tag, Name, Name_regexp }; /// Removes configurations that has a given value. /// If leave is true, the logic is reversed. void removeConfigurationsIf( std::vector & configs, FilterType filter_type, const Strings & values, bool leave = false) const; const Strings paths; }; }