mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-17 03:55:59 +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:
parent
95f1a7c30d
commit
627f76232c
@ -14,6 +14,7 @@
|
||||
|
||||
#include "CppUnit/TestRunner.h"
|
||||
#include "NetSSLTestSuite.h"
|
||||
#include "Poco/Path.h"
|
||||
#include "Poco/Util/Application.h"
|
||||
#include "Poco/Net/HTTPStreamFactory.h"
|
||||
#include "Poco/Net/HTTPSStreamFactory.h"
|
||||
@ -52,7 +53,17 @@ public:
|
||||
protected:
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user