summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-08 20:43:31 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-08 20:43:31 +0300
commitfb98e89a3283405ebc8100a27d6dbc580ad184f7 (patch)
treebe68be7c9489f475f39468fdbeb6663101630713
parentdb2c855bf9d54fe512fa695ee6bf6c314331fe7c (diff)
downloadmanaverse-fb98e89a3283405ebc8100a27d6dbc580ad184f7.tar.gz
manaverse-fb98e89a3283405ebc8100a27d6dbc580ad184f7.tar.bz2
manaverse-fb98e89a3283405ebc8100a27d6dbc580ad184f7.tar.xz
manaverse-fb98e89a3283405ebc8100a27d6dbc580ad184f7.zip
Use special name for main configuration file in unit tests.
-rw-r--r--src/configmanager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/configmanager.cpp b/src/configmanager.cpp
index 8f0ec3002..e9c130fc1 100644
--- a/src/configmanager.cpp
+++ b/src/configmanager.cpp
@@ -134,10 +134,15 @@ void ConfigManager::initConfiguration()
std::string configPath;
+#ifndef UNITTESTS
if (settings.options.test.empty())
configPath = settings.configDir + "/config.xml";
else
configPath = settings.configDir + "/test.xml";
+#else // UNITTESTS
+
+ configPath = settings.configDir + "/unittestconfig.xml";
+#endif // UNITTESTS
FILE *configFile = fopen(configPath.c_str(), "r");
if (!configFile)