diff options
Diffstat (limited to 'cpp/test/Ice/operations/Client.cpp')
-rw-r--r-- | cpp/test/Ice/operations/Client.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/cpp/test/Ice/operations/Client.cpp b/cpp/test/Ice/operations/Client.cpp index 1ab648ca9cd..b448e20094d 100644 --- a/cpp/test/Ice/operations/Client.cpp +++ b/cpp/test/Ice/operations/Client.cpp @@ -16,30 +16,34 @@ DEFINE_TEST("client") using namespace std; int -run(int, char**, const Ice::CommunicatorPtr& communicator) +run(int, char**, const Ice::CommunicatorPtr& communicator, bool remote) { Test::MyClassPrxPtr allTests(const Ice::CommunicatorPtr&); Test::MyClassPrxPtr myClass = allTests(communicator); #ifndef ICE_OS_WINRT - cout << "testing server shutdown... " << flush; myClass->shutdown(); - try - { - myClass->opVoid(); - test(false); - } - catch(const Ice::LocalException&) + if(!remote) { - cout << "ok" << endl; + cout << "testing server shutdown... " << flush; + try + { + myClass->opVoid(); + test(false); + } + catch(const Ice::LocalException&) + { + cout << "ok" << endl; + } } #else // // When using SSL the run.py script starts a new server after shutdown - // and the call to opVoid will success. + // and the call to opVoid will succeed. // myClass->shutdown(); #endif + return EXIT_SUCCESS; } @@ -48,6 +52,9 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try @@ -64,11 +71,14 @@ main(int argc, char* argv[]) initData.properties->setProperty("Ice.BatchAutoFlushSize", "100"); Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/operations", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator(), rc.isRemote()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { cerr << ex << endl; - return EXIT_FAILURE; + return EXIT_FAILURE; } } |