diff options
Diffstat (limited to 'cpp/test/IceSSL/configuration/Server.cpp')
-rw-r--r-- | cpp/test/IceSSL/configuration/Server.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cpp/test/IceSSL/configuration/Server.cpp b/cpp/test/IceSSL/configuration/Server.cpp index 3b411160c37..ed1ddb25e74 100644 --- a/cpp/test/IceSSL/configuration/Server.cpp +++ b/cpp/test/IceSSL/configuration/Server.cpp @@ -16,12 +16,22 @@ DEFINE_TEST("server") using namespace std; int -run(int, char**, const Ice::CommunicatorPtr& communicator) +run(int argc, char** argv, const Ice::CommunicatorPtr& communicator) { + string testdir; +#if TARGET_OS_IPHONE == 0 + if(argc < 2) + { + cerr << "Usage: " << argv[0] << " testdir" << endl; + return 1; + } + testdir = string(argv[1]) + "/../certs"; +#endif + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0, "tcp")); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::Identity id = Ice::stringToIdentity("factory"); - adapter->add(ICE_MAKE_SHARED(ServerFactoryI), id); + adapter->add(ICE_MAKE_SHARED(ServerFactoryI, testdir), id); adapter->activate(); TEST_READY communicator->waitForShutdown(); |