Use POCO_BASE for finding the configuration file on POCO_OS_FAMILY_UNIX

Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
FrancisANDRE
2015-12-07 17:14:18 +01:00
parent 51bd3d9798
commit 84d36a31fb

View File

@@ -53,6 +53,7 @@ public:
protected:
void initialize(Poco::Util::Application& self)
{
#ifdef POCO_OS_FAMILY_UNIX
std::string pocoBase(Poco::Environment::get("POCO_BASE"));
if (pocoBase.empty())
throw Poco::LogicException("POCO_BASE should be defined");
@@ -64,6 +65,9 @@ protected:
configPath.setFileName("TestSuite.xml");
loadConfiguration(configPath.toString());
#else
loadConfiguration();
#endif
Poco::Util::Application::initialize(self);
}