Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Yershov <yershov@corp.mail.ru>2016-01-23 17:20:47 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:15:17 +0300
commit12b2911271ad1ac4346ad707a51b9093bee4bbc3 (patch)
tree7065b7b15d0bbdaef3e26141295a8cf0d06b8021 /testing
parent60b16b8067c926c30ad81c50ee8ba20ff5ebdb2a (diff)
[Old map downloader] Migration tests
Diffstat (limited to 'testing')
-rw-r--r--testing/testingmain.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/testing/testingmain.cpp b/testing/testingmain.cpp
index bfbebc97df..5c3dddf114 100644
--- a/testing/testingmain.cpp
+++ b/testing/testingmain.cpp
@@ -13,8 +13,12 @@
#include "std/target_os.hpp"
#include "std/vector.hpp"
+#ifndef OMIM_UNIT_TEST_DISABLE_PLATFORM_INIT
+# include "platform/platform.hpp"
+#endif
+
#ifdef OMIM_UNIT_TEST_WITH_QT_EVENT_LOOP
- #include <Qt>
+ #include <QtCore/Qt>
#ifdef OMIM_OS_MAC // on Mac OS X native run loop works only for QApplication :(
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#include <QtGui/QApplication>
@@ -134,6 +138,16 @@ int main(int argc, char * argv[])
if (g_testingOptions.m_suppressRegExp)
suppressRegExp.assign(g_testingOptions.m_suppressRegExp);
+#ifndef OMIM_UNIT_TEST_DISABLE_PLATFORM_INIT
+ // Setting stored paths from testingmain.cpp
+ Platform & pl = GetPlatform();
+ CommandLineOptions const & options = GetTestingOptions();
+ if (options.m_dataPath)
+ pl.SetWritableDirForTests(options.m_dataPath);
+ if (options.m_resourcePath)
+ pl.SetResourceDir(options.m_resourcePath);
+#endif
+
for (TestRegister * pTest = TestRegister::FirstRegister(); pTest; pTest = pTest->m_pNext)
{
string fileName(pTest->m_FileName);