| 127 | } |
| 128 | |
| 129 | void InitDataSource(FrozenDataSource & dataSource, string const & mwmListPath) |
| 130 | { |
| 131 | vector<platform::LocalCountryFile> mwms; |
| 132 | if (!mwmListPath.empty()) |
| 133 | { |
| 134 | vector<string> availableMwms; |
| 135 | ReadStringsFromFile(mwmListPath, availableMwms); |
| 136 | for (auto const & countryName : availableMwms) |
| 137 | mwms.emplace_back(GetPlatform().WritableDir(), platform::CountryFile(countryName), 0); |
| 138 | } |
| 139 | else |
| 140 | { |
| 141 | platform::FindAllLocalMapsAndCleanup(numeric_limits<int64_t>::max() /* the latest version */, mwms); |
| 142 | } |
| 143 | |
| 144 | LOG(LINFO, ("Initializing the data source with the following mwms:")); |
| 145 | for (auto & mwm : mwms) |
| 146 | { |
| 147 | mwm.SyncWithDisk(); |
| 148 | LOG(LINFO, (mwm.GetCountryName(), ReadVersionFromHeader(mwm))); |
| 149 | dataSource.RegisterMap(mwm); |
| 150 | } |
| 151 | LOG(LINFO, ()); |
| 152 | } |
| 153 | |
| 154 | unique_ptr<search::tests_support::TestSearchEngine> InitSearchEngine(DataSource & dataSource, string const & locale, |
| 155 | size_t numThreads) |
no test coverage detected