mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 12:18:01 +01:00
Load TestSuite.xml configuration file relative to POCO_BASE and not
relative to the path of the testsuite executable. Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "CppUnit/TestRunner.h"
|
#include "CppUnit/TestRunner.h"
|
||||||
#include "NetSSLTestSuite.h"
|
#include "NetSSLTestSuite.h"
|
||||||
|
#include "Poco/Path.h"
|
||||||
#include "Poco/Util/Application.h"
|
#include "Poco/Util/Application.h"
|
||||||
#include "Poco/Net/HTTPStreamFactory.h"
|
#include "Poco/Net/HTTPStreamFactory.h"
|
||||||
#include "Poco/Net/HTTPSStreamFactory.h"
|
#include "Poco/Net/HTTPSStreamFactory.h"
|
||||||
@@ -52,7 +53,17 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void initialize(Poco::Util::Application& self)
|
void initialize(Poco::Util::Application& self)
|
||||||
{
|
{
|
||||||
loadConfiguration(); // load default configuration files, if present
|
std::string pocoBase(Poco::Environment::get("POCO_BASE"));
|
||||||
|
if (pocoBase.empty())
|
||||||
|
throw Poco::LogicException("POCO_BASE should be defined");
|
||||||
|
|
||||||
|
Poco::Path configPath(pocoBase);
|
||||||
|
configPath.makeDirectory();
|
||||||
|
configPath.pushDirectory("NetSSL_OpenSSL");
|
||||||
|
configPath.pushDirectory("testsuite");
|
||||||
|
configPath.setFileName("TestSuite.xml");
|
||||||
|
|
||||||
|
loadConfiguration(configPath.toString());
|
||||||
Poco::Util::Application::initialize(self);
|
Poco::Util::Application::initialize(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user