diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-04-24 09:46:12 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-04-24 09:46:12 +0000 |
commit | a5fdbf7412b96cecd45314f9d9eb37aaf77a2bf1 (patch) | |
tree | a2f26b3e3207ac925239385101f18a5459da1664 /cpp/test/IceGrid/allocation/Client.cpp | |
parent | Unix Fix. (diff) | |
download | ice-a5fdbf7412b96cecd45314f9d9eb37aaf77a2bf1.tar.bz2 ice-a5fdbf7412b96cecd45314f9d9eb37aaf77a2bf1.tar.xz ice-a5fdbf7412b96cecd45314f9d9eb37aaf77a2bf1.zip |
Added first cut of the allocation mechanism.
Diffstat (limited to 'cpp/test/IceGrid/allocation/Client.cpp')
-rw-r--r-- | cpp/test/IceGrid/allocation/Client.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/cpp/test/IceGrid/allocation/Client.cpp b/cpp/test/IceGrid/allocation/Client.cpp new file mode 100644 index 00000000000..83746f6a471 --- /dev/null +++ b/cpp/test/IceGrid/allocation/Client.cpp @@ -0,0 +1,55 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <TestCommon.h> +#include <Test.h> + +using namespace std; + +int +run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) +{ + void allTests(const Ice::CommunicatorPtr&); + allTests(communicator); + return EXIT_SUCCESS; +} + +int +main(int argc, char* argv[]) +{ + int status; + Ice::CommunicatorPtr communicator; + try + { + communicator = Ice::initialize(argc, argv); + communicator->getProperties()->parseCommandLineOptions("", Ice::argsToStringSeq(argc, argv)); + status = run(argc, argv, communicator); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + + if(communicator) + { + try + { + communicator->destroy(); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + } + + return status; +} |