diff options
305 files changed, 2233 insertions, 1408 deletions
diff --git a/config/PropertyNames.xml b/config/PropertyNames.xml index 4aadaa130a2..be45b789569 100644 --- a/config/PropertyNames.xml +++ b/config/PropertyNames.xml @@ -607,7 +607,6 @@ generated from the section label. </section> <section name="IceBT"> - <property name="DefaultAddress" /> <property name="RcvSize" /> <property name="SndSize" /> </section> diff --git a/cpp/allTests.py b/cpp/allTests.py index 8b84f12ec34..3dcdcecb2da 100755 --- a/cpp/allTests.py +++ b/cpp/allTests.py @@ -39,32 +39,32 @@ tests = [ ("Slice/macros", ["once"]), ("Slice/headers", ["once", "nowin32"]), ("Ice/properties", ["once", "nomingw"]), - ("Ice/proxy", ["core"]), - ("Ice/operations", ["core"]), - ("Ice/exceptions", ["core"]), - ("Ice/ami", ["core", "nocompress"]), + ("Ice/proxy", ["core", "bt"]), + ("Ice/operations", ["core", "bt"]), + ("Ice/exceptions", ["core", "bt"]), + ("Ice/ami", ["core", "nocompress", "bt"]), ("Ice/info", ["core", "noipv6", "nocompress", "nosocks"]), - ("Ice/inheritance", ["core"]), - ("Ice/facets", ["core"]), - ("Ice/objects", ["core"]), - ("Ice/optional", ["core"]), - ("Ice/binding", ["core", "nosocks"]), + ("Ice/inheritance", ["core", "bt"]), + ("Ice/facets", ["core", "bt"]), + ("Ice/objects", ["core", "bt"]), + ("Ice/optional", ["core", "bt"]), + ("Ice/binding", ["core", "nosocks", "bt"]), ("Ice/faultTolerance", ["core", "novalgrind"]), # valgrind reports leak with aborted servers ("Ice/location", ["core"]), ("Ice/adapterDeactivation", ["core"]), - ("Ice/slicing/exceptions", ["core"]), - ("Ice/slicing/objects", ["core"]), + ("Ice/slicing/exceptions", ["core", "bt"]), + ("Ice/slicing/objects", ["core", "bt"]), ("Ice/gc", ["once"]), ("Ice/dispatcher", ["once"]), ("Ice/checksum", ["core"]), ("Ice/stream", ["core"]), - ("Ice/hold", ["core"]), + ("Ice/hold", ["core", "bt"]), ("Ice/custom", ["core", "nossl", "nows"]), ("Ice/retry", ["core"]), ("Ice/timeout", ["core", "nocompress", "nosocks"]), - ("Ice/acm", ["core"]), + ("Ice/acm", ["core", "bt"]), ("Ice/background", ["core", "nomingw", "nosocks"]), - ("Ice/servantLocator", ["core"]), + ("Ice/servantLocator", ["core", "bt"]), ("Ice/interceptor", ["core"]), ("Ice/stringConverter", ["core"]), ("Ice/udp", ["core"]), @@ -75,7 +75,7 @@ tests = [ ("Ice/hash", ["once"]), ("Ice/admin", ["core", "noipv6"]), ("Ice/metrics", ["core", "nossl", "nows", "noipv6", "nocompress", "nomingw", "nosocks"]), - ("Ice/enums", ["once"]), + ("Ice/enums", ["once", "bt"]), ("Ice/logger", ["once"]), ("Ice/networkProxy", ["core", "noipv6", "nosocks"]), ("Ice/services", ["once"]), diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index 7011be23d06..8bf1cbef8b3 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Nov 9 08:34:24 2015 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Nov 24 08:50:30 2015 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -1055,7 +1055,6 @@ const IceInternal::PropertyArray const IceInternal::Property IceBTPropsData[] = { - IceInternal::Property("IceBT.DefaultAddress", false, 0), IceInternal::Property("IceBT.RcvSize", false, 0), IceInternal::Property("IceBT.SndSize", false, 0), }; diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index e4c62ee27e9..8550cbeb155 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Nov 9 08:34:24 2015 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Nov 24 08:50:30 2015 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/cpp/src/IceBT/AcceptorI.cpp b/cpp/src/IceBT/AcceptorI.cpp index 89532aee6f1..e24f4aee492 100644 --- a/cpp/src/IceBT/AcceptorI.cpp +++ b/cpp/src/IceBT/AcceptorI.cpp @@ -57,6 +57,10 @@ IceBT::AcceptorI::listen() { try { + if(!_instance->engine()->adapterExists(_adapter)) + { + throw SocketException(__FILE__, __LINE__, EADDRNOTAVAIL); + } _addr = doBind(_fd, _addr); IceInternal::doListen(_fd, _backlog); } @@ -158,12 +162,6 @@ IceBT::AcceptorI::AcceptorI(const EndpointIPtr& endpoint, const InstancePtr& ins ex.str = "invalid address value `" + _adapter + "' in endpoint " + endpoint->toString(); throw ex; } - if(!_instance->engine()->adapterExists(_adapter)) - { - EndpointParseException ex(__FILE__, __LINE__); - ex.str = "no device found for `" + _adapter + "' in endpoint " + endpoint->toString(); - throw ex; - } _fd = createSocket(); IceInternal::setBlock(_fd, false); diff --git a/cpp/src/IceBT/DBus.cpp b/cpp/src/IceBT/DBus.cpp index 53b631a69d0..883f6fa16bd 100644 --- a/cpp/src/IceBT/DBus.cpp +++ b/cpp/src/IceBT/DBus.cpp @@ -810,7 +810,8 @@ private: }; typedef IceUtil::Handle<MessageI> MessageIPtr; -static void pendingCallback(DBusPendingCall*, void*); +static void pendingCallCompletedCallback(DBusPendingCall*, void*); +static void pendingCallFree(void*); class AsyncResultI : public AsyncResult { @@ -821,14 +822,35 @@ public: _callback(cb), _status(StatusPending) { - if(!::dbus_pending_call_set_notify(_call, pendingCallback, this, 0)) + // + // Bump our refcount to ensure this object lives until the reply is received. + // The pendingFree function will decrement the refcount. + // + __incRef(); + + if(!::dbus_pending_call_set_notify(_call, pendingCallCompletedCallback, this, pendingCallFree)) { + ::dbus_pending_call_cancel(_call); + ::dbus_pending_call_unref(_call); throw ExceptionI("dbus_pending_call_set_notify failed"); } + // - // Bump our refcount to ensure this object lives until the reply is received. + // There's a potential race condition with dbus_pending_call_set_notify. If the + // pending call is already completed when we call dbus_pending_call_set_notify, + // our callback will NOT be invoked. We manually check the completion status + // here and handle the reply if necessary. // - __incRef(); + bool complete; + { + IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_lock); + complete = (::dbus_pending_call_get_completed(_call) && _status == StatusPending); + } + + if(complete) + { + replyReceived(); + } } ~AsyncResultI() @@ -892,17 +914,24 @@ public: void replyReceived() { assert(::dbus_pending_call_get_completed(_call)); - DBusMessage* m = ::dbus_pending_call_steal_reply(_call); - assert(m); AsyncCallbackPtr cb; { IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_lock); - _reply = MessageI::adopt(m); - _status = StatusComplete; - cb = _callback; - _lock.notifyAll(); + + // + // Make sure we haven't already handled the reply (see constructor). + // + if(_status == StatusPending) + { + DBusMessage* m = ::dbus_pending_call_steal_reply(_call); + assert(m); + _reply = MessageI::adopt(m); + _status = StatusComplete; + cb = _callback; + _lock.notifyAll(); + } } if(cb) @@ -915,11 +944,6 @@ public: { } } - - // - // Decrement our refcount (see constructor). This object may be destroyed immediately. - // - __decRef(); } private: @@ -935,13 +959,21 @@ private: }; static void -pendingCallback(DBusPendingCall*, void* userData) +pendingCallCompletedCallback(DBusPendingCall*, void* userData) { AsyncResultI* r = static_cast<AsyncResultI*>(userData); assert(r); r->replyReceived(); } +static void +pendingCallFree(void* userData) +{ + AsyncResultI* r = static_cast<AsyncResultI*>(userData); + assert(r); + r->__decRef(); +} + static DBusHandlerResult filterCallback(DBusConnection*, DBusMessage*, void*); static void freeConnection(void*); diff --git a/cpp/src/IceBT/EndpointI.cpp b/cpp/src/IceBT/EndpointI.cpp index bf1608a28e7..d69f8c0ac34 100644 --- a/cpp/src/IceBT/EndpointI.cpp +++ b/cpp/src/IceBT/EndpointI.cpp @@ -23,6 +23,7 @@ #include <Ice/Properties.h> #include <IceUtil/Random.h> #include <IceUtil/StringUtil.h> +#include <IceUtil/UUID.h> using namespace std; using namespace Ice; @@ -417,7 +418,7 @@ IceBT::EndpointI::options() const } } - if(_channel != 0) + if(_channel > 0) { s << " -c " << _channel; } @@ -455,22 +456,24 @@ IceBT::EndpointI::initWithOptions(vector<string>& args, bool oaEndpoint) if(_addr.empty()) { - const_cast<string&>(_addr) = _instance->properties()->getProperty("IceBT.DefaultAddress"); + const_cast<string&>(_addr) = _instance->defaultHost(); } - if(oaEndpoint && _addr.empty()) + if(_addr.empty() || _addr == "*") { - // - // getDefaultAdapterAddress can throw BluetoothException. - // - const_cast<string&>(_addr) = _instance->engine()->getDefaultAdapterAddress(); - } - - if(!oaEndpoint && _addr.empty()) - { - Ice::EndpointParseException ex(__FILE__, __LINE__); - ex.str = "a device address must be specified using the -a option or IceBT.DefaultAddress"; - throw ex; + if(oaEndpoint) + { + // + // getDefaultAdapterAddress can throw BluetoothException. + // + const_cast<string&>(_addr) = _instance->engine()->getDefaultAdapterAddress(); + } + else + { + Ice::EndpointParseException ex(__FILE__, __LINE__); + ex.str = "a device address must be specified using the -a option or Ice.Default.Host"; + throw ex; + } } if(_name.empty()) @@ -480,9 +483,19 @@ IceBT::EndpointI::initWithOptions(vector<string>& args, bool oaEndpoint) if(_uuid.empty()) { - Ice::EndpointParseException ex(__FILE__, __LINE__); - ex.str = "a UUID must be specified using the -u option"; - throw ex; + if(oaEndpoint) + { + // + // Generate a UUID for object adapters that don't specify one. + // + const_cast<string&>(_uuid) = IceUtil::generateUUID(); + } + else + { + Ice::EndpointParseException ex(__FILE__, __LINE__); + ex.str = "a UUID must be specified using the -u option"; + throw ex; + } } if(_channel < 0) @@ -511,10 +524,11 @@ void IceBT::EndpointI::hashInit() { Int h = 5381; - IceInternal::hashAdd(h, type()); IceInternal::hashAdd(h, _addr); IceInternal::hashAdd(h, _uuid); + IceInternal::hashAdd(h, _timeout); IceInternal::hashAdd(h, _connectionId); + IceInternal::hashAdd(h, _compress); const_cast<Int&>(_hashValue) = h; } @@ -530,7 +544,7 @@ IceBT::EndpointI::checkOption(const string& option, const string& argument, cons ex.str = "no argument provided for -a option in endpoint " + endpoint; throw ex; } - if(!isValidDeviceAddress(arg)) + if(arg != "*" && !isValidDeviceAddress(arg)) { Ice::EndpointParseException ex(__FILE__, __LINE__); ex.str = "invalid argument provided for -a option in endpoint " + endpoint; @@ -558,7 +572,7 @@ IceBT::EndpointI::checkOption(const string& option, const string& argument, cons } istringstream t(argument); - if(!(t >> const_cast<Int&>(_channel)) || !t.eof() || _channel > 30) + if(!(t >> const_cast<Int&>(_channel)) || !t.eof() || _channel < 0 || _channel > 30) { EndpointParseException ex(__FILE__, __LINE__); ex.str = "invalid channel value `" + arg + "' in endpoint " + endpoint; diff --git a/cpp/src/IceBT/Engine.cpp b/cpp/src/IceBT/Engine.cpp index 46e67f47016..308bb52f478 100644 --- a/cpp/src/IceBT/Engine.cpp +++ b/cpp/src/IceBT/Engine.cpp @@ -76,12 +76,34 @@ public: // Block while we establish a DBus connection. // _dbusConnection = DBus::Connection::getSystemBus(); - _dbusConnection->addFilter(this); } catch(const DBus::Exception& ex) { throw BluetoothException(__FILE__, __LINE__, ex.reason); } + + _dbusConnection->addFilter(this); + + try + { + // + // Use a call DefaultAdapter() to verify that the Bluetooth daemon is present and + // uses the expected version (BlueZ 4). If the system is running BlueZ 5, this call + // will return the error org.freedesktop.DBus.Error.UnknownMethod. + // + call("/", "org.bluez.Manager", "DefaultAdapter"); + } + catch(const DBus::Exception& ex) + { + if(ex.reason.find("UnknownMethod") != string::npos) + { + throw BluetoothException(__FILE__, __LINE__, "Bluetooth daemon uses an unsupported version"); + } + else + { + throw BluetoothException(__FILE__, __LINE__, ex.reason); + } + } } // @@ -392,26 +414,50 @@ public: string getDefaultAdapter() const { - // - // The call to DefaultAdapter returns OBJ_PATH. - // - DBus::MessagePtr reply = call("/", "org.bluez.Manager", "DefaultAdapter"); - DBus::ValuePtr v = reply->read(); - DBus::ObjectPathValuePtr path = DBus::ObjectPathValuePtr::dynamicCast(v); - assert(path); - return path->v; + try + { + // + // The call to DefaultAdapter returns OBJ_PATH. + // + DBus::MessagePtr reply = call("/", "org.bluez.Manager", "DefaultAdapter"); + DBus::ValuePtr v = reply->read(); + DBus::ObjectPathValuePtr path = DBus::ObjectPathValuePtr::dynamicCast(v); + assert(path); + return path->v; + } + catch(const DBus::Exception& ex) + { + if(ex.reason.find("NoSuchAdapter") == string::npos) + { + throw BluetoothException(__FILE__, __LINE__, ex.reason); + } + } + + return string(); } string findAdapter(const string& addr) const { - // - // The call to FindAdapter returns OBJ_PATH. - // - DBus::MessagePtr reply = call("/", "org.bluez.Manager", "FindAdapter", new DBus::StringValue(addr)); - DBus::ValuePtr v = reply->read(); - DBus::ObjectPathValuePtr path = DBus::ObjectPathValuePtr::dynamicCast(v); - assert(path); - return path->v; + try + { + // + // The call to FindAdapter returns OBJ_PATH. + // + DBus::MessagePtr reply = call("/", "org.bluez.Manager", "FindAdapter", new DBus::StringValue(addr)); + DBus::ValuePtr v = reply->read(); + DBus::ObjectPathValuePtr path = DBus::ObjectPathValuePtr::dynamicCast(v); + assert(path); + return path->v; + } + catch(const DBus::Exception& ex) + { + if(ex.reason.find("NoSuchAdapter") == string::npos) + { + throw BluetoothException(__FILE__, __LINE__, ex.reason); + } + } + + return string(); } VariantMap getAdapterProperties(const string& path) const @@ -794,7 +840,11 @@ public: { if(channels.empty()) { - cb->exception(BluetoothException(__FILE__, __LINE__, "no service found for " + uuid + " at " + addr)); + // + // No service found for the UUID at the remote address. We treat this as if the + // server is not running. + // + cb->exception(ConnectFailedException(__FILE__, __LINE__, ECONNREFUSED)); } else { diff --git a/cpp/src/IceBT/TransceiverI.cpp b/cpp/src/IceBT/TransceiverI.cpp index f4d06cf33ba..a528fb9386f 100644 --- a/cpp/src/IceBT/TransceiverI.cpp +++ b/cpp/src/IceBT/TransceiverI.cpp @@ -37,8 +37,6 @@ IceBT::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::Bu IceInternal::SocketOperation IceBT::TransceiverI::closing(bool initiator, const Ice::LocalException&) { - ::shutdown(_stream->fd(), SHUT_RDWR); - // // If we are initiating the connection closure, wait for the peer // to close the TCP/IP connection. Otherwise, close immediately. diff --git a/cpp/src/IceBT/Util.cpp b/cpp/src/IceBT/Util.cpp index 8d5001d84fd..757561a8e50 100644 --- a/cpp/src/IceBT/Util.cpp +++ b/cpp/src/IceBT/Util.cpp @@ -227,7 +227,7 @@ IceBT::doBind(SOCKET fd, const SocketAddress& addr) SocketAddress local; socklen_t len = static_cast<socklen_t>(sizeof(SocketAddress)); # ifdef NDEBUG - getsockname(fd, &local, &len); + getsockname(fd, reinterpret_cast<struct sockaddr*>(&local), &len); # else int ret = getsockname(fd, reinterpret_cast<struct sockaddr*>(&local), &len); assert(ret != SOCKET_ERROR); diff --git a/cpp/src/Makefile b/cpp/src/Makefile index 4c9ac214b89..46517fbee9f 100644 --- a/cpp/src/Makefile +++ b/cpp/src/Makefile @@ -62,6 +62,11 @@ endif IceDB \ IceStorm \ IceGrid + +ifneq ($(findstring Ubuntu,$(shell uname -a)),) + SUBDIRS := $(SUBDIRS) IceBT +endif + endif endif @@ -77,7 +82,7 @@ slice2cpp slice2cs slice2java slice2js slice2php slice2html slice2objc: Slice Ice: slice2cpp -IceXML IceSSL IceBox Glacier2Lib IcePatch2Lib IceStormLib IceGridLib: Ice +IceXML IceSSL IceBox Glacier2Lib IcePatch2Lib IceStormLib IceGridLib IceBT: Ice Glacier2 IceGridLib Glacier2CryptPermissionsVerifier: Glacier2Lib diff --git a/cpp/test/Common/.gitignore b/cpp/test/Common/.gitignore new file mode 100644 index 00000000000..3ff6195f620 --- /dev/null +++ b/cpp/test/Common/.gitignore @@ -0,0 +1,5 @@ +// Generated by makegitignore.py + +// IMPORTANT: Do not edit this file -- any edits made here will be lost! +Controller.cpp +Controller.h diff --git a/cpp/test/Common/Controller.ice b/cpp/test/Common/Controller.ice new file mode 100644 index 00000000000..5178df68660 --- /dev/null +++ b/cpp/test/Common/Controller.ice @@ -0,0 +1,38 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2015 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. +// +// ********************************************************************** + +module Test +{ + +module Common +{ + +exception ServerFailedException +{ + string reason; +}; + +interface Server +{ + void waitTestSuccess(); + void waitForServer() throws ServerFailedException; + void terminate(); +}; + +sequence<string> StringSeq; + +interface Controller +{ + Server* runServer(string lang, string name, string protocol, string host, bool winrt, string configName, + StringSeq options); +}; + +}; + +}; diff --git a/cpp/test/Common/Makefile b/cpp/test/Common/Makefile new file mode 100644 index 00000000000..817c9542e08 --- /dev/null +++ b/cpp/test/Common/Makefile @@ -0,0 +1,53 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2015 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. +# +# ********************************************************************** + +top_srcdir = ../.. + +testincdir = ../include + +LIBFILENAME = $(call mklibfilename,TestCommon,$(VERSION)) +SONAME = $(call mksoname,TestCommon,$(SOVERSION)) +LIBNAME = $(call mklibname,TestCommon) +TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)$(cpp11libdirsuffix)/$(LIBNAME)) + +SLICE_OBJS = Controller.o + +OBJS = TestCommon.o \ + $(SLICE_OBJS) + +HDIR = $(testincdir) +SDIR = . + +include $(top_srcdir)/config/Make.rules + +CPPFLAGS := -I$(testincdir) $(CPPFLAGS) -DTEST_API_EXPORTS +SLICE2CPPFLAGS := --dll-export TEST_API $(SLICE2CPPFLAGS) + +LINKWITH := $(LIBS) + +ifeq ($(STATICLIBS),yes) +$(libdir)/$(LIBNAME): $(OBJS) + @mkdir -p $(dir $@) + rm -f $@ + $(call mklib,$@,$(OBJS)) +else +$(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) + rm -f $@ + $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) + +$(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) + rm -f $@ + ln -s $(LIBFILENAME) $@ + +$(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) + rm -f $@ + ln -s $(cpp11sonamedir)$(SONAME) $@ +endif diff --git a/cpp/test/Common/Makefile.mak b/cpp/test/Common/Makefile.mak new file mode 100644 index 00000000000..14aef7c2145 --- /dev/null +++ b/cpp/test/Common/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2015 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\testcommon$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\testcommon$(SOVERSION)$(LIBSUFFIX)$(COMPSUFFIX).dll + +TARGETS = $(LIBNAME) $(DLLNAME) + +SLICE_OBJS = .\Controller.obj + +OBJS = $(SLICE_OBJS) \ + .\TestCommon.obj + +HDIR = ..\include +SDIR = . + +!include $(top_srcdir)\config\Make.rules.mak + +CPPFLAGS = -I. -I$(HDIR) $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN -DTEST_API_EXPORTS + +SLICE2CPPFLAGS = --dll-export TEST_API $(SLICE2CPPFLAGS) + +!if "$(GENERATE_PDB)" == "yes" +PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb) +!endif + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + $(LINK) $(BASE):0x30000000 $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ + $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest + @if exist $(DLLNAME:.dll=.exp) del /q $(DLLNAME:.dll=.exp) + +clean:: + -del /q Controller.cpp $(HDIR)\Controller.h + +install:: all diff --git a/cpp/test/Common/TestCommon.cpp b/cpp/test/Common/TestCommon.cpp new file mode 100644 index 00000000000..967a69e4602 --- /dev/null +++ b/cpp/test/Common/TestCommon.cpp @@ -0,0 +1,145 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2015 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 <TestCommon.h> +#include <Controller.h> + +#include <Ice/Communicator.h> + +std::string +getTestEndpoint(const Ice::CommunicatorPtr& communicator, int num, const std::string prot) +{ + std::ostringstream ostr; + std::string protocol = prot; + if(protocol.empty()) + { + protocol = communicator->getProperties()->getPropertyWithDefault("Ice.Default.Protocol", "default"); + } + + if(protocol == "bt") + { + // + // For Bluetooth, there's no need to specify a port (channel) number. + // The client locates the server using its address and a UUID. + // + switch(num) + { + case 0: + ostr << "default -u 5e08f4de-5015-4507-abe1-a7807002db3d"; + break; + case 1: + ostr << "default -u dae56460-2485-46fd-a3ca-8b730e1e868b"; + break; + case 2: + ostr << "default -u 99e08bc6-fcda-4758-afd0-a8c00655c999"; + break; + default: + assert(false); + } + } + else + { + ostr << protocol << " -p " << (12010 + num); + } + return ostr.str(); +} + +RemoteConfig::RemoteConfig(const std::string& name, int argc, char** argv, const Ice::CommunicatorPtr& communicator) : + _status(1) +{ + // + // If ControllerHost is defined, we are using a server on a remote host. We expect a + // test controller will already be active. We let exceptions propagate out to + // the caller. + // + // Also look for a ConfigName property, which specifies the name of the configuration + // we are currently testing. + // + std::string controllerHost; + std::string configName; + for(int i = 1; i < argc; ++i) + { + std::string opt = argv[i]; + if(opt.find("--ControllerHost") == 0) + { + std::string::size_type pos = opt.find('='); + if(pos != std::string::npos && opt.size() > pos + 1) + { + controllerHost = opt.substr(pos + 1); + } + } + else if(opt.find("--ConfigName") == 0) + { + std::string::size_type pos = opt.find('='); + if(pos != std::string::npos && opt.size() > pos + 1) + { + configName = opt.substr(pos + 1); + } + } + } + + Test::Common::ServerPrx server; + + if(!controllerHost.empty()) + { + std::string prot = communicator->getProperties()->getPropertyWithDefault("Ice.Default.Protocol", "tcp"); + std::string host; + if(prot != "bt") + { + host = communicator->getProperties()->getProperty("Ice.Default.Host"); + } + + Test::Common::StringSeq options; + + Test::Common::ControllerPrx controller = Test::Common::ControllerPrx::checkedCast( + communicator->stringToProxy("controller:tcp -h " + controllerHost + " -p 15000")); + server = controller->runServer("cpp", name, prot, host, false, configName, options); + server->waitForServer(); + } + + _server = server; +} + +RemoteConfig::~RemoteConfig() +{ + if(_server) + { + try + { + Test::Common::ServerPrxPtr server = ICE_UNCHECKED_CAST(Test::Common::ServerPrx, _server); + if(_status == 0) + { + server->waitTestSuccess(); + } + else + { + server->terminate(); + } + } + catch(const Ice::LocalException&) + { + if(_status == 0) + { + throw; + } + } + } +} + +bool +RemoteConfig::isRemote() const +{ + return _server != 0; +} + +void +RemoteConfig::finished(int status) +{ + _status = status; +} diff --git a/cpp/test/Ice/acm/AllTests.cpp b/cpp/test/Ice/acm/AllTests.cpp index d89c6827296..970ad0711ec 100644 --- a/cpp/test/Ice/acm/AllTests.cpp +++ b/cpp/test/Ice/acm/AllTests.cpp @@ -556,7 +556,7 @@ public: void allTests(const Ice::CommunicatorPtr& communicator) { - string ref = "communicator:default -p 12010"; + string ref = "communicator:" + getTestEndpoint(communicator, 0); RemoteCommunicatorPrxPtr com = ICE_UNCHECKED_CAST(RemoteCommunicatorPrx, communicator->stringToProxy(ref)); vector<TestCasePtr> tests; diff --git a/cpp/test/Ice/acm/Client.cpp b/cpp/test/Ice/acm/Client.cpp index df4130472ec..70cb93bf97c 100644 --- a/cpp/test/Ice/acm/Client.cpp +++ b/cpp/test/Ice/acm/Client.cpp @@ -15,7 +15,6 @@ DEFINE_TEST("client") using namespace std; - int run(int, char**, const Ice::CommunicatorPtr& communicator) { @@ -29,14 +28,22 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif + try { Ice::InitializationData initData; initData.properties = Ice::createProperties(argc, argv); initData.properties->setProperty("Ice.Warn.Connections", "0"); + Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/acm", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { diff --git a/cpp/test/Ice/acm/Makefile b/cpp/test/Ice/acm/Makefile index 4c24d87c4de..8848dab9e37 100644 --- a/cpp/test/Ice/acm/Makefile +++ b/cpp/test/Ice/acm/Makefile @@ -31,10 +31,12 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS) ,$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS) ,$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/acm/Makefile.mak b/cpp/test/Ice/acm/Makefile.mak index bb61b7d31d6..849b63893bd 100644 --- a/cpp/test/Ice/acm/Makefile.mak +++ b/cpp/test/Ice/acm/Makefile.mak @@ -40,6 +40,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -47,12 +48,12 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/acm/Server.cpp b/cpp/test/Ice/acm/Server.cpp index a9c46ede6b2..39fce51801d 100644 --- a/cpp/test/Ice/acm/Server.cpp +++ b/cpp/test/Ice/acm/Server.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); communicator->getProperties()->setProperty("TestAdapter.ACM.Timeout", "0"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::Identity id = communicator->stringToIdentity("communicator"); diff --git a/cpp/test/Ice/acm/TestI.cpp b/cpp/test/Ice/acm/TestI.cpp index fb554bca5d1..aa0ce6dd9af 100644 --- a/cpp/test/Ice/acm/TestI.cpp +++ b/cpp/test/Ice/acm/TestI.cpp @@ -72,7 +72,11 @@ RemoteCommunicatorI::createObjectAdapter(int timeout, int close, int heartbeat, Ice::CommunicatorPtr com = current.adapter->getCommunicator(); Ice::PropertiesPtr properties = com->getProperties(); string protocol = properties->getPropertyWithDefault("Ice.Default.Protocol", "tcp"); - string host = properties->getPropertyWithDefault("Ice.Default.Host", "127.0.0.1"); + string opts; + if(protocol != "bt") + { + opts = " -h \"" + properties->getPropertyWithDefault("Ice.Default.Host", "127.0.0.1") + "\""; + } string name = IceUtil::generateUUID(); if(timeout >= 0) @@ -88,7 +92,7 @@ RemoteCommunicatorI::createObjectAdapter(int timeout, int close, int heartbeat, properties->setProperty(name + ".ACM.Heartbeat", toString(heartbeat)); } properties->setProperty(name + ".ThreadPool.Size", "2"); - ObjectAdapterPtr adapter = com->createObjectAdapterWithEndpoints(name, protocol + " -h \"" + host + "\""); + ObjectAdapterPtr adapter = com->createObjectAdapterWithEndpoints(name, protocol + opts); return ICE_UNCHECKED_CAST(RemoteObjectAdapterPrx, current.adapter->addWithUUID( ICE_MAKE_SHARED(RemoteObjectAdapterI, adapter))); diff --git a/cpp/test/Ice/acm/run.py b/cpp/test/Ice/acm/run.py index ce8c5dd4b18..c1eec8b731d 100755 --- a/cpp/test/Ice/acm/run.py +++ b/cpp/test/Ice/acm/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/adapterDeactivation/AllTests.cpp b/cpp/test/Ice/adapterDeactivation/AllTests.cpp index b46f52d806b..3d558b88ab1 100644 --- a/cpp/test/Ice/adapterDeactivation/AllTests.cpp +++ b/cpp/test/Ice/adapterDeactivation/AllTests.cpp @@ -19,7 +19,7 @@ TestIntfPrxPtr allTests(const CommunicatorPtr& communicator) { cout << "testing stringToProxy... " << flush; - ObjectPrxPtr base = communicator->stringToProxy("test:default -p 12010"); + ObjectPrxPtr base = communicator->stringToProxy("test:" + getTestEndpoint(communicator, 0)); test(base); cout << "ok" << endl; @@ -69,9 +69,9 @@ allTests(const CommunicatorPtr& communicator) initData.properties = communicator->getProperties()->clone(); Ice::CommunicatorHolder comm = Ice::initialize(initData); #ifdef ICE_CPP11_MAPPING - comm->stringToProxy("test:default -p 12010")->ice_ping_async(); + comm->stringToProxy("test:" + getTestEndpoint(communicator, 0))->ice_ping_async(); #else - comm->stringToProxy("test:default -p 12010")->begin_ice_ping(); + comm->stringToProxy("test:" + getTestEndpoint(communicator, 0))->begin_ice_ping(); #endif } cout << "ok" << endl; diff --git a/cpp/test/Ice/adapterDeactivation/Collocated.cpp b/cpp/test/Ice/adapterDeactivation/Collocated.cpp index c4ead95efd2..38150a65f08 100644 --- a/cpp/test/Ice/adapterDeactivation/Collocated.cpp +++ b/cpp/test/Ice/adapterDeactivation/Collocated.cpp @@ -21,7 +21,7 @@ using namespace Test; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); ServantLocatorPtr locator = ICE_MAKE_SHARED(ServantLocatorI); adapter->addServantLocator(locator, ""); diff --git a/cpp/test/Ice/adapterDeactivation/Makefile b/cpp/test/Ice/adapterDeactivation/Makefile index c212e23973e..986879401ab 100644 --- a/cpp/test/Ice/adapterDeactivation/Makefile +++ b/cpp/test/Ice/adapterDeactivation/Makefile @@ -40,14 +40,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/adapterDeactivation/Makefile.mak b/cpp/test/Ice/adapterDeactivation/Makefile.mak index 857b6651742..91c93ccbaaf 100644 --- a/cpp/test/Ice/adapterDeactivation/Makefile.mak +++ b/cpp/test/Ice/adapterDeactivation/Makefile.mak @@ -49,6 +49,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -57,17 +58,17 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/adapterDeactivation/Server.cpp b/cpp/test/Ice/adapterDeactivation/Server.cpp index 37c85a68653..c8d19f5d6f8 100644 --- a/cpp/test/Ice/adapterDeactivation/Server.cpp +++ b/cpp/test/Ice/adapterDeactivation/Server.cpp @@ -19,7 +19,7 @@ using namespace Ice; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); ServantLocatorPtr locator = ICE_MAKE_SHARED(ServantLocatorI); adapter->addServantLocator(locator, ""); diff --git a/cpp/test/Ice/adapterDeactivation/run.py b/cpp/test/Ice/adapterDeactivation/run.py index c9767485188..eb52f00447a 100755 --- a/cpp/test/Ice/adapterDeactivation/run.py +++ b/cpp/test/Ice/adapterDeactivation/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/admin/AllTests.cpp b/cpp/test/Ice/admin/AllTests.cpp index 09131385924..d7291121964 100644 --- a/cpp/test/Ice/admin/AllTests.cpp +++ b/cpp/test/Ice/admin/AllTests.cpp @@ -259,7 +259,7 @@ allTests(const Ice::CommunicatorPtr& communicator) } cout << "ok" << endl; - string ref = "factory:default -p 12010 -t 10000"; + string ref = "factory:" + getTestEndpoint(communicator, 0) + " -t 10000"; RemoteCommunicatorFactoryPrxPtr factory = ICE_UNCHECKED_CAST(RemoteCommunicatorFactoryPrx, communicator->stringToProxy(ref)); diff --git a/cpp/test/Ice/admin/Makefile b/cpp/test/Ice/admin/Makefile index 33e1fa6dae7..4556e4cc978 100644 --- a/cpp/test/Ice/admin/Makefile +++ b/cpp/test/Ice/admin/Makefile @@ -31,10 +31,12 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/admin/Makefile.mak b/cpp/test/Ice/admin/Makefile.mak index 88a53965a1d..d43fd63c0d5 100644 --- a/cpp/test/Ice/admin/Makefile.mak +++ b/cpp/test/Ice/admin/Makefile.mak @@ -40,6 +40,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -47,12 +48,12 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/admin/Server.cpp b/cpp/test/Ice/admin/Server.cpp index 9414199da85..8861ed73915 100644 --- a/cpp/test/Ice/admin/Server.cpp +++ b/cpp/test/Ice/admin/Server.cpp @@ -18,7 +18,7 @@ DEFINE_TEST("server") int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 10000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::Identity id = communicator->stringToIdentity("factory"); adapter->add(ICE_MAKE_SHARED(RemoteCommunicatorFactoryI), id); diff --git a/cpp/test/Ice/admin/run.py b/cpp/test/Ice/admin/run.py index ce8c5dd4b18..c1eec8b731d 100755 --- a/cpp/test/Ice/admin/run.py +++ b/cpp/test/Ice/admin/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/ami/AllTests.cpp b/cpp/test/Ice/ami/AllTests.cpp index c122840bff9..0fa6622c6da 100644 --- a/cpp/test/Ice/ami/AllTests.cpp +++ b/cpp/test/Ice/ami/AllTests.cpp @@ -851,14 +851,16 @@ typedef IceUtil::Handle<Thrower> ThrowerPtr; void allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { + const string protocol = communicator->getProperties()->getProperty("Ice.Default.Protocol"); + #ifdef ICE_CPP11_MAPPING - string sref = "test:default -p 12010"; + string sref = "test:" + getTestEndpoint(communicator, 0); auto obj = communicator->stringToProxy(sref); test(obj); auto p = Ice::uncheckedCast<Test::TestIntfPrx>(obj); - sref = "testController:default -p 12011"; + sref = "testController:" + getTestEndpoint(communicator, 1); obj = communicator->stringToProxy(sref); test(obj); @@ -1195,7 +1197,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) // // Check that CommunicatorDestroyedException is raised directly. // - if(p->ice_getConnection()) + if(p->ice_getConnection() && protocol != "bt") { Ice::InitializationData initData; initData.properties = communicator->getProperties()->clone(); @@ -1679,7 +1681,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } - if(p->ice_getConnection()) + if(p->ice_getConnection() && protocol != "bt") { test(p->opBatchCount() == 0); auto b1 = p->ice_batchOneway(); @@ -1754,6 +1756,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) promise.get_future().get(); } + if(protocol != "bt") { test(p->opBatchCount() == 0); auto b1 = Ice::uncheckedCast<Test::TestIntfPrx>( @@ -1816,6 +1819,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } + if(protocol != "bt") { // // Exception - 1 connection. @@ -1844,6 +1848,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->opBatchCount() == 0); } + if(protocol != "bt") { // // 2 connections. @@ -1878,6 +1883,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(4)); } + if(protocol != "bt") { // // 2 connections - 2 failures. @@ -1984,7 +1990,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) // // TODO port this to use the C++11 callback API // -// if(p->ice_getConnection()) +// if(p->ice_getConnection() && protocol != "bt") // { // cout << "testing close connection with sending queue... " << flush; // { @@ -2051,15 +2057,14 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) } - p->shutdown(); #else - string sref = "test:default -p 12010"; + string sref = "test:" + getTestEndpoint(communicator, 0); Ice::ObjectPrx obj = communicator->stringToProxy(sref); test(obj); Test::TestIntfPrx p = Test::TestIntfPrx::uncheckedCast(obj); - sref = "testController:default -p 12011"; + sref = "testController:" + getTestEndpoint(communicator, 1); obj = communicator->stringToProxy(sref); test(obj); @@ -2437,7 +2442,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) // // Check that CommunicatorDestroyedException is raised directly. // - if(p->ice_getConnection()) + if(p->ice_getConnection() && protocol != "bt") { Ice::InitializationData initData; initData.properties = communicator->getProperties()->clone(); @@ -3016,6 +3021,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) if(p->ice_getConnection()) { + if(protocol != "bt") { // // AsyncResult exception without cookie. @@ -3033,6 +3039,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(1)); } + if(protocol != "bt") { // // AsyncResult exception with cookie. @@ -3082,7 +3089,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } - if(p->ice_getConnection()) + if(p->ice_getConnection() && protocol != "bt") { { // @@ -3141,7 +3148,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } - if(p->ice_getConnection()) + if(p->ice_getConnection() && protocol != "bt") { test(p->opBatchCount() == 0); Test::TestIntfPrx b1 = p->ice_batchOneway(); @@ -3208,6 +3215,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } + if(protocol != "bt") { // // AsyncResult exception without cookie. @@ -3226,6 +3234,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->opBatchCount() == 0); } + if(protocol != "bt") { // // AsyncResult exception with cookie. @@ -3277,6 +3286,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } + if(protocol != "bt") { // // Exception without cookie. @@ -3296,6 +3306,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->opBatchCount() == 0); } + if(protocol != "bt") { // // Exception with cookie. @@ -3338,7 +3349,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } - if(p->ice_getConnection()) + if(p->ice_getConnection() && protocol != "bt") { // // Exception without cookie. @@ -3399,6 +3410,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } + if(protocol != "bt") { // // AsyncResult exception without cookie - 1 connection. @@ -3417,6 +3429,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->opBatchCount() == 0); } + if(protocol != "bt") { // // AsyncResult exception with cookie - 1 connection. @@ -3433,6 +3446,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->opBatchCount() == 0); } + if(protocol != "bt") { // // AsyncResult - 2 connections. @@ -3457,6 +3471,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(4)); } + if(protocol != "bt") { // // AsyncResult exception - 2 connections - 1 failure. @@ -3484,6 +3499,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(1)); } + if(protocol != "bt") { // // AsyncResult exception - 2 connections - 2 failures. @@ -3547,6 +3563,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } + if(protocol != "bt") { // // Exception without cookie - 1 connection. @@ -3566,6 +3583,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->opBatchCount() == 0); } + if(protocol != "bt") { // // Exception with cookie - 1 connection. @@ -3583,6 +3601,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->opBatchCount() == 0); } + if(protocol != "bt") { // // 2 connections. @@ -3609,6 +3628,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(4)); } + if(protocol != "bt") { // // Exception - 2 connections - 1 failure. @@ -3637,6 +3657,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(1)); } + if(protocol != "bt") { // // Exception - 2 connections - 2 failures. @@ -3689,6 +3710,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(2)); } + if(protocol != "bt") { // // Exception without cookie - 1 connection. @@ -3734,6 +3756,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(4)); } + if(protocol != "bt") { // // Exception - 2 connections - 1 failure. @@ -3762,6 +3785,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(p->waitForBatch(1)); } + if(protocol != "bt") { // // Exception - 2 connections - 2 failures. @@ -3988,7 +4012,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) } cout << "ok" << endl; - if(p->ice_getConnection()) + if(p->ice_getConnection() && protocol != "bt") { cout << "testing close connection with sending queue... " << flush; { diff --git a/cpp/test/Ice/ami/Client.cpp b/cpp/test/Ice/ami/Client.cpp index 78de0c13009..28b4bf917ec 100644 --- a/cpp/test/Ice/ami/Client.cpp +++ b/cpp/test/Ice/ami/Client.cpp @@ -28,6 +28,9 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try @@ -43,11 +46,14 @@ main(int argc, char* argv[]) initData.properties->setProperty("Ice.TCP.SndSize", "50000"); Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/ami", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { cerr << ex << endl; - return EXIT_FAILURE; + return EXIT_FAILURE; } } diff --git a/cpp/test/Ice/ami/Collocated.cpp b/cpp/test/Ice/ami/Collocated.cpp index 59309dbe248..1d7e1397758 100644 --- a/cpp/test/Ice/ami/Collocated.cpp +++ b/cpp/test/Ice/ami/Collocated.cpp @@ -18,8 +18,8 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); - communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", "default -p 12011"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); + communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", getTestEndpoint(communicator, 1)); communicator->getProperties()->setProperty("ControllerAdapter.ThreadPool.Size", "1"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); diff --git a/cpp/test/Ice/ami/Makefile b/cpp/test/Ice/ami/Makefile index 4de5fd9f02d..09253ec0d26 100644 --- a/cpp/test/Ice/ami/Makefile +++ b/cpp/test/Ice/ami/Makefile @@ -38,14 +38,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/ami/Makefile.mak b/cpp/test/Ice/ami/Makefile.mak index a339f0448b8..3dccf42b9be 100644 --- a/cpp/test/Ice/ami/Makefile.mak +++ b/cpp/test/Ice/ami/Makefile.mak @@ -47,6 +47,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -55,17 +56,17 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/ami/Server.cpp b/cpp/test/Ice/ami/Server.cpp index 67c15379bb2..b655f4025dc 100644 --- a/cpp/test/Ice/ami/Server.cpp +++ b/cpp/test/Ice/ami/Server.cpp @@ -18,8 +18,8 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); - communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", "default -p 12011"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); + communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", getTestEndpoint(communicator, 1)); communicator->getProperties()->setProperty("ControllerAdapter.ThreadPool.Size", "1"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); diff --git a/cpp/test/Ice/ami/run.py b/cpp/test/Ice/ami/run.py index 0816938a196..eb52f00447a 100755 --- a/cpp/test/Ice/ami/run.py +++ b/cpp/test/Ice/ami/run.py @@ -20,7 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/background/AllTests.cpp b/cpp/test/Ice/background/AllTests.cpp index 70a44976b6d..900a611bfa7 100644 --- a/cpp/test/Ice/background/AllTests.cpp +++ b/cpp/test/Ice/background/AllTests.cpp @@ -202,13 +202,14 @@ void readWriteTests(const ConfigurationPtr&, const Test::BackgroundPrx&, const T BackgroundPrx allTests(const Ice::CommunicatorPtr& communicator) { - string sref = "background:default -p 12010"; + const string endp = getTestEndpoint(communicator, 0); + string sref = "background:" + endp; Ice::ObjectPrx obj = communicator->stringToProxy(sref); test(obj); BackgroundPrx background = BackgroundPrx::uncheckedCast(obj); - sref = "backgroundController:tcp -p 12011"; + sref = "backgroundController:" + getTestEndpoint(communicator, 1, "tcp"); obj = communicator->stringToProxy(sref); test(obj); @@ -245,7 +246,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing locator... " << flush; { Ice::LocatorPrx locator; - obj = communicator->stringToProxy("locator:default -p 12010")->ice_invocationTimeout(250); + obj = communicator->stringToProxy("locator:" + endp)->ice_invocationTimeout(250); locator = Ice::LocatorPrx::uncheckedCast(obj); obj = communicator->stringToProxy("background@Test")->ice_locator(locator)->ice_oneway(); @@ -260,7 +261,7 @@ allTests(const Ice::CommunicatorPtr& communicator) } backgroundController->resumeCall("findAdapterById"); - obj = communicator->stringToProxy("locator:default -p 12010"); + obj = communicator->stringToProxy("locator:" + endp); locator = Ice::LocatorPrx::uncheckedCast(obj); obj = obj->ice_locator(locator); obj->ice_ping(); @@ -285,7 +286,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { Ice::RouterPrx router; - obj = communicator->stringToProxy("router:default -p 12010")->ice_invocationTimeout(250); + obj = communicator->stringToProxy("router:" + endp)->ice_invocationTimeout(250); router = Ice::RouterPrx::uncheckedCast(obj); obj = communicator->stringToProxy("background@Test")->ice_router(router)->ice_oneway(); @@ -300,7 +301,7 @@ allTests(const Ice::CommunicatorPtr& communicator) } backgroundController->resumeCall("getClientProxy"); - obj = communicator->stringToProxy("router:default -p 12010"); + obj = communicator->stringToProxy("router:" + endp); router = Ice::RouterPrx::uncheckedCast(obj); obj = communicator->stringToProxy("background@Test")->ice_router(router); BackgroundPrx bg = BackgroundPrx::uncheckedCast(obj); diff --git a/cpp/test/Ice/background/Makefile b/cpp/test/Ice/background/Makefile index 11b033ee78f..fd3ed0fbd29 100644 --- a/cpp/test/Ice/background/Makefile +++ b/cpp/test/Ice/background/Makefile @@ -46,15 +46,15 @@ OBJS = $(TRANSPORT_OBJS) \ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include -I../../../src $(CPPFLAGS) $(NO_DEPRECATED_FLAGS) -LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil +LINKWITH := $(BZIP2_RPATH_LINK) -lTestCommon -lIce -lIceUtil $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(TSPFILENAME): $(TRANSPORT_OBJS) rm -f $@ diff --git a/cpp/test/Ice/background/Makefile.mak b/cpp/test/Ice/background/Makefile.mak index 01b9940f29a..5b9aae0a0e0 100644 --- a/cpp/test/Ice/background/Makefile.mak +++ b/cpp/test/Ice/background/Makefile.mak @@ -44,7 +44,7 @@ OBJS = $(TRANSPORT_OBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include -I../../../src $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN -LINKWITH = $(LIBS) +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" TPDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb) @@ -53,12 +53,12 @@ SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(COBJS) - $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER): $(SOBJS) - $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/background/Server.cpp b/cpp/test/Ice/background/Server.cpp index bb965e7ed96..cc0a4265bd2 100644 --- a/cpp/test/Ice/background/Server.cpp +++ b/cpp/test/Ice/background/Server.cpp @@ -8,6 +8,7 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> #include <Configuration.h> #include <PluginI.h> @@ -92,8 +93,8 @@ private: int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); - communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", "tcp -p 12011"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); + communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", getTestEndpoint(communicator, 1, "tcp")); communicator->getProperties()->setProperty("ControllerAdapter.ThreadPool.Size", "1"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); diff --git a/cpp/test/Ice/background/run.py b/cpp/test/Ice/background/run.py index ce8c5dd4b18..c1eec8b731d 100755 --- a/cpp/test/Ice/background/run.py +++ b/cpp/test/Ice/background/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/binding/AllTests.cpp b/cpp/test/Ice/binding/AllTests.cpp index 9de164414e8..fedce8110f6 100644 --- a/cpp/test/Ice/binding/AllTests.cpp +++ b/cpp/test/Ice/binding/AllTests.cpp @@ -103,7 +103,7 @@ deactivate(const RemoteCommunicatorPrxPtr& com, vector<RemoteObjectAdapterPrxPtr void allTests(const Ice::CommunicatorPtr& communicator) { - string ref = "communicator:default -p 12010"; + string ref = "communicator:" + getTestEndpoint(communicator, 0); RemoteCommunicatorPrxPtr com = ICE_UNCHECKED_CAST(RemoteCommunicatorPrx, communicator->stringToProxy(ref)); RandomNumberGenerator rng; diff --git a/cpp/test/Ice/binding/Client.cpp b/cpp/test/Ice/binding/Client.cpp index c66e79a5c5a..e1a944f0c41 100644 --- a/cpp/test/Ice/binding/Client.cpp +++ b/cpp/test/Ice/binding/Client.cpp @@ -28,11 +28,18 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif + try { Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/binding", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { diff --git a/cpp/test/Ice/binding/Makefile b/cpp/test/Ice/binding/Makefile index 33e1fa6dae7..4556e4cc978 100644 --- a/cpp/test/Ice/binding/Makefile +++ b/cpp/test/Ice/binding/Makefile @@ -31,10 +31,12 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/binding/Makefile.mak b/cpp/test/Ice/binding/Makefile.mak index f707af46233..d6453b14796 100644 --- a/cpp/test/Ice/binding/Makefile.mak +++ b/cpp/test/Ice/binding/Makefile.mak @@ -40,6 +40,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -47,12 +48,12 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/binding/Server.cpp b/cpp/test/Ice/binding/Server.cpp index 0d8d44be843..1a05743d645 100644 --- a/cpp/test/Ice/binding/Server.cpp +++ b/cpp/test/Ice/binding/Server.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::Identity id = communicator->stringToIdentity("communicator"); adapter->add(ICE_MAKE_SHARED(RemoteCommunicatorI), id); diff --git a/cpp/test/Ice/binding/TestI.cpp b/cpp/test/Ice/binding/TestI.cpp index 104966084d0..cdf9d7595c9 100644 --- a/cpp/test/Ice/binding/TestI.cpp +++ b/cpp/test/Ice/binding/TestI.cpp @@ -26,19 +26,23 @@ RemoteObjectAdapterPrx RemoteCommunicatorI::createObjectAdapter(const string& name, const string& endpts, const Current& current) #endif { + Ice::CommunicatorPtr com = current.adapter->getCommunicator(); + const string defaultProtocol = com->getProperties()->getProperty("Ice.Default.Protocol"); + string endpoints = endpts; - if(endpoints.find("-p") == string::npos) + if(defaultProtocol != "bt") { - // Use a fixed port if none is specified (bug 2896) - ostringstream os; - os << endpoints << " -h \"" - << (current.adapter->getCommunicator()->getProperties()->getPropertyWithDefault( - "Ice.Default.Host", "127.0.0.1")) - << "\" -p " << _nextPort++; - endpoints = os.str(); + if(endpoints.find("-p") == string::npos) + { + // Use a fixed port if none is specified (bug 2896) + ostringstream os; + os << endpoints << " -h \"" + << (com->getProperties()->getPropertyWithDefault("Ice.Default.Host", "127.0.0.1")) + << "\" -p " << _nextPort++; + endpoints = os.str(); + } } - Ice::CommunicatorPtr com = current.adapter->getCommunicator(); com->getProperties()->setProperty(name + ".ThreadPool.Size", "1"); ObjectAdapterPtr adapter = com->createObjectAdapterWithEndpoints(name, endpoints); return ICE_UNCHECKED_CAST(RemoteObjectAdapterPrx, current.adapter->addWithUUID(ICE_MAKE_SHARED(RemoteObjectAdapterI, adapter))); diff --git a/cpp/test/Ice/binding/run.py b/cpp/test/Ice/binding/run.py index ce8c5dd4b18..c1eec8b731d 100755 --- a/cpp/test/Ice/binding/run.py +++ b/cpp/test/Ice/binding/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/checksum/AllTests.cpp b/cpp/test/Ice/checksum/AllTests.cpp index dc0283ecac5..baf9bdbd63b 100644 --- a/cpp/test/Ice/checksum/AllTests.cpp +++ b/cpp/test/Ice/checksum/AllTests.cpp @@ -16,7 +16,7 @@ using namespace std; Test::ChecksumPrxPtr allTests(const Ice::CommunicatorPtr& communicator, bool) { - string ref = "test:default -p 12010"; + string ref = "test:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr base = communicator->stringToProxy(ref); test(base); diff --git a/cpp/test/Ice/checksum/Makefile b/cpp/test/Ice/checksum/Makefile index b0b72f23708..e8034f127dc 100644 --- a/cpp/test/Ice/checksum/Makefile +++ b/cpp/test/Ice/checksum/Makefile @@ -26,11 +26,13 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + SLICE2CPPFLAGS := --checksum $(SLICE2CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) SUBDIRS = server diff --git a/cpp/test/Ice/checksum/Makefile.mak b/cpp/test/Ice/checksum/Makefile.mak index 9147024f1c7..5e6d584c45a 100644 --- a/cpp/test/Ice/checksum/Makefile.mak +++ b/cpp/test/Ice/checksum/Makefile.mak @@ -24,13 +24,14 @@ OBJS = $(SLICE_OBJS) \ SLICE2CPPFLAGS = --checksum $(SLICE2CPPFLAGS) CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" PDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) !endif $(CLIENT): $(OBJS) - $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(SETARGV) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(SETARGV) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/checksum/run.py b/cpp/test/Ice/checksum/run.py index db935718825..70361473f99 100755 --- a/cpp/test/Ice/checksum/run.py +++ b/cpp/test/Ice/checksum/run.py @@ -21,4 +21,5 @@ sys.path.append(os.path.join(path[0], "scripts")) import TestUtil server = os.path.join(os.getcwd(), "server", "server") -TestUtil.clientServerTest(server = server) +TestUtil.queueClientServerTest(server = server) +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/checksum/server/Makefile b/cpp/test/Ice/checksum/server/Makefile index a60c508d46e..dba411adfba 100644 --- a/cpp/test/Ice/checksum/server/Makefile +++ b/cpp/test/Ice/checksum/server/Makefile @@ -26,8 +26,10 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + SLICE2CPPFLAGS := --checksum $(SLICE2CPPFLAGS) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/checksum/server/Makefile.mak b/cpp/test/Ice/checksum/server/Makefile.mak index c8e619231e4..f6407e5d156 100644 --- a/cpp/test/Ice/checksum/server/Makefile.mak +++ b/cpp/test/Ice/checksum/server/Makefile.mak @@ -26,13 +26,14 @@ SRCS = $(SOBJS:.obj=.cpp) SLICE2CPPFLAGS = --checksum $(SLICE2CPPFLAGS) CPPFLAGS = -I. -I../../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" PDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(SERVER): $(OBJS) - $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(SETARGV) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(SETARGV) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/checksum/server/Server.cpp b/cpp/test/Ice/checksum/server/Server.cpp index 38a621ab15b..2f517f0e126 100644 --- a/cpp/test/Ice/checksum/server/Server.cpp +++ b/cpp/test/Ice/checksum/server/Server.cpp @@ -18,7 +18,7 @@ DEFINE_TEST("server") int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 10000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(ChecksumI), communicator->stringToIdentity("test")); adapter->activate(); diff --git a/cpp/test/Ice/custom/AllTests.cpp b/cpp/test/Ice/custom/AllTests.cpp index 1ba93ec0f39..625990d7adc 100644 --- a/cpp/test/Ice/custom/AllTests.cpp +++ b/cpp/test/Ice/custom/AllTests.cpp @@ -577,9 +577,9 @@ typedef IceUtil::Handle<Callback> CallbackPtr; Test::TestIntfPrx allTests(const Ice::CommunicatorPtr& communicator) { + const string endp = getTestEndpoint(communicator, 0); cout << "testing stringToProxy... " << flush; - string ref = communicator->getProperties()->getPropertyWithDefault( - "Custom.Proxy", "test:default -p 12010"); + string ref = communicator->getProperties()->getPropertyWithDefault("Custom.Proxy", "test:" + endp); Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; @@ -1012,11 +1012,11 @@ allTests(const Ice::CommunicatorPtr& communicator) { deque<Test::CPrx> in(5); - in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000")); - in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001")); - in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002")); - in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003")); - in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004")); + in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:" + endp + " -t 10000")); + in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:" + endp + " -t 10001")); + in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:" + endp + " -t 10002")); + in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:" + endp + " -t 10003")); + in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:" + endp + " -t 10004")); deque<Test::CPrx> out; deque<Test::CPrx> ret = t->opCPrxSeq(in, out); @@ -1026,11 +1026,11 @@ allTests(const Ice::CommunicatorPtr& communicator) { list<Test::CPrx> in; - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:" + endp + " -t 10000"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:" + endp + " -t 10001"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:" + endp + " -t 10002"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:" + endp + " -t 10003"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:" + endp + " -t 10004"))); list<Test::CPrx> out; list<Test::CPrx> ret = t->opCPrxList(in, out); @@ -1637,11 +1637,11 @@ allTests(const Ice::CommunicatorPtr& communicator) { deque<Test::CPrx> in(5); - in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000")); - in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001")); - in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002")); - in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003")); - in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004")); + in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:" + endp + " -t 10000")); + in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:" + endp + " -t 10001")); + in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:" + endp + " -t 10002")); + in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:" + endp + " -t 10003")); + in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:" + endp + " -t 10004")); deque<Test::CPrx> out; Ice::AsyncResultPtr r = t->begin_opCPrxSeq(in); @@ -1652,11 +1652,11 @@ allTests(const Ice::CommunicatorPtr& communicator) { list<Test::CPrx> in; - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:" + endp + " -t 10000"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:" + endp + " -t 10001"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:" + endp + " -t 10002"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:" + endp + " -t 10003"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:" + endp + " -t 10004"))); list<Test::CPrx> out; Ice::AsyncResultPtr r = t->begin_opCPrxList(in); @@ -2185,11 +2185,11 @@ allTests(const Ice::CommunicatorPtr& communicator) { deque<Test::CPrx> in(5); - in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000")); - in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001")); - in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002")); - in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003")); - in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004")); + in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:" + endp + " -t 10000")); + in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:" + endp + " -t 10001")); + in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:" + endp + " -t 10002")); + in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:" + endp + " -t 10003")); + in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:" + endp + " -t 10004")); CallbackPtr cb = new Callback(); Test::Callback_TestIntf_opCPrxSeqPtr callback = @@ -2200,11 +2200,11 @@ allTests(const Ice::CommunicatorPtr& communicator) { list<Test::CPrx> in; - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:" + endp + " -t 10000"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:" + endp + " -t 10001"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:" + endp + " -t 10002"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:" + endp + " -t 10003"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:" + endp + " -t 10004"))); CallbackPtr cb = new Callback(); Test::Callback_TestIntf_opCPrxListPtr callback = @@ -2867,11 +2867,11 @@ allTests(const Ice::CommunicatorPtr& communicator) { deque<Test::CPrx> in(5); - in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000")); - in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001")); - in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002")); - in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003")); - in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004")); + in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:" + endp + " -t 10000")); + in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:" + endp + " -t 10001")); + in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:" + endp + " -t 10002")); + in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:" + endp + " -t 10003")); + in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:" + endp + " -t 10004")); CallbackPtr cb = new Callback(); t->begin_opCPrxSeq(in, @@ -2888,11 +2888,11 @@ allTests(const Ice::CommunicatorPtr& communicator) { list<Test::CPrx> in; - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003"))); - in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:" + endp + " -t 10000"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:" + endp + " -t 10001"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:" + endp + " -t 10002"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:" + endp + " -t 10003"))); + in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:" + endp + " -t 10004"))); CallbackPtr cb = new Callback(); t->begin_opCPrxList(in, @@ -3271,13 +3271,13 @@ allTests(const Ice::CommunicatorPtr& communicator) Test2::WstringWStringDict wdict2; wdict2 = wdict1; - ref = communicator->getProperties()->getPropertyWithDefault("Custom.WstringProxy1", "wstring1:default -p 12010"); + ref = communicator->getProperties()->getPropertyWithDefault("Custom.WstringProxy1", "wstring1:" + endp); base = communicator->stringToProxy(ref); test(base); Test1::WstringClassPrx wsc1 = Test1::WstringClassPrx::checkedCast(base); test(t); - ref = communicator->getProperties()->getPropertyWithDefault("Custom.WstringProxy2", "wstring2:default -p 12010"); + ref = communicator->getProperties()->getPropertyWithDefault("Custom.WstringProxy2", "wstring2:" + endp); base = communicator->stringToProxy(ref); test(base); Test2::WstringClassPrx wsc2 = Test2::WstringClassPrx::checkedCast(base); diff --git a/cpp/test/Ice/custom/Collocated.cpp b/cpp/test/Ice/custom/Collocated.cpp index 4aa75410b6b..3c072aed1bf 100644 --- a/cpp/test/Ice/custom/Collocated.cpp +++ b/cpp/test/Ice/custom/Collocated.cpp @@ -20,6 +20,7 @@ DEFINE_TEST("collocated") int run(int, char**, const Ice::CommunicatorPtr& communicator) { + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new TestIntfI(communicator), communicator->stringToIdentity("test")); adapter->add(new Test1::WstringClassI, communicator->stringToIdentity("wstring1")); @@ -45,10 +46,7 @@ main(int argc, char** argv) IceUtil::setProcessStringConverter(new Test::StringConverterI()); IceUtil::setProcessWstringConverter(new Test::WstringConverterI()); - Ice::InitializationData initData; - initData.properties = Ice::createProperties(argc, argv); - initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010"); - communicator = Ice::initialize(argc, argv, initData); + communicator = Ice::initialize(argc, argv); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) diff --git a/cpp/test/Ice/custom/Makefile b/cpp/test/Ice/custom/Makefile index 73fa9486798..f294c35b1d1 100644 --- a/cpp/test/Ice/custom/Makefile +++ b/cpp/test/Ice/custom/Makefile @@ -64,6 +64,8 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) -DSTRING_VIEW_IGNORE_STRING_CONVERTER +LINKWITH := -lTestCommon $(LIBS) + # # Disables optimization when building with Solaris CC: # AllTests.cpp takes a very very long time to compile with -O @@ -80,16 +82,16 @@ endif $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(SERVERAMD): $(SAMDOBJS) rm -f $@ - $(call mktest,$@,$(SAMDOBJS),$(LIBS)) + $(call mktest,$@,$(SAMDOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/custom/Makefile.mak b/cpp/test/Ice/custom/Makefile.mak index eb5ee807e4a..354cb8f8a3b 100644 --- a/cpp/test/Ice/custom/Makefile.mak +++ b/cpp/test/Ice/custom/Makefile.mak @@ -61,6 +61,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DSTRING_VIEW_IGNORE_STRING_CONVERTER -DWIN32_LEAN_AND_MEAN -Zm300 -bigobj +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) @@ -70,22 +71,22 @@ COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb) !endif $(CLIENT): $(COBJS) - $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER): $(SOBJS) - $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVERAMD): $(SAMDOBJS) - $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED): $(COLOBJS) - $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/custom/Server.cpp b/cpp/test/Ice/custom/Server.cpp index e854b07f514..e67df41083d 100644 --- a/cpp/test/Ice/custom/Server.cpp +++ b/cpp/test/Ice/custom/Server.cpp @@ -20,6 +20,7 @@ DEFINE_TEST("server") int run(int, char**, const Ice::CommunicatorPtr& communicator) { + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new TestIntfI(communicator), communicator->stringToIdentity("test")); adapter->add(new Test1::WstringClassI, communicator->stringToIdentity("wstring1")); @@ -46,11 +47,7 @@ main(int argc, char** argv) IceUtil::setProcessStringConverter(new Test::StringConverterI); IceUtil::setProcessWstringConverter(new Test::WstringConverterI); - Ice::InitializationData initData; - initData.properties = Ice::createProperties(argc, argv); - initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010"); - - communicator = Ice::initialize(argc, argv, initData); + communicator = Ice::initialize(argc, argv); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) diff --git a/cpp/test/Ice/custom/ServerAMD.cpp b/cpp/test/Ice/custom/ServerAMD.cpp index 82593b21a6d..a8e2a653140 100644 --- a/cpp/test/Ice/custom/ServerAMD.cpp +++ b/cpp/test/Ice/custom/ServerAMD.cpp @@ -20,6 +20,7 @@ DEFINE_TEST("serveramd") int run(int, char**, const Ice::CommunicatorPtr& communicator) { + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new TestIntfI(communicator), communicator->stringToIdentity("test")); adapter->add(new Test1::WstringClassI, communicator->stringToIdentity("wstring1")); @@ -46,11 +47,7 @@ main(int argc, char** argv) IceUtil::setProcessStringConverter(new Test::StringConverterI()); IceUtil::setProcessWstringConverter(new Test::WstringConverterI()); - Ice::InitializationData initData; - initData.properties = Ice::createProperties(argc, argv); - - initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010"); - communicator = Ice::initialize(argc, argv, initData); + communicator = Ice::initialize(argc, argv); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) diff --git a/cpp/test/Ice/custom/run.py b/cpp/test/Ice/custom/run.py index 6d8f4682523..ab0953a3b3a 100755 --- a/cpp/test/Ice/custom/run.py +++ b/cpp/test/Ice/custom/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server = "serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server = "serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/dispatcher/AllTests.cpp b/cpp/test/Ice/dispatcher/AllTests.cpp index 6f36faa9ef7..e42055fcdc9 100644 --- a/cpp/test/Ice/dispatcher/AllTests.cpp +++ b/cpp/test/Ice/dispatcher/AllTests.cpp @@ -112,13 +112,13 @@ ICE_DEFINE_PTR(CallbackPtr, Callback); void allTests(const Ice::CommunicatorPtr& communicator) { - string sref = "test:default -p 12010"; + string sref = "test:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr obj = communicator->stringToProxy(sref); test(obj); Test::TestIntfPrxPtr p = ICE_UNCHECKED_CAST(Test::TestIntfPrx, obj); - sref = "testController:tcp -p 12011"; + sref = "testController:" + getTestEndpoint(communicator, 1, "tcp"); obj = communicator->stringToProxy(sref); test(obj); diff --git a/cpp/test/Ice/dispatcher/Collocated.cpp b/cpp/test/Ice/dispatcher/Collocated.cpp index e76bfa09b08..afa55d366ba 100644 --- a/cpp/test/Ice/dispatcher/Collocated.cpp +++ b/cpp/test/Ice/dispatcher/Collocated.cpp @@ -19,8 +19,8 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); - communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", "tcp -p 12011"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); + communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", getTestEndpoint(communicator, 1, "tcp")); communicator->getProperties()->setProperty("ControllerAdapter.ThreadPool.Size", "1"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); diff --git a/cpp/test/Ice/dispatcher/Makefile b/cpp/test/Ice/dispatcher/Makefile index d60583058c8..b20873b1ab6 100644 --- a/cpp/test/Ice/dispatcher/Makefile +++ b/cpp/test/Ice/dispatcher/Makefile @@ -41,14 +41,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/dispatcher/Makefile.mak b/cpp/test/Ice/dispatcher/Makefile.mak index c0a168cc955..16a7f5b47d7 100644 --- a/cpp/test/Ice/dispatcher/Makefile.mak +++ b/cpp/test/Ice/dispatcher/Makefile.mak @@ -50,6 +50,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -58,17 +59,17 @@ COLPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COLPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COLPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/dispatcher/Server.cpp b/cpp/test/Ice/dispatcher/Server.cpp index efbf63e3692..923a40db870 100644 --- a/cpp/test/Ice/dispatcher/Server.cpp +++ b/cpp/test/Ice/dispatcher/Server.cpp @@ -19,8 +19,8 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); - communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", "tcp -p 12011"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); + communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", getTestEndpoint(communicator, 1, "tcp")); communicator->getProperties()->setProperty("ControllerAdapter.ThreadPool.Size", "1"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); diff --git a/cpp/test/Ice/dispatcher/run.py b/cpp/test/Ice/dispatcher/run.py index 0816938a196..eb52f00447a 100755 --- a/cpp/test/Ice/dispatcher/run.py +++ b/cpp/test/Ice/dispatcher/run.py @@ -20,7 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/echo/Makefile b/cpp/test/Ice/echo/Makefile index 7c8ebcee3aa..7d85b872d90 100644 --- a/cpp/test/Ice/echo/Makefile +++ b/cpp/test/Ice/echo/Makefile @@ -25,6 +25,8 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(SERVER): $(OBJS) rm -f $@ - $(call mktest,$@,$(OBJS),$(LIBS)) + $(call mktest,$@,$(OBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/echo/Makefile.mak b/cpp/test/Ice/echo/Makefile.mak index 62fd0a8d8af..67cc290222b 100644 --- a/cpp/test/Ice/echo/Makefile.mak +++ b/cpp/test/Ice/echo/Makefile.mak @@ -32,6 +32,7 @@ OBJS = $(SLICE_OBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -39,7 +40,7 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(SERVER)$(EXT): $(OBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/echo/Server.cpp b/cpp/test/Ice/echo/Server.cpp index 668aa7ef619..7a789c5db1f 100644 --- a/cpp/test/Ice/echo/Server.cpp +++ b/cpp/test/Ice/echo/Server.cpp @@ -48,7 +48,7 @@ private: int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); BlobjectIPtr blob = new BlobjectI; adapter->addDefaultServant(blob, ""); diff --git a/cpp/test/Ice/enums/AllTests.cpp b/cpp/test/Ice/enums/AllTests.cpp index bb531fb4019..9178e812945 100644 --- a/cpp/test/Ice/enums/AllTests.cpp +++ b/cpp/test/Ice/enums/AllTests.cpp @@ -18,7 +18,7 @@ using namespace Test; TestIntfPrxPtr allTests(const Ice::CommunicatorPtr& communicator) { - string ref = "test:default -p 12010"; + string ref = "test:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr obj = communicator->stringToProxy(ref); test(obj); TestIntfPrxPtr proxy = ICE_CHECKED_CAST(TestIntfPrx, obj); diff --git a/cpp/test/Ice/enums/Client.cpp b/cpp/test/Ice/enums/Client.cpp index 2d3ca3fc480..bb5fc6503d7 100644 --- a/cpp/test/Ice/enums/Client.cpp +++ b/cpp/test/Ice/enums/Client.cpp @@ -30,16 +30,22 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try { Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/enums", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { cerr << ex << endl; - return EXIT_FAILURE; + return EXIT_FAILURE; } } diff --git a/cpp/test/Ice/enums/Makefile b/cpp/test/Ice/enums/Makefile index e70cc46e187..47d5ed126f1 100644 --- a/cpp/test/Ice/enums/Makefile +++ b/cpp/test/Ice/enums/Makefile @@ -32,10 +32,12 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) SLICE2CPPFLAGS := $(SLICE2CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/enums/Makefile.mak b/cpp/test/Ice/enums/Makefile.mak index 4aa1215b93e..f9433b35482 100644 --- a/cpp/test/Ice/enums/Makefile.mak +++ b/cpp/test/Ice/enums/Makefile.mak @@ -41,6 +41,7 @@ OBJS = $(COBJS) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN SLICE2CPPFLAGS = $(SLICE2CPPFLAGS) +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -48,12 +49,12 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/enums/Server.cpp b/cpp/test/Ice/enums/Server.cpp index dce40a3a616..fd854cb878d 100644 --- a/cpp/test/Ice/enums/Server.cpp +++ b/cpp/test/Ice/enums/Server.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); diff --git a/cpp/test/Ice/enums/run.py b/cpp/test/Ice/enums/run.py index ad8767bd99e..838b1f97164 100755 --- a/cpp/test/Ice/enums/run.py +++ b/cpp/test/Ice/enums/run.py @@ -20,9 +20,9 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with 1.1 encoding.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "1.1", message = "Running test with 1.1 encoding.") +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 55eaa81147e..4850d9e32b7 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/IceUtil.h> #include <Ice/Ice.h> #include <TestCommon.h> #include <Test.h> @@ -487,6 +488,20 @@ allTests(const Ice::CommunicatorPtr& communicator) } cout << "ok" << endl; + string localOAEndpoint; + { + ostringstream ostr; + if(communicator->getProperties()->getProperty("Ice.Default.Protocol") == "bt") + { + ostr << "default -a *"; + } + else + { + ostr << "default -h *"; + } + localOAEndpoint = ostr.str(); + } + cout << "testing object adapter registration exceptions... " << flush; { Ice::ObjectAdapterPtr first; @@ -505,9 +520,7 @@ allTests(const Ice::CommunicatorPtr& communicator) // Expected } - string host = communicator->getProperties()->getPropertyAsIntWithDefault("Ice.IPv6", 0) == 0 ? - "127.0.0.1" : "\"0:0:0:0:0:0:0:1\""; - communicator->getProperties()->setProperty("TestAdapter0.Endpoints", "default -h " + host); + communicator->getProperties()->setProperty("TestAdapter0.Endpoints", localOAEndpoint); first = communicator->createObjectAdapter("TestAdapter0"); try { @@ -547,9 +560,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing servant registration exceptions... " << flush; { - string host = communicator->getProperties()->getPropertyAsIntWithDefault("Ice.IPv6", 0) == 0 ? - "127.0.0.1" : "\"0:0:0:0:0:0:0:1\""; - communicator->getProperties()->setProperty("TestAdapter1.Endpoints", "default -h " + host); + communicator->getProperties()->setProperty("TestAdapter1.Endpoints", localOAEndpoint); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter1"); Ice::ObjectPtr obj = ICE_MAKE_SHARED(EmptyI); adapter->add(obj, communicator->stringToIdentity("x")); @@ -594,7 +605,6 @@ allTests(const Ice::CommunicatorPtr& communicator) } } - adapter->remove(communicator->stringToIdentity("x")); try { @@ -616,9 +626,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing servant locator registrations exceptions... " << flush; { - string host = communicator->getProperties()->getPropertyAsIntWithDefault("Ice.IPv6", 0) == 0 ? - "127.0.0.1" : "\"0:0:0:0:0:0:0:1\""; - communicator->getProperties()->setProperty("TestAdapter2.Endpoints", "default -h " + host); + communicator->getProperties()->setProperty("TestAdapter2.Endpoints", localOAEndpoint); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter2"); Ice::ServantLocatorPtr loc = ICE_MAKE_SHARED(ServantLocatorI); adapter->addServantLocator(loc, "x"); @@ -673,7 +681,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "ok" << endl; cout << "testing stringToProxy... " << flush; - string ref = "thrower:default -p 12010"; + string ref = "thrower:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; @@ -977,7 +985,8 @@ allTests(const Ice::CommunicatorPtr& communicator) test(false); } - ThrowerPrxPtr thrower2 = ICE_UNCHECKED_CAST(ThrowerPrx, communicator->stringToProxy("thrower:default -p 12011")); + ThrowerPrxPtr thrower2 = + ICE_UNCHECKED_CAST(ThrowerPrx, communicator->stringToProxy("thrower:" + getTestEndpoint(communicator, 1))); try { thrower2->throwMemoryLimitException(Ice::ByteSeq(2 * 1024 * 1024)); // 2MB (no limits) @@ -985,7 +994,8 @@ allTests(const Ice::CommunicatorPtr& communicator) catch(const Ice::MemoryLimitException&) { } - ThrowerPrxPtr thrower3 = ICE_UNCHECKED_CAST(ThrowerPrx, communicator->stringToProxy("thrower:default -p 12012")); + ThrowerPrxPtr thrower3 = + ICE_UNCHECKED_CAST(ThrowerPrx, communicator->stringToProxy("thrower:" + getTestEndpoint(communicator, 2))); try { thrower3->throwMemoryLimitException(Ice::ByteSeq(1024)); // 1KB limit diff --git a/cpp/test/Ice/exceptions/Client.cpp b/cpp/test/Ice/exceptions/Client.cpp index 7782971d575..c7b0cb63039 100644 --- a/cpp/test/Ice/exceptions/Client.cpp +++ b/cpp/test/Ice/exceptions/Client.cpp @@ -32,6 +32,9 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try @@ -42,7 +45,10 @@ main(int argc, char* argv[]) initData.properties->setProperty("Ice.MessageSizeMax", "10"); // 10KB max Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/exceptions", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { diff --git a/cpp/test/Ice/exceptions/Collocated.cpp b/cpp/test/Ice/exceptions/Collocated.cpp index 6751f82ece4..54f18c1ae99 100644 --- a/cpp/test/Ice/exceptions/Collocated.cpp +++ b/cpp/test/Ice/exceptions/Collocated.cpp @@ -19,7 +19,7 @@ using namespace Test; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(ThrowerI); adapter->add(object, communicator->stringToIdentity("thrower")); diff --git a/cpp/test/Ice/exceptions/Makefile b/cpp/test/Ice/exceptions/Makefile index 47013a10590..2a62ef277e0 100644 --- a/cpp/test/Ice/exceptions/Makefile +++ b/cpp/test/Ice/exceptions/Makefile @@ -50,18 +50,20 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(SERVERAMD): $(SAMDOBJS) rm -f $@ - $(call mktest,$@,$(SAMDOBJS),$(LIBS)) + $(call mktest,$@,$(SAMDOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/exceptions/Makefile.mak b/cpp/test/Ice/exceptions/Makefile.mak index 8563430ee96..7a07c5ba185 100644 --- a/cpp/test/Ice/exceptions/Makefile.mak +++ b/cpp/test/Ice/exceptions/Makefile.mak @@ -58,6 +58,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -67,22 +68,22 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVERAMD)$(EXT): $(SAMDOBJS) $(OBJS) - $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/exceptions/Server.cpp b/cpp/test/Ice/exceptions/Server.cpp index 4177ba51722..a1fae488246 100644 --- a/cpp/test/Ice/exceptions/Server.cpp +++ b/cpp/test/Ice/exceptions/Server.cpp @@ -18,6 +18,11 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); + communicator->getProperties()->setProperty("TestAdapter2.Endpoints", getTestEndpoint(communicator, 1)); + communicator->getProperties()->setProperty("TestAdapter2.MessageSizeMax", "0"); + communicator->getProperties()->setProperty("TestAdapter3.Endpoints", getTestEndpoint(communicator, 2)); + communicator->getProperties()->setProperty("TestAdapter3.MessageSizeMax", "1"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectAdapterPtr adapter2 = communicator->createObjectAdapter("TestAdapter2"); Ice::ObjectAdapterPtr adapter3 = communicator->createObjectAdapter("TestAdapter3"); @@ -46,12 +51,7 @@ main(int argc, char* argv[]) initData.properties = Ice::createProperties(argc, argv); initData.properties->setProperty("Ice.Warn.Dispatch", "0"); initData.properties->setProperty("Ice.Warn.Connections", "0"); - initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); initData.properties->setProperty("Ice.MessageSizeMax", "10"); // 10KB max - initData.properties->setProperty("TestAdapter2.Endpoints", "default -p 12011"); - initData.properties->setProperty("TestAdapter2.MessageSizeMax", "0"); - initData.properties->setProperty("TestAdapter3.Endpoints", "default -p 12012"); - initData.properties->setProperty("TestAdapter3.MessageSizeMax", "1"); Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); return run(argc, argv, ich.communicator()); diff --git a/cpp/test/Ice/exceptions/ServerAMD.cpp b/cpp/test/Ice/exceptions/ServerAMD.cpp index f93fd0e2a2f..14bfcc40cc4 100644 --- a/cpp/test/Ice/exceptions/ServerAMD.cpp +++ b/cpp/test/Ice/exceptions/ServerAMD.cpp @@ -18,6 +18,11 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); + communicator->getProperties()->setProperty("TestAdapter2.Endpoints", getTestEndpoint(communicator, 1)); + communicator->getProperties()->setProperty("TestAdapter2.MessageSizeMax", "0"); + communicator->getProperties()->setProperty("TestAdapter3.Endpoints", getTestEndpoint(communicator, 2)); + communicator->getProperties()->setProperty("TestAdapter3.MessageSizeMax", "1"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectAdapterPtr adapter2 = communicator->createObjectAdapter("TestAdapter2"); Ice::ObjectAdapterPtr adapter3 = communicator->createObjectAdapter("TestAdapter3"); @@ -46,12 +51,7 @@ main(int argc, char* argv[]) initData.properties = Ice::createProperties(argc, argv); initData.properties->setProperty("Ice.Warn.Dispatch", "0"); initData.properties->setProperty("Ice.Warn.Connections", "0"); - initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); initData.properties->setProperty("Ice.MessageSizeMax", "10"); // 10KB max - initData.properties->setProperty("TestAdapter2.Endpoints", "default -p 12011"); - initData.properties->setProperty("TestAdapter2.MessageSizeMax", "0"); - initData.properties->setProperty("TestAdapter3.Endpoints", "default -p 12012"); - initData.properties->setProperty("TestAdapter3.MessageSizeMax", "1"); Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); return run(argc, argv, ich.communicator()); diff --git a/cpp/test/Ice/exceptions/run.py b/cpp/test/Ice/exceptions/run.py index b90a1b41d48..95919818241 100755 --- a/cpp/test/Ice/exceptions/run.py +++ b/cpp/test/Ice/exceptions/run.py @@ -20,29 +20,31 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() - -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") - -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") - -print("Running test with compact (default) format and AMD server.") -TestUtil.clientServerTest(server="serveramd") - -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="serveramd", - additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") - -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="serveramd", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") - -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") + +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") + +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") + +TestUtil.queueClientServerTest(configName = "compactAMD", localOnly = True, + message = "Running test with compact (default) format and AMD server.", + server="serveramd") + +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", + server="serveramd", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") + +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", + server="serveramd", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") + +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/facets/AllTests.cpp b/cpp/test/Ice/facets/AllTests.cpp index 9ea52c2f771..c10ba942b0a 100644 --- a/cpp/test/Ice/facets/AllTests.cpp +++ b/cpp/test/Ice/facets/AllTests.cpp @@ -44,9 +44,20 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "ok" << endl; cout << "testing facet registration exceptions... " << flush; - string host = communicator->getProperties()->getPropertyAsIntWithDefault("Ice.IPv6", 0) == 0 ? - "127.0.0.1" : "\"0:0:0:0:0:0:0:1\""; - communicator->getProperties()->setProperty("FacetExceptionTestAdapter.Endpoints", "default -h " + host); + string localOAEndpoint; + { + ostringstream ostr; + if(communicator->getProperties()->getProperty("Ice.Default.Protocol") == "bt") + { + ostr << "default -a *"; + } + else + { + ostr << "default -h *"; + } + localOAEndpoint = ostr.str(); + } + communicator->getProperties()->setProperty("FacetExceptionTestAdapter.Endpoints", localOAEndpoint); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("FacetExceptionTestAdapter"); Ice::ObjectPtr obj = ICE_MAKE_SHARED(EmptyI); adapter->add(obj, communicator->stringToIdentity("d")); @@ -101,7 +112,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter->deactivate(); cout << "testing stringToProxy... " << flush; - string ref = "d:default -p 12010"; + string ref = "d:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr db = communicator->stringToProxy(ref); test(db); cout << "ok" << endl; diff --git a/cpp/test/Ice/facets/Client.cpp b/cpp/test/Ice/facets/Client.cpp index be799e603bf..aa2161344bb 100644 --- a/cpp/test/Ice/facets/Client.cpp +++ b/cpp/test/Ice/facets/Client.cpp @@ -30,16 +30,22 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try { Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/facets", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { cerr << ex << endl; - return EXIT_FAILURE; + return EXIT_FAILURE; } } diff --git a/cpp/test/Ice/facets/Collocated.cpp b/cpp/test/Ice/facets/Collocated.cpp index 035ae9bc480..3390f809817 100644 --- a/cpp/test/Ice/facets/Collocated.cpp +++ b/cpp/test/Ice/facets/Collocated.cpp @@ -19,7 +19,7 @@ using namespace Test; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr d = ICE_MAKE_SHARED(DI); adapter->add(d, communicator->stringToIdentity("d")); diff --git a/cpp/test/Ice/facets/Makefile b/cpp/test/Ice/facets/Makefile index 084ef7d8f02..4890a63bced 100644 --- a/cpp/test/Ice/facets/Makefile +++ b/cpp/test/Ice/facets/Makefile @@ -38,14 +38,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/facets/Makefile.mak b/cpp/test/Ice/facets/Makefile.mak index 0805d11b3f1..3ffe148e145 100644 --- a/cpp/test/Ice/facets/Makefile.mak +++ b/cpp/test/Ice/facets/Makefile.mak @@ -47,6 +47,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -55,17 +56,17 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/facets/Server.cpp b/cpp/test/Ice/facets/Server.cpp index e6ecec14ee6..e6fea6cc5bd 100644 --- a/cpp/test/Ice/facets/Server.cpp +++ b/cpp/test/Ice/facets/Server.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr d = ICE_MAKE_SHARED(DI); adapter->add(d, communicator->stringToIdentity("d")); diff --git a/cpp/test/Ice/facets/run.py b/cpp/test/Ice/facets/run.py index c9767485188..eb52f00447a 100755 --- a/cpp/test/Ice/facets/run.py +++ b/cpp/test/Ice/facets/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/hold/AllTests.cpp b/cpp/test/Ice/hold/AllTests.cpp index 525dcc1135a..621ec2763af 100644 --- a/cpp/test/Ice/hold/AllTests.cpp +++ b/cpp/test/Ice/hold/AllTests.cpp @@ -81,10 +81,10 @@ void allTests(const Ice::CommunicatorPtr& communicator) { cout << "testing stringToProxy... " << flush; - string ref = "hold:default -p 12010"; + string ref = "hold:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr base = communicator->stringToProxy(ref); test(base); - string refSerialized = "hold:default -p 12011"; + string refSerialized = "hold:" + getTestEndpoint(communicator, 1); Ice::ObjectPrxPtr baseSerialized = communicator->stringToProxy(refSerialized); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/hold/Client.cpp b/cpp/test/Ice/hold/Client.cpp index 4edf543d623..9e08d981b3a 100644 --- a/cpp/test/Ice/hold/Client.cpp +++ b/cpp/test/Ice/hold/Client.cpp @@ -29,11 +29,18 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif + try { Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/hold", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { diff --git a/cpp/test/Ice/hold/Makefile b/cpp/test/Ice/hold/Makefile index 73cbd82bdc7..cbaaed8a43f 100644 --- a/cpp/test/Ice/hold/Makefile +++ b/cpp/test/Ice/hold/Makefile @@ -31,10 +31,12 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/hold/Makefile.mak b/cpp/test/Ice/hold/Makefile.mak index b81fedd766e..6d11b42186e 100644 --- a/cpp/test/Ice/hold/Makefile.mak +++ b/cpp/test/Ice/hold/Makefile.mak @@ -40,6 +40,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -47,12 +48,12 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/hold/Server.cpp b/cpp/test/Ice/hold/Server.cpp index ab30b3a4130..ee0ff170128 100644 --- a/cpp/test/Ice/hold/Server.cpp +++ b/cpp/test/Ice/hold/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { IceUtil::TimerPtr timer = new IceUtil::Timer(); - communicator->getProperties()->setProperty("TestAdapter1.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter1.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); communicator->getProperties()->setProperty("TestAdapter1.ThreadPool.Size", "5"); communicator->getProperties()->setProperty("TestAdapter1.ThreadPool.SizeMax", "5"); communicator->getProperties()->setProperty("TestAdapter1.ThreadPool.SizeWarn", "0"); @@ -28,7 +28,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter1 = communicator->createObjectAdapter("TestAdapter1"); adapter1->add(ICE_MAKE_SHARED(HoldI, timer, adapter1), communicator->stringToIdentity("hold")); - communicator->getProperties()->setProperty("TestAdapter2.Endpoints", "default -p 12011:udp"); + communicator->getProperties()->setProperty("TestAdapter2.Endpoints", getTestEndpoint(communicator, 1) + ":udp"); communicator->getProperties()->setProperty("TestAdapter2.ThreadPool.Size", "5"); communicator->getProperties()->setProperty("TestAdapter2.ThreadPool.SizeMax", "5"); communicator->getProperties()->setProperty("TestAdapter2.ThreadPool.SizeWarn", "0"); diff --git a/cpp/test/Ice/hold/run.py b/cpp/test/Ice/hold/run.py index ce8c5dd4b18..c1eec8b731d 100755 --- a/cpp/test/Ice/hold/run.py +++ b/cpp/test/Ice/hold/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/info/run.py b/cpp/test/Ice/info/run.py index ce8c5dd4b18..c1eec8b731d 100755 --- a/cpp/test/Ice/info/run.py +++ b/cpp/test/Ice/info/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/inheritance/AllTests.cpp b/cpp/test/Ice/inheritance/AllTests.cpp index dd316ac08c8..105bb12a576 100644 --- a/cpp/test/Ice/inheritance/AllTests.cpp +++ b/cpp/test/Ice/inheritance/AllTests.cpp @@ -18,7 +18,7 @@ InitialPrxPtr allTests(const Ice::CommunicatorPtr& communicator) { cout << "testing stringToProxy... " << flush; - string ref = "initial:default -p 12010"; + string ref = "initial:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/inheritance/Client.cpp b/cpp/test/Ice/inheritance/Client.cpp index 523efc94ff9..10a96b1f3f5 100644 --- a/cpp/test/Ice/inheritance/Client.cpp +++ b/cpp/test/Ice/inheritance/Client.cpp @@ -30,16 +30,22 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try { Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/inheritance", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { cerr << ex << endl; - return EXIT_FAILURE; + return EXIT_FAILURE; } } diff --git a/cpp/test/Ice/inheritance/Collocated.cpp b/cpp/test/Ice/inheritance/Collocated.cpp index 8496f69ecd4..ac543d9b123 100644 --- a/cpp/test/Ice/inheritance/Collocated.cpp +++ b/cpp/test/Ice/inheritance/Collocated.cpp @@ -19,7 +19,7 @@ using namespace Test; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(InitialI, adapter); adapter->add(object, communicator->stringToIdentity("initial")); diff --git a/cpp/test/Ice/inheritance/Makefile b/cpp/test/Ice/inheritance/Makefile index 084ef7d8f02..4890a63bced 100644 --- a/cpp/test/Ice/inheritance/Makefile +++ b/cpp/test/Ice/inheritance/Makefile @@ -38,14 +38,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/inheritance/Makefile.mak b/cpp/test/Ice/inheritance/Makefile.mak index 41ea2c5ae6f..b2084cf0520 100644 --- a/cpp/test/Ice/inheritance/Makefile.mak +++ b/cpp/test/Ice/inheritance/Makefile.mak @@ -47,6 +47,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -55,17 +56,17 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/inheritance/Server.cpp b/cpp/test/Ice/inheritance/Server.cpp index a187231ecd2..8d8ad66e2db 100644 --- a/cpp/test/Ice/inheritance/Server.cpp +++ b/cpp/test/Ice/inheritance/Server.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(InitialI, adapter); adapter->add(object, communicator->stringToIdentity("initial")); diff --git a/cpp/test/Ice/inheritance/run.py b/cpp/test/Ice/inheritance/run.py index c9767485188..eb52f00447a 100755 --- a/cpp/test/Ice/inheritance/run.py +++ b/cpp/test/Ice/inheritance/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/invoke/AllTests.cpp b/cpp/test/Ice/invoke/AllTests.cpp index fc7cf33cf60..d17f2417e93 100644 --- a/cpp/test/Ice/invoke/AllTests.cpp +++ b/cpp/test/Ice/invoke/AllTests.cpp @@ -285,7 +285,7 @@ typedef IceUtil::Handle<Callback> CallbackPtr; Test::MyClassPrx allTests(const Ice::CommunicatorPtr& communicator) { - string ref = "test:default -p 12010"; + string ref = "test:" + getTestEndpoint(communicator, 0); Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); diff --git a/cpp/test/Ice/invoke/Makefile b/cpp/test/Ice/invoke/Makefile index 3d60adca492..50f6ec85b7c 100644 --- a/cpp/test/Ice/invoke/Makefile +++ b/cpp/test/Ice/invoke/Makefile @@ -28,10 +28,12 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/invoke/Makefile.mak b/cpp/test/Ice/invoke/Makefile.mak index 5bf3b7259cf..4ba9f44b341 100644 --- a/cpp/test/Ice/invoke/Makefile.mak +++ b/cpp/test/Ice/invoke/Makefile.mak @@ -40,6 +40,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -47,12 +48,12 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/invoke/Server.cpp b/cpp/test/Ice/invoke/Server.cpp index 9b2a4573df8..3b318ed9919 100644 --- a/cpp/test/Ice/invoke/Server.cpp +++ b/cpp/test/Ice/invoke/Server.cpp @@ -88,7 +88,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) bool array = opts.isSet("array"); bool async = opts.isSet("async"); - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->addServantLocator(new ServantLocatorI(array, async), ""); adapter->activate(); diff --git a/cpp/test/Ice/invoke/run.py b/cpp/test/Ice/invoke/run.py index 0b5d905d8d5..21a22307d02 100755 --- a/cpp/test/Ice/invoke/run.py +++ b/cpp/test/Ice/invoke/run.py @@ -20,11 +20,12 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with Blobject server.") -TestUtil.clientServerTest() -print("tests with BlobjectArray server.") -TestUtil.clientServerTest(additionalServerOptions = "--array") -print("tests with BlobjectAsync server.") -TestUtil.clientServerTest(additionalServerOptions = "--async") -print("tests with BlobjectAsyncArray server.") -TestUtil.clientServerTest(additionalServerOptions = "--array --async") +TestUtil.queueClientServerTest(configName = "blobject", message = "Running test with Blobject server.") +TestUtil.queueClientServerTest(configName = "blobjectArray", message = "Running test with BlobjectArray server.", + additionalServerOptions = "--array") +TestUtil.queueClientServerTest(configName = "blobjectAsync", message = "Running test with BlobjectAsync server.", + additionalServerOptions = "--async") +TestUtil.queueClientServerTest(configName = "blobjectAsyncArray", + message = "Running test with BlobjectAsyncArray server.", + additionalServerOptions = "--array --async") +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/location/Client.cpp b/cpp/test/Ice/location/Client.cpp index 4a440505bd2..6d2126d1f66 100644 --- a/cpp/test/Ice/location/Client.cpp +++ b/cpp/test/Ice/location/Client.cpp @@ -19,7 +19,7 @@ int run(int, char**, const Ice::CommunicatorPtr& communicator) { void allTests(const Ice::CommunicatorPtr&, const string&); - allTests(communicator, "ServerManager:default -p 12010"); + allTests(communicator, "ServerManager:" + getTestEndpoint(communicator, 0)); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/location/Makefile b/cpp/test/Ice/location/Makefile index 917a7c0cf4c..d59c9ab5992 100644 --- a/cpp/test/Ice/location/Makefile +++ b/cpp/test/Ice/location/Makefile @@ -32,10 +32,12 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/location/Makefile.mak b/cpp/test/Ice/location/Makefile.mak index 603afa95de0..0964b4b8f81 100644 --- a/cpp/test/Ice/location/Makefile.mak +++ b/cpp/test/Ice/location/Makefile.mak @@ -41,6 +41,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -48,12 +49,12 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/location/Server.cpp b/cpp/test/Ice/location/Server.cpp index 95c4cde49d3..7a9896ba440 100644 --- a/cpp/test/Ice/location/Server.cpp +++ b/cpp/test/Ice/location/Server.cpp @@ -27,7 +27,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator, // Ice::PropertiesPtr properties = communicator->getProperties(); properties->setProperty("Ice.ThreadPool.Server.Size", "2"); - properties->setProperty("ServerManager.Endpoints", "default -p 12010:udp"); + properties->setProperty("ServerManager.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("ServerManager"); diff --git a/cpp/test/Ice/location/run.py b/cpp/test/Ice/location/run.py index ce8c5dd4b18..c1eec8b731d 100755 --- a/cpp/test/Ice/location/run.py +++ b/cpp/test/Ice/location/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/metrics/run.py b/cpp/test/Ice/metrics/run.py index 6d8f4682523..ab0953a3b3a 100755 --- a/cpp/test/Ice/metrics/run.py +++ b/cpp/test/Ice/metrics/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server = "serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server = "serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp index 6ebfa5d1a0b..7545e2a87b3 100644 --- a/cpp/test/Ice/objects/AllTests.cpp +++ b/cpp/test/Ice/objects/AllTests.cpp @@ -35,7 +35,7 @@ public: void testUOE(const Ice::CommunicatorPtr& communicator) { - string ref = "uoet:default -p 12010"; + string ref = "uoet:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr base = communicator->stringToProxy(ref); test(base); UnexpectedObjectExceptionTestPrxPtr uoet = ICE_UNCHECKED_CAST(UnexpectedObjectExceptionTestPrx, base); @@ -65,7 +65,7 @@ InitialPrxPtr allTests(const Ice::CommunicatorPtr& communicator) { cout << "testing stringToProxy... " << flush; - string ref = "initial:default -p 12010"; + string ref = "initial:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/objects/Client.cpp b/cpp/test/Ice/objects/Client.cpp index a0e27474c25..21bc3e9d4a7 100644 --- a/cpp/test/Ice/objects/Client.cpp +++ b/cpp/test/Ice/objects/Client.cpp @@ -144,16 +144,22 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try { Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/objects", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { cerr << ex << endl; - return EXIT_FAILURE; + return EXIT_FAILURE; } } diff --git a/cpp/test/Ice/objects/Collocated.cpp b/cpp/test/Ice/objects/Collocated.cpp index 01c19b84396..d69ab681967 100644 --- a/cpp/test/Ice/objects/Collocated.cpp +++ b/cpp/test/Ice/objects/Collocated.cpp @@ -132,7 +132,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->addObjectFactory(new MyObjectFactory(), "TestOF"); #endif - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(InitialI, adapter), communicator->stringToIdentity("initial")); #ifndef ICE_CPP11_MAPPING diff --git a/cpp/test/Ice/objects/Makefile b/cpp/test/Ice/objects/Makefile index 0031a2e7ccd..29b87ebe56f 100644 --- a/cpp/test/Ice/objects/Makefile +++ b/cpp/test/Ice/objects/Makefile @@ -39,14 +39,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS) $(LIBS)) + $(call mktest,$@,$(COBJS) $(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS) $(LIBS)) + $(call mktest,$@,$(SOBJS) $(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS) $(LIBS)) + $(call mktest,$@,$(COLOBJS) $(LINKWITH)) diff --git a/cpp/test/Ice/objects/Makefile.mak b/cpp/test/Ice/objects/Makefile.mak index ac5d261ddb5..31d808c0ba5 100644 --- a/cpp/test/Ice/objects/Makefile.mak +++ b/cpp/test/Ice/objects/Makefile.mak @@ -48,6 +48,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -56,17 +57,17 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/objects/Server.cpp b/cpp/test/Ice/objects/Server.cpp index 39bfa39e1ed..ead9c04686d 100644 --- a/cpp/test/Ice/objects/Server.cpp +++ b/cpp/test/Ice/objects/Server.cpp @@ -66,7 +66,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->addValueFactory(factory, "::Test::H"); #endif - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(InitialI, adapter), communicator->stringToIdentity("initial")); diff --git a/cpp/test/Ice/objects/run.py b/cpp/test/Ice/objects/run.py index 6014ec1878d..bb0c4f5e11e 100755 --- a/cpp/test/Ice/objects/run.py +++ b/cpp/test/Ice/objects/run.py @@ -20,16 +20,15 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/operations/AllTests.cpp b/cpp/test/Ice/operations/AllTests.cpp index 45e9f666ba3..fa8c84ef772 100644 --- a/cpp/test/Ice/operations/AllTests.cpp +++ b/cpp/test/Ice/operations/AllTests.cpp @@ -17,7 +17,7 @@ using namespace std; Test::MyClassPrxPtr allTests(const Ice::CommunicatorPtr& communicator) { - string ref = "test:default -p 12010"; + string ref = "test:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr base = communicator->stringToProxy(ref); Test::MyClassPrxPtr cl = ICE_CHECKED_CAST(Test::MyClassPrx, base); Test::MyDerivedClassPrxPtr derived = ICE_CHECKED_CAST(Test::MyDerivedClassPrx, cl); diff --git a/cpp/test/Ice/operations/BatchOneways.cpp b/cpp/test/Ice/operations/BatchOneways.cpp index 2776f8cf445..6e9ff288ff8 100644 --- a/cpp/test/Ice/operations/BatchOneways.cpp +++ b/cpp/test/Ice/operations/BatchOneways.cpp @@ -108,7 +108,8 @@ batchOneways(const Test::MyClassPrxPtr& p) IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(10)); } - if(batch->ice_getConnection()) + if(batch->ice_getConnection() && + p->ice_getCommunicator()->getProperties()->getProperty("Ice.Default.Protocol") != "bt") { Test::MyClassPrxPtr batch1 = ICE_UNCHECKED_CAST(Test::MyClassPrx, p->ice_batchOneway()); Test::MyClassPrxPtr batch2 = ICE_UNCHECKED_CAST(Test::MyClassPrx, p->ice_batchOneway()); @@ -141,7 +142,8 @@ batchOneways(const Test::MyClassPrxPtr& p) batch->ice_flushBatchRequests(); batch->ice_ping(); - if(batch->ice_getConnection()) + if(batch->ice_getConnection() && + p->ice_getCommunicator()->getProperties()->getProperty("Ice.Default.Protocol") != "bt") { Ice::InitializationData initData; initData.properties = p->ice_getCommunicator()->getProperties()->clone(); diff --git a/cpp/test/Ice/operations/BatchOnewaysAMI.cpp b/cpp/test/Ice/operations/BatchOnewaysAMI.cpp index ed7ad110e23..d3ea9815258 100644 --- a/cpp/test/Ice/operations/BatchOnewaysAMI.cpp +++ b/cpp/test/Ice/operations/BatchOnewaysAMI.cpp @@ -93,7 +93,7 @@ public: void batchOnewaysAMI(const Test::MyClassPrxPtr& p) { - const Test::ByteS bs1(10 * 1024); + const Test::ByteS bs1(10 * 1024); Test::MyClassPrxPtr batch = ICE_UNCHECKED_CAST(Test::MyClassPrx, p->ice_batchOneway()); #ifdef ICE_CPP11_MAPPING @@ -106,7 +106,7 @@ batchOnewaysAMI(const Test::MyClassPrxPtr& p) }); // Empty flush prom.get_future().get(); - for(int i = 0 ; i < 30 ; ++i) + for(int i = 0; i < 30; ++i) { batch->opByteSOneway_async(bs1, nullptr, [](exception_ptr){ test(false); }); } @@ -118,7 +118,8 @@ batchOnewaysAMI(const Test::MyClassPrxPtr& p) IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(10)); } - if(batch->ice_getConnection()) + if(batch->ice_getConnection() && + p->ice_getCommunicator()->getProperties()->getProperty("Ice.Default.Protocol") != "bt") { shared_ptr<Test::MyClassPrx> batch1 = Ice::uncheckedCast<Test::MyClassPrx>(p->ice_batchOneway()); shared_ptr<Test::MyClassPrx> batch2 = Ice::uncheckedCast<Test::MyClassPrx>(p->ice_batchOneway()); @@ -158,7 +159,7 @@ batchOnewaysAMI(const Test::MyClassPrxPtr& p) test(batch->begin_ice_flushBatchRequests()->isCompleted()); // Empty flush test(batch->begin_ice_flushBatchRequests()->sentSynchronously()); // Empty flush - for(int i = 0 ; i < 30 ; ++i) + for(int i = 0; i < 30; ++i) { batch->begin_opByteSOneway(bs1, Test::newCallback_MyClass_opByteSOneway(new Callback_ByteSOneway(), &Callback_ByteSOneway::response, @@ -172,7 +173,8 @@ batchOnewaysAMI(const Test::MyClassPrxPtr& p) IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(10)); } - if(batch->ice_getConnection()) + if(batch->ice_getConnection() && + p->ice_getCommunicator()->getProperties()->getProperty("Ice.Default.Protocol") != "bt") { Test::MyClassPrx batch1 = Test::MyClassPrx::uncheckedCast(p->ice_batchOneway()); Test::MyClassPrx batch2 = Test::MyClassPrx::uncheckedCast(p->ice_batchOneway()); 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; } } diff --git a/cpp/test/Ice/operations/Collocated.cpp b/cpp/test/Ice/operations/Collocated.cpp index 0564f696cb5..dc061fcc2fe 100644 --- a/cpp/test/Ice/operations/Collocated.cpp +++ b/cpp/test/Ice/operations/Collocated.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); communicator->getProperties()->setProperty("TestAdapter.AdapterId", "test"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPrxPtr prx = adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); diff --git a/cpp/test/Ice/operations/Makefile b/cpp/test/Ice/operations/Makefile index 819e9b236af..32029e29461 100644 --- a/cpp/test/Ice/operations/Makefile +++ b/cpp/test/Ice/operations/Makefile @@ -56,18 +56,20 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(SERVERAMD): $(SAMDOBJS) rm -f $@ - $(call mktest,$@,$(SAMDOBJS),$(LIBS)) + $(call mktest,$@,$(SAMDOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/operations/Makefile.mak b/cpp/test/Ice/operations/Makefile.mak index dd451321bf9..285840a9c2c 100644 --- a/cpp/test/Ice/operations/Makefile.mak +++ b/cpp/test/Ice/operations/Makefile.mak @@ -65,6 +65,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN -Zm200 -bigobj /wd4503 +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -74,22 +75,22 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVERAMD)$(EXT): $(SAMDOBJS) - $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/operations/Server.cpp b/cpp/test/Ice/operations/Server.cpp index 862663895f6..7c52538ef41 100644 --- a/cpp/test/Ice/operations/Server.cpp +++ b/cpp/test/Ice/operations/Server.cpp @@ -18,7 +18,8 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + string endpt = getTestEndpoint(communicator, 0); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpt + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); adapter->activate(); diff --git a/cpp/test/Ice/operations/ServerAMD.cpp b/cpp/test/Ice/operations/ServerAMD.cpp index 2fae05b708d..32384261554 100644 --- a/cpp/test/Ice/operations/ServerAMD.cpp +++ b/cpp/test/Ice/operations/ServerAMD.cpp @@ -18,7 +18,8 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + string endpt = getTestEndpoint(communicator, 0); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpt + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); adapter->activate(); diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp index 50711ad105e..dce362937ca 100644 --- a/cpp/test/Ice/operations/Twoways.cpp +++ b/cpp/test/Ice/operations/Twoways.cpp @@ -1575,7 +1575,7 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p) } #ifndef ICE_OS_WINRT - if(p->ice_getConnection()) + if(p->ice_getConnection() && communicator->getProperties()->getProperty("Ice.Default.Protocol") != "bt") { // // Test implicit context propagation @@ -1596,7 +1596,7 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p) ctx["three"] = "THREE"; Test::MyClassPrxPtr p = ICE_UNCHECKED_CAST(Test::MyClassPrx, - ic->stringToProxy("test:default -p 12010 -t 10000")); + ic->stringToProxy("test:" + getTestEndpoint(ic, 0))); ic->getImplicitContext()->setContext(ctx); test(ic->getImplicitContext()->getContext() == ctx); diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp index f6606431f9a..95c72642fcf 100644 --- a/cpp/test/Ice/operations/TwowaysAMI.cpp +++ b/cpp/test/Ice/operations/TwowaysAMI.cpp @@ -2456,7 +2456,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& } #ifndef ICE_OS_WINRT - if(p->ice_getConnection()) + if(p->ice_getConnection() && communicator->getProperties()->getProperty("Ice.Default.Protocol") != "bt") { // // Test implicit context propagation @@ -2476,8 +2476,8 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& ctx["two"] = "TWO"; ctx["three"] = "THREE"; - - Test::MyClassPrxPtr p = ICE_UNCHECKED_CAST(Test::MyClassPrx, ic->stringToProxy("test:default -p 12010")); + Test::MyClassPrxPtr p = + ICE_UNCHECKED_CAST(Test::MyClassPrx, ic->stringToProxy("test:" + getTestEndpoint(ic, 0))); ic->getImplicitContext()->setContext(ctx); test(ic->getImplicitContext()->getContext() == ctx); { diff --git a/cpp/test/Ice/operations/run.py b/cpp/test/Ice/operations/run.py index 996d09d4d36..d69e9be2733 100755 --- a/cpp/test/Ice/operations/run.py +++ b/cpp/test/Ice/operations/run.py @@ -20,9 +20,9 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0") -print("tests with AMD server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0", server = "serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0") +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + additionalClientOptions = "--Ice.Warn.AMICallback=0", + server = "serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/optional/AllTests.cpp b/cpp/test/Ice/optional/AllTests.cpp index 9a4b3bae2aa..4523f3e62ac 100644 --- a/cpp/test/Ice/optional/AllTests.cpp +++ b/cpp/test/Ice/optional/AllTests.cpp @@ -238,7 +238,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool) communicator->addValueFactory(factory, ""); cout << "testing stringToProxy... " << flush; - string ref = "initial:default -p 12010"; + string ref = "initial:" + getTestEndpoint(communicator, 0); Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/optional/Client.cpp b/cpp/test/Ice/optional/Client.cpp index 6db3cf0cce2..9f3088c78ad 100644 --- a/cpp/test/Ice/optional/Client.cpp +++ b/cpp/test/Ice/optional/Client.cpp @@ -30,34 +30,22 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif - int status; - Ice::CommunicatorPtr communicator; - try { - communicator = Ice::initialize(argc, argv); - status = run(argc, argv, communicator); + Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); + RemoteConfig rc("Ice/optional", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { cerr << ex << endl; - status = EXIT_FAILURE; + return EXIT_FAILURE; } - - if(communicator) - { - try - { - communicator->destroy(); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - } - - return status; } diff --git a/cpp/test/Ice/optional/Makefile b/cpp/test/Ice/optional/Makefile index 2facb4f0064..b56991dd6a8 100644 --- a/cpp/test/Ice/optional/Makefile +++ b/cpp/test/Ice/optional/Makefile @@ -39,14 +39,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS) $(LIBS)) + $(call mktest,$@,$(COBJS) $(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS) $(LIBS)) + $(call mktest,$@,$(SOBJS) $(LINKWITH)) $(SERVERAMD): $(SAMDOBJS) rm -f $@ - $(call mktest,$@,$(SAMDOBJS) $(LIBS)) + $(call mktest,$@,$(SAMDOBJS) $(LINKWITH)) diff --git a/cpp/test/Ice/optional/Makefile.mak b/cpp/test/Ice/optional/Makefile.mak index 52326987214..ce169f5e2d3 100644 --- a/cpp/test/Ice/optional/Makefile.mak +++ b/cpp/test/Ice/optional/Makefile.mak @@ -47,6 +47,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -55,17 +56,17 @@ SAPDBFLAGS = /pdb:$(SERVERAMD).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVERAMD)$(EXT): $(SAMDOBJS) - $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/optional/Server.cpp b/cpp/test/Ice/optional/Server.cpp index 48d5017f48b..8460539df79 100644 --- a/cpp/test/Ice/optional/Server.cpp +++ b/cpp/test/Ice/optional/Server.cpp @@ -19,7 +19,7 @@ using namespace Test; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new InitialI(), communicator->stringToIdentity("initial")); adapter->activate(); diff --git a/cpp/test/Ice/optional/ServerAMD.cpp b/cpp/test/Ice/optional/ServerAMD.cpp index a541b269137..debdcd6d684 100644 --- a/cpp/test/Ice/optional/ServerAMD.cpp +++ b/cpp/test/Ice/optional/ServerAMD.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new InitialI(), communicator->stringToIdentity("initial")); adapter->activate(); diff --git a/cpp/test/Ice/optional/run.py b/cpp/test/Ice/optional/run.py index 54cbcb67bee..a9baaa0b508 100755 --- a/cpp/test/Ice/optional/run.py +++ b/cpp/test/Ice/optional/run.py @@ -20,9 +20,10 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with AMD server.") -TestUtil.clientServerTest(server = "serveramd") +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server = "serveramd") +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp index d324135ac83..405c53e4ab2 100644 --- a/cpp/test/Ice/proxy/AllTests.cpp +++ b/cpp/test/Ice/proxy/AllTests.cpp @@ -19,8 +19,9 @@ using namespace std; Test::MyClassPrxPtr allTests(const Ice::CommunicatorPtr& communicator) { + const string endp = getTestEndpoint(communicator, 0); cout << "testing stringToProxy... " << flush; - string ref = "test:default -p 12010"; + string ref = "test:" + endp; Ice::ObjectPrxPtr base = communicator->stringToProxy(ref); test(base); @@ -271,7 +272,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing propertyToProxy... " << flush; Ice::PropertiesPtr prop = communicator->getProperties(); string propertyPrefix = "Foo.Proxy"; - prop->setProperty(propertyPrefix, "test:default -p 12010"); + prop->setProperty(propertyPrefix, "test:" + endp); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getAdapterId().empty() && b1->ice_getFacet().empty()); @@ -280,7 +281,7 @@ allTests(const Ice::CommunicatorPtr& communicator) property = propertyPrefix + ".Locator"; test(!b1->ice_getLocator()); - prop->setProperty(property, "locator:default -p 10000"); + prop->setProperty(property, "locator:" + endp); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getLocator() && b1->ice_getLocator()->ice_getIdentity().name == "locator"); prop->setProperty(property, ""); @@ -295,7 +296,7 @@ allTests(const Ice::CommunicatorPtr& communicator) // Now retest with an indirect proxy. prop->setProperty(propertyPrefix, "test"); property = propertyPrefix + ".Locator"; - prop->setProperty(property, "locator:default -p 10000"); + prop->setProperty(property, "locator:" + endp); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getLocator() && b1->ice_getLocator()->ice_getIdentity().name == "locator"); prop->setProperty(property, ""); @@ -315,11 +316,11 @@ allTests(const Ice::CommunicatorPtr& communicator) //test(b1->ice_getLocatorCacheTimeout() == 60); //prop->setProperty("Ice.Default.LocatorCacheTimeout", ""); - prop->setProperty(propertyPrefix, "test:default -p 12010"); + prop->setProperty(propertyPrefix, "test:" + endp); property = propertyPrefix + ".Router"; test(!b1->ice_getRouter()); - prop->setProperty(property, "router:default -p 10000"); + prop->setProperty(property, "router:" + endp); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getRouter() && b1->ice_getRouter()->ice_getIdentity().name == "router"); prop->setProperty(property, ""); @@ -787,8 +788,8 @@ allTests(const Ice::CommunicatorPtr& communicator) test(compObj->ice_timeout(10) < compObj->ice_timeout(20)); test(!(compObj->ice_timeout(20) < compObj->ice_timeout(10))); - Ice::LocatorPrxPtr loc1 = ICE_UNCHECKED_CAST(Ice::LocatorPrx, communicator->stringToProxy("loc1:default -p 10000")); - Ice::LocatorPrxPtr loc2 = ICE_UNCHECKED_CAST(Ice::LocatorPrx, communicator->stringToProxy("loc2:default -p 10000")); + Ice::LocatorPrxPtr loc1 = ICE_UNCHECKED_CAST(Ice::LocatorPrx, communicator->stringToProxy("loc1:" + endp)); + Ice::LocatorPrxPtr loc2 = ICE_UNCHECKED_CAST(Ice::LocatorPrx, communicator->stringToProxy("loc2:" + endp)); test(compObj->ice_locator(0) == compObj->ice_locator(0)); test(compObj->ice_locator(loc1) == compObj->ice_locator(loc1)); test(compObj->ice_locator(loc1) != compObj->ice_locator(0)); @@ -799,8 +800,8 @@ allTests(const Ice::CommunicatorPtr& communicator) test(compObj->ice_locator(loc1) < compObj->ice_locator(loc2)); test(!(compObj->ice_locator(loc2) < compObj->ice_locator(loc1))); - Ice::RouterPrxPtr rtr1 = ICE_UNCHECKED_CAST(Ice::RouterPrx, communicator->stringToProxy("rtr1:default -p 10000")); - Ice::RouterPrxPtr rtr2 = ICE_UNCHECKED_CAST(Ice::RouterPrx, communicator->stringToProxy("rtr2:default -p 10000")); + Ice::RouterPrxPtr rtr1 = ICE_UNCHECKED_CAST(Ice::RouterPrx, communicator->stringToProxy("rtr1:" + endp)); + Ice::RouterPrxPtr rtr2 = ICE_UNCHECKED_CAST(Ice::RouterPrx, communicator->stringToProxy("rtr2:" + endp)); test(compObj->ice_router(0) == compObj->ice_router(0)); test(compObj->ice_router(rtr1) == compObj->ice_router(rtr1)); test(compObj->ice_router(rtr1) != compObj->ice_router(0)); @@ -949,7 +950,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "ok" << endl; cout << "testing encoding versioning... " << flush; - string ref20 = "test -e 2.0:default -p 12010"; + string ref20 = "test -e 2.0:" + endp; Test::MyClassPrxPtr cl20 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref20)); try { @@ -961,7 +962,7 @@ allTests(const Ice::CommunicatorPtr& communicator) // Server 2.0 endpoint doesn't support 1.1 version. } - string ref10 = "test -e 1.0:default -p 12010"; + string ref10 = "test -e 1.0:" + endp; Test::MyClassPrxPtr cl10 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref10)); cl10->ice_ping(); cl10->ice_encodingVersion(Ice::Encoding_1_0)->ice_ping(); @@ -969,7 +970,7 @@ allTests(const Ice::CommunicatorPtr& communicator) // 1.3 isn't supported but since a 1.3 proxy supports 1.1, the // call will use the 1.1 encoding - string ref13 = "test -e 1.3:default -p 12010"; + string ref13 = "test -e 1.3:" + endp; Test::MyClassPrxPtr cl13 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref13)); cl13->ice_ping(); #ifdef ICE_CPP11_MAPPING @@ -1029,7 +1030,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing protocol versioning... " << flush; - ref20 = "test -p 2.0:default -p 12010"; + ref20 = "test -p 2.0:" + endp; cl20 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref20)); try { @@ -1041,13 +1042,13 @@ allTests(const Ice::CommunicatorPtr& communicator) // Server 2.0 proxy doesn't support 1.0 version. } - ref10 = "test -p 1.0:default -p 12010"; + ref10 = "test -p 1.0:" + endp; cl10 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref10)); cl10->ice_ping(); // 1.3 isn't supported but since a 1.3 proxy supports 1.0, the // call will use the 1.0 encoding - ref13 = "test -p 1.3:default -p 12010"; + ref13 = "test -p 1.3:" + endp; cl13 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref13)); cl13->ice_ping(); #ifdef ICE_CPP11_MAPPING diff --git a/cpp/test/Ice/proxy/Client.cpp b/cpp/test/Ice/proxy/Client.cpp index a437557679e..4ae9f5e19d9 100644 --- a/cpp/test/Ice/proxy/Client.cpp +++ b/cpp/test/Ice/proxy/Client.cpp @@ -31,16 +31,22 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try { Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/proxy", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { cerr << ex << endl; - return EXIT_FAILURE; + return EXIT_FAILURE; } } diff --git a/cpp/test/Ice/proxy/Collocated.cpp b/cpp/test/Ice/proxy/Collocated.cpp index c2310bf36b7..ae131a1478b 100644 --- a/cpp/test/Ice/proxy/Collocated.cpp +++ b/cpp/test/Ice/proxy/Collocated.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); //adapter->activate(); // Don't activate OA to ensure collocation is used. diff --git a/cpp/test/Ice/proxy/Makefile b/cpp/test/Ice/proxy/Makefile index 803fb4d002d..da6458f658a 100644 --- a/cpp/test/Ice/proxy/Makefile +++ b/cpp/test/Ice/proxy/Makefile @@ -51,18 +51,20 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include -I../../../src $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(SERVERAMD): $(SAMDOBJS) rm -f $@ - $(call mktest,$@,$(SAMDOBJS),$(LIBS)) + $(call mktest,$@,$(SAMDOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/proxy/Makefile.mak b/cpp/test/Ice/proxy/Makefile.mak index 55b8cc66b0f..ab98662bdb0 100644 --- a/cpp/test/Ice/proxy/Makefile.mak +++ b/cpp/test/Ice/proxy/Makefile.mak @@ -53,6 +53,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include -I../../../src $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -62,22 +63,22 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVERAMD)$(EXT): $(SAMDOBJS) - $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/proxy/Server.cpp b/cpp/test/Ice/proxy/Server.cpp index b2069a3ac1c..ed328427f86 100644 --- a/cpp/test/Ice/proxy/Server.cpp +++ b/cpp/test/Ice/proxy/Server.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); adapter->activate(); diff --git a/cpp/test/Ice/proxy/ServerAMD.cpp b/cpp/test/Ice/proxy/ServerAMD.cpp index fa2043f2c2f..db3c70012dc 100644 --- a/cpp/test/Ice/proxy/ServerAMD.cpp +++ b/cpp/test/Ice/proxy/ServerAMD.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); adapter->activate(); diff --git a/cpp/test/Ice/proxy/run.py b/cpp/test/Ice/proxy/run.py index 6d8f4682523..ab0953a3b3a 100755 --- a/cpp/test/Ice/proxy/run.py +++ b/cpp/test/Ice/proxy/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server = "serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server = "serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/retry/Client.cpp b/cpp/test/Ice/retry/Client.cpp index 4a125e812d3..4b856f2c039 100644 --- a/cpp/test/Ice/retry/Client.cpp +++ b/cpp/test/Ice/retry/Client.cpp @@ -21,7 +21,7 @@ int run(int, char**, const Ice::CommunicatorPtr& communicator, const Ice::CommunicatorPtr& communicator2) { RetryPrxPtr allTests(const Ice::CommunicatorPtr&, const Ice::CommunicatorPtr&, const string&); - RetryPrxPtr retry = allTests(communicator, communicator2, "retry:default -p 12010"); + RetryPrxPtr retry = allTests(communicator, communicator2, "retry:" + getTestEndpoint(communicator, 0)); retry->shutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/retry/Makefile b/cpp/test/Ice/retry/Makefile index a3dbf5cb6cb..655dae50038 100644 --- a/cpp/test/Ice/retry/Makefile +++ b/cpp/test/Ice/retry/Makefile @@ -40,14 +40,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/retry/Makefile.mak b/cpp/test/Ice/retry/Makefile.mak index be45955bcc3..4a29f604b83 100644 --- a/cpp/test/Ice/retry/Makefile.mak +++ b/cpp/test/Ice/retry/Makefile.mak @@ -49,6 +49,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -57,17 +58,17 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/retry/Server.cpp b/cpp/test/Ice/retry/Server.cpp index 905eb6d3bd9..ab6b4c34aa3 100644 --- a/cpp/test/Ice/retry/Server.cpp +++ b/cpp/test/Ice/retry/Server.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(RetryI), communicator->stringToIdentity("retry")); adapter->activate(); diff --git a/cpp/test/Ice/retry/run.py b/cpp/test/Ice/retry/run.py index 0816938a196..eb52f00447a 100755 --- a/cpp/test/Ice/retry/run.py +++ b/cpp/test/Ice/retry/run.py @@ -20,7 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/servantLocator/AllTests.cpp b/cpp/test/Ice/servantLocator/AllTests.cpp index edc1c6d165e..fab408d7368 100644 --- a/cpp/test/Ice/servantLocator/AllTests.cpp +++ b/cpp/test/Ice/servantLocator/AllTests.cpp @@ -216,8 +216,9 @@ testExceptions(const TestIntfPrxPtr& obj) TestIntfPrxPtr allTests(const CommunicatorPtr& communicator) { + const string endp = getTestEndpoint(communicator, 0); cout << "testing stringToProxy... " << flush; - ObjectPrxPtr base = communicator->stringToProxy("asm:default -p 12010"); + ObjectPrxPtr base = communicator->stringToProxy("asm:" + endp); test(base); cout << "ok" << endl; @@ -234,7 +235,7 @@ allTests(const CommunicatorPtr& communicator) cout << "testing ice_ids... " << flush; try { - ObjectPrxPtr o = communicator->stringToProxy("category/locate:default -p 12010"); + ObjectPrxPtr o = communicator->stringToProxy("category/locate:" + endp); o->ice_ids(); test(false); } @@ -249,7 +250,7 @@ allTests(const CommunicatorPtr& communicator) try { - ObjectPrxPtr o = communicator->stringToProxy("category/finished:default -p 12010"); + ObjectPrxPtr o = communicator->stringToProxy("category/finished:" + endp); o->ice_ids(); test(false); } @@ -264,7 +265,7 @@ allTests(const CommunicatorPtr& communicator) cout << "ok" << endl; cout << "testing servant locator..." << flush; - base = communicator->stringToProxy("category/locate:default -p 12010"); + base = communicator->stringToProxy("category/locate:" + endp); obj = ICE_CHECKED_CAST(TestIntfPrx, base); try { @@ -276,9 +277,9 @@ allTests(const CommunicatorPtr& communicator) cout << "ok" << endl; cout << "testing default servant locator..." << flush; - base = communicator->stringToProxy("anothercategory/locate:default -p 12010"); + base = communicator->stringToProxy("anothercategory/locate:" + endp); obj = ICE_CHECKED_CAST(TestIntfPrx, base); - base = communicator->stringToProxy("locate:default -p 12010"); + base = communicator->stringToProxy("locate:" + endp); obj = ICE_CHECKED_CAST(TestIntfPrx, base); try { @@ -289,7 +290,7 @@ allTests(const CommunicatorPtr& communicator) } try { - ICE_CHECKED_CAST(TestIntfPrx, communicator->stringToProxy("unknown:default -p 12010")); + ICE_CHECKED_CAST(TestIntfPrx, communicator->stringToProxy("unknown:" + endp)); } catch(const Ice::ObjectNotExistException&) { @@ -297,13 +298,13 @@ allTests(const CommunicatorPtr& communicator) cout << "ok" << endl; cout << "testing locate exceptions... " << flush; - base = communicator->stringToProxy("category/locate:default -p 12010"); + base = communicator->stringToProxy("category/locate:" + endp); obj = ICE_CHECKED_CAST(TestIntfPrx, base); testExceptions(obj); cout << "ok" << endl; cout << "testing finished exceptions... " << flush; - base = communicator->stringToProxy("category/finished:default -p 12010"); + base = communicator->stringToProxy("category/finished:" + endp); obj = ICE_CHECKED_CAST(TestIntfPrx, base); testExceptions(obj); @@ -343,7 +344,7 @@ allTests(const CommunicatorPtr& communicator) cout << "ok" << endl; cout << "testing servant locator removal... " << flush; - base = communicator->stringToProxy("test/activation:default -p 12010"); + base = communicator->stringToProxy("test/activation:" + endp); TestActivationPrxPtr activation = ICE_CHECKED_CAST(TestActivationPrx, base); activation->activateServantLocator(false); try diff --git a/cpp/test/Ice/servantLocator/Client.cpp b/cpp/test/Ice/servantLocator/Client.cpp index 70ac931e8cb..27f539823a6 100644 --- a/cpp/test/Ice/servantLocator/Client.cpp +++ b/cpp/test/Ice/servantLocator/Client.cpp @@ -30,13 +30,20 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif + try { Ice::InitializationData initData; initData.properties = Ice::createProperties(argc, argv); Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/servantLocator", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { diff --git a/cpp/test/Ice/servantLocator/Collocated.cpp b/cpp/test/Ice/servantLocator/Collocated.cpp index 175bb69aa28..c8378b6bf7c 100644 --- a/cpp/test/Ice/servantLocator/Collocated.cpp +++ b/cpp/test/Ice/servantLocator/Collocated.cpp @@ -91,7 +91,7 @@ int run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("Ice.Warn.Dispatch", "0"); - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->addServantLocator(ICE_MAKE_SHARED(ServantLocatorI, ""), ""); diff --git a/cpp/test/Ice/servantLocator/Makefile b/cpp/test/Ice/servantLocator/Makefile index bafff999078..bd5cd67ea3f 100644 --- a/cpp/test/Ice/servantLocator/Makefile +++ b/cpp/test/Ice/servantLocator/Makefile @@ -48,18 +48,20 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(SERVERAMD): $(SAMDOBJS) rm -f $@ - $(call mktest,$@,$(SAMDOBJS),$(LIBS)) + $(call mktest,$@,$(SAMDOBJS),$(LINKWITH)) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(call mktest,$@,$(COLOBJS),$(LIBS)) + $(call mktest,$@,$(COLOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/servantLocator/Makefile.mak b/cpp/test/Ice/servantLocator/Makefile.mak index 9b2eb564aaa..e05266c7ef2 100644 --- a/cpp/test/Ice/servantLocator/Makefile.mak +++ b/cpp/test/Ice/servantLocator/Makefile.mak @@ -56,6 +56,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -65,22 +66,22 @@ COPDBFLAGS = /pdb:$(COLLOCATED).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVERAMD)$(EXT): $(SAMDOBJS) - $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(COLLOCATED)$(EXT): $(COLOBJS) - $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/servantLocator/Server.cpp b/cpp/test/Ice/servantLocator/Server.cpp index ba2c45b4c7f..f4508f88606 100644 --- a/cpp/test/Ice/servantLocator/Server.cpp +++ b/cpp/test/Ice/servantLocator/Server.cpp @@ -90,7 +90,7 @@ public: int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); communicator->getProperties()->setProperty("Ice.Warn.Dispatch", "0"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); diff --git a/cpp/test/Ice/servantLocator/ServerAMD.cpp b/cpp/test/Ice/servantLocator/ServerAMD.cpp index 94d7b38a75e..e5da80a16d3 100644 --- a/cpp/test/Ice/servantLocator/ServerAMD.cpp +++ b/cpp/test/Ice/servantLocator/ServerAMD.cpp @@ -89,7 +89,7 @@ public: int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); communicator->getProperties()->setProperty("Ice.Warn.Dispatch", "0"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); diff --git a/cpp/test/Ice/servantLocator/run.py b/cpp/test/Ice/servantLocator/run.py index 6d8f4682523..ab0953a3b3a 100755 --- a/cpp/test/Ice/servantLocator/run.py +++ b/cpp/test/Ice/servantLocator/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server = "serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server = "serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/services/run.py b/cpp/test/Ice/services/run.py index 1bbd63078e3..1bbd63078e3 100644..100755 --- a/cpp/test/Ice/services/run.py +++ b/cpp/test/Ice/services/run.py diff --git a/cpp/test/Ice/slicing/exceptions/AllTests.cpp b/cpp/test/Ice/slicing/exceptions/AllTests.cpp index 81b05dcb185..38a61807d31 100644 --- a/cpp/test/Ice/slicing/exceptions/AllTests.cpp +++ b/cpp/test/Ice/slicing/exceptions/AllTests.cpp @@ -371,7 +371,7 @@ class RelayI : public Relay TestIntfPrxPtr allTests(const Ice::CommunicatorPtr& communicator) { - Ice::ObjectPrxPtr obj = communicator->stringToProxy("Test:default -p 12010"); + Ice::ObjectPrxPtr obj = communicator->stringToProxy("Test:" + getTestEndpoint(communicator, 0)); TestIntfPrxPtr test = ICE_CHECKED_CAST(TestIntfPrx, obj); cout << "base... " << flush; @@ -1040,8 +1040,21 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "ok" << endl; cout << "preserved exceptions... " << flush; + string localOAEndpoint; { - Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("Relay", "default"); + ostringstream ostr; + if(communicator->getProperties()->getProperty("Ice.Default.Protocol") == "bt") + { + ostr << "default -a *"; + } + else + { + ostr << "default -h *"; + } + localOAEndpoint = ostr.str(); + } + { + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("Relay", localOAEndpoint); RelayPrxPtr relay = ICE_UNCHECKED_CAST(RelayPrx, adapter->addWithUUID(ICE_MAKE_SHARED(RelayI))); adapter->activate(); @@ -1059,6 +1072,11 @@ allTests(const Ice::CommunicatorPtr& communicator) catch(const Ice::OperationNotExistException&) { } + catch(const Ice::LocalException& ex) + { + cout << endl << "** OOPS" << endl << ex << endl; + test(false); + } catch(...) { test(false); diff --git a/cpp/test/Ice/slicing/exceptions/Client.cpp b/cpp/test/Ice/slicing/exceptions/Client.cpp index 2af061d744f..680872910b3 100644 --- a/cpp/test/Ice/slicing/exceptions/Client.cpp +++ b/cpp/test/Ice/slicing/exceptions/Client.cpp @@ -30,12 +30,18 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try { Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/slicing/exceptions", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { diff --git a/cpp/test/Ice/slicing/exceptions/Makefile b/cpp/test/Ice/slicing/exceptions/Makefile index ffda27ccbc3..27543a2717a 100644 --- a/cpp/test/Ice/slicing/exceptions/Makefile +++ b/cpp/test/Ice/slicing/exceptions/Makefile @@ -42,14 +42,16 @@ ICECPPFLAGS := -I. $(ICECPPFLAGS) CPPFLAGS := -I. -I../../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(SERVERAMD): $(SAMDOBJS) rm -f $@ - $(call mktest,$@,$(SAMDOBJS),$(LIBS)) + $(call mktest,$@,$(SAMDOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/slicing/exceptions/Makefile.mak b/cpp/test/Ice/slicing/exceptions/Makefile.mak index 78ee9040d09..b1dca2a15d7 100644 --- a/cpp/test/Ice/slicing/exceptions/Makefile.mak +++ b/cpp/test/Ice/slicing/exceptions/Makefile.mak @@ -45,6 +45,7 @@ OBJS = $(COBJS) \ ICECPPFLAGS = -I. $(ICECPPFLAGS) CPPFLAGS = -I. -I../../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) @@ -53,17 +54,17 @@ SAPDBFLAGS = /pdb:$(SERVERAMD:.exe=.pdb) !endif $(CLIENT): $(COBJS) - $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER): $(SOBJS) - $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVERAMD): $(SAMDOBJS) - $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/slicing/exceptions/Server.cpp b/cpp/test/Ice/slicing/exceptions/Server.cpp index c4050bfddab..231eaede42b 100644 --- a/cpp/test/Ice/slicing/exceptions/Server.cpp +++ b/cpp/test/Ice/slicing/exceptions/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); properties->setProperty("Ice.Warn.Dispatch", "0"); - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(TestI), communicator->stringToIdentity("Test")); adapter->activate(); diff --git a/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp b/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp index 74dac0ae3a8..35dec21d631 100644 --- a/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp +++ b/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); properties->setProperty("Ice.Warn.Dispatch", "0"); - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(TestI), communicator->stringToIdentity("Test")); adapter->activate(); diff --git a/cpp/test/Ice/slicing/exceptions/run.py b/cpp/test/Ice/slicing/exceptions/run.py index 526c93a88c2..5d1b83e01d8 100755 --- a/cpp/test/Ice/slicing/exceptions/run.py +++ b/cpp/test/Ice/slicing/exceptions/run.py @@ -20,17 +20,18 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="serveramd") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="serveramd") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="serveramd", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", + server="serveramd", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/slicing/objects/AllTests.cpp b/cpp/test/Ice/slicing/objects/AllTests.cpp index 44172e57669..516f255ce43 100644 --- a/cpp/test/Ice/slicing/objects/AllTests.cpp +++ b/cpp/test/Ice/slicing/objects/AllTests.cpp @@ -597,7 +597,7 @@ testUOO(const TestIntfPrxPtr& test) TestIntfPrxPtr allTests(const Ice::CommunicatorPtr& communicator) { - Ice::ObjectPrxPtr obj = communicator->stringToProxy("Test:default -p 12010"); + Ice::ObjectPrxPtr obj = communicator->stringToProxy("Test:" + getTestEndpoint(communicator, 0)); TestIntfPrxPtr test = ICE_CHECKED_CAST(TestIntfPrx, obj); cout << "base as Object... " << flush; diff --git a/cpp/test/Ice/slicing/objects/Client.cpp b/cpp/test/Ice/slicing/objects/Client.cpp index 0f444a7ff7a..d76b4a46845 100644 --- a/cpp/test/Ice/slicing/objects/Client.cpp +++ b/cpp/test/Ice/slicing/objects/Client.cpp @@ -30,6 +30,9 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif try @@ -42,7 +45,10 @@ main(int argc, char* argv[]) initData.properties->setProperty("Ice.CollectObjects", "1"); Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); - return run(argc, argv, ich.communicator()); + RemoteConfig rc("Ice/slicing/objects", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } catch(const Ice::Exception& ex) { diff --git a/cpp/test/Ice/slicing/objects/Makefile b/cpp/test/Ice/slicing/objects/Makefile index bce7b99450e..4ce5904187c 100644 --- a/cpp/test/Ice/slicing/objects/Makefile +++ b/cpp/test/Ice/slicing/objects/Makefile @@ -48,14 +48,16 @@ ICECPPFLAGS := -I. $(ICECPPFLAGS) CPPFLAGS := -I. -I../../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(SERVERAMD): $(SAMDOBJS) rm -f $@ - $(call mktest,$@,$(SAMDOBJS),$(LIBS)) + $(call mktest,$@,$(SAMDOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/slicing/objects/Makefile.mak b/cpp/test/Ice/slicing/objects/Makefile.mak index c708e09ff51..665eece100d 100644 --- a/cpp/test/Ice/slicing/objects/Makefile.mak +++ b/cpp/test/Ice/slicing/objects/Makefile.mak @@ -45,6 +45,7 @@ OBJS = $(COBJS) \ ICECPPFLAGS = -I. $(ICECPPFLAGS) CPPFLAGS = -I. -I../../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) @@ -53,17 +54,17 @@ SAPDBFLAGS = /pdb:$(SERVERAMD:.exe=.pdb) !endif $(CLIENT): $(COBJS) - $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER): $(SOBJS) - $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVERAMD): $(SAMDOBJS) - $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/slicing/objects/Server.cpp b/cpp/test/Ice/slicing/objects/Server.cpp index 48de66808d7..7adf4de9644 100644 --- a/cpp/test/Ice/slicing/objects/Server.cpp +++ b/cpp/test/Ice/slicing/objects/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); properties->setProperty("Ice.Warn.Dispatch", "0"); - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(TestI); adapter->add(object, communicator->stringToIdentity("Test")); diff --git a/cpp/test/Ice/slicing/objects/ServerAMD.cpp b/cpp/test/Ice/slicing/objects/ServerAMD.cpp index 7986c9091b6..3d570aac3e3 100644 --- a/cpp/test/Ice/slicing/objects/ServerAMD.cpp +++ b/cpp/test/Ice/slicing/objects/ServerAMD.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); properties->setProperty("Ice.Warn.Dispatch", "0"); - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(TestI); adapter->add(object, communicator->stringToIdentity("Test")); diff --git a/cpp/test/Ice/slicing/objects/run.py b/cpp/test/Ice/slicing/objects/run.py index 7e9990a8753..259f9e67acb 100755 --- a/cpp/test/Ice/slicing/objects/run.py +++ b/cpp/test/Ice/slicing/objects/run.py @@ -20,17 +20,18 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="serveramd") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="serveramd") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="serveramd", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", + server="serveramd", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/stringConverter/Client.cpp b/cpp/test/Ice/stringConverter/Client.cpp index e1e57d2e7ae..a9c77899608 100644 --- a/cpp/test/Ice/stringConverter/Client.cpp +++ b/cpp/test/Ice/stringConverter/Client.cpp @@ -95,8 +95,9 @@ main(int argc, char* argv[]) int Client::run(int, char*[]) { - Test::MyObjectPrxPtr proxy = ICE_UNCHECKED_CAST(Test::MyObjectPrx, - communicator()->stringToProxy("test:default -p 12010")); + Test::MyObjectPrxPtr proxy = + ICE_UNCHECKED_CAST(Test::MyObjectPrx, + communicator()->stringToProxy("test:" + getTestEndpoint(communicator(), 0))); char oe = char(0xBD); // A single character in ISO Latin 9 string msg = string("tu me fends le c") + oe + "ur!"; diff --git a/cpp/test/Ice/stringConverter/Makefile b/cpp/test/Ice/stringConverter/Makefile index 3482562c297..1a77bb2726e 100644 --- a/cpp/test/Ice/stringConverter/Makefile +++ b/cpp/test/Ice/stringConverter/Makefile @@ -27,7 +27,7 @@ OBJS = $(COBJS) \ include $(top_srcdir)/config/Make.rules -LINKWITH = $(LIBS) $(ICONV_LIBS) +LINKWITH = -lTestCommon $(LIBS) $(ICONV_LIBS) CPPFLAGS := -I. -I../../include $(CPPFLAGS) diff --git a/cpp/test/Ice/stringConverter/Makefile.mak b/cpp/test/Ice/stringConverter/Makefile.mak index 49e2aa4d304..a807550a7cc 100644 --- a/cpp/test/Ice/stringConverter/Makefile.mak +++ b/cpp/test/Ice/stringConverter/Makefile.mak @@ -28,6 +28,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -35,12 +36,12 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(CLIENT): $(COBJS) - $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBNAME) $(LIBS) + $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBNAME) $(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER): $(SOBJS) - $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBNAME) $(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBNAME) $(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/stringConverter/Server.cpp b/cpp/test/Ice/stringConverter/Server.cpp index 225c54f8f48..0607a4f2d17 100644 --- a/cpp/test/Ice/stringConverter/Server.cpp +++ b/cpp/test/Ice/stringConverter/Server.cpp @@ -50,7 +50,7 @@ public: int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp -p 12010"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(MyObjectI), communicator->stringToIdentity("test")); adapter->activate(); diff --git a/cpp/test/Ice/stringConverter/run.py b/cpp/test/Ice/stringConverter/run.py index ce8c5dd4b18..c1eec8b731d 100755 --- a/cpp/test/Ice/stringConverter/run.py +++ b/cpp/test/Ice/stringConverter/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/threadPoolPriority/AllTests.cpp b/cpp/test/Ice/threadPoolPriority/AllTests.cpp index f610fec2a21..d7750250cbf 100644 --- a/cpp/test/Ice/threadPoolPriority/AllTests.cpp +++ b/cpp/test/Ice/threadPoolPriority/AllTests.cpp @@ -19,7 +19,7 @@ Test::PriorityPrxPtr allTests(const Ice::CommunicatorPtr& communicator) { cout << "testing server priority... " << flush; - string ref = "test:default -p 12010 -t 10000"; + string ref = "test:" + getTestEndpoint(communicator, 0) + " -t 10000"; Ice::ObjectPrxPtr base = communicator->stringToProxy(ref); test(base); diff --git a/cpp/test/Ice/threadPoolPriority/Makefile b/cpp/test/Ice/threadPoolPriority/Makefile index 0043c4a323a..d8f3369fc55 100644 --- a/cpp/test/Ice/threadPoolPriority/Makefile +++ b/cpp/test/Ice/threadPoolPriority/Makefile @@ -37,14 +37,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) $(SERVERCUSTOM): $(SCOBJS) rm -f $@ - $(call mktest,$@,$(SCOBJS),$(LIBS)) + $(call mktest,$@,$(SCOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/threadPoolPriority/Makefile.mak b/cpp/test/Ice/threadPoolPriority/Makefile.mak index c7251b62f0d..2d6868798c8 100644 --- a/cpp/test/Ice/threadPoolPriority/Makefile.mak +++ b/cpp/test/Ice/threadPoolPriority/Makefile.mak @@ -36,6 +36,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) @@ -44,17 +45,17 @@ SCPDBFLAGS = /pdb:$(SERVERCUSTOM:.exe=.pdb) !endif $(CLIENT): $(COBJS) - $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER): $(SOBJS) - $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVERCUSTOM): $(SCOBJS) - $(LINK) $(LD_EXEFLAGS) $(SCPDBFLAGS) $(SETARGV) $(SCOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_EXEFLAGS) $(SCPDBFLAGS) $(SETARGV) $(SCOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/threadPoolPriority/Server.cpp b/cpp/test/Ice/threadPoolPriority/Server.cpp index 99bade06865..4986a1a2834 100644 --- a/cpp/test/Ice/threadPoolPriority/Server.cpp +++ b/cpp/test/Ice/threadPoolPriority/Server.cpp @@ -17,7 +17,8 @@ int run(int, char**, const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", + getTestEndpoint(communicator, 0) + " -t 10000:udp"); // // First try to use an invalid priority. diff --git a/cpp/test/Ice/threadPoolPriority/ServerCustomThreadPool.cpp b/cpp/test/Ice/threadPoolPriority/ServerCustomThreadPool.cpp index 09712e14add..fc355d75d0d 100644 --- a/cpp/test/Ice/threadPoolPriority/ServerCustomThreadPool.cpp +++ b/cpp/test/Ice/threadPoolPriority/ServerCustomThreadPool.cpp @@ -18,7 +18,8 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); properties->setProperty("Ice.Warn.Dispatch", "0"); - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", + getTestEndpoint(communicator, 0) + " -t 10000:udp"); communicator->getProperties()->setProperty("TestAdapter.ThreadPool.Size", "1"); // diff --git a/cpp/test/Ice/threadPoolPriority/run.py b/cpp/test/Ice/threadPoolPriority/run.py index 67a56bb220d..4a6cdf89445 100755 --- a/cpp/test/Ice/threadPoolPriority/run.py +++ b/cpp/test/Ice/threadPoolPriority/run.py @@ -20,7 +20,7 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests default server thread pool.") -TestUtil.clientServerTest() -print("tests custom server thread pool.") -TestUtil.clientServerTest(server = "servercustom") +TestUtil.queueClientServerTest(message = "Running test with default server thread pool.") +TestUtil.queueClientServerTest(configName = "custom", message = "Running test with custom server thread pool.", + server = "servercustom") +TestUtil.runQueuedTests() diff --git a/cpp/test/Ice/timeout/AllTests.cpp b/cpp/test/Ice/timeout/AllTests.cpp index 3d46840742d..7bfaa76b00f 100644 --- a/cpp/test/Ice/timeout/AllTests.cpp +++ b/cpp/test/Ice/timeout/AllTests.cpp @@ -83,7 +83,7 @@ typedef IceUtil::Handle<Callback> CallbackPtr; TimeoutPrxPtr allTests(const Ice::CommunicatorPtr& communicator) { - string sref = "timeout:default -p 12010"; + string sref = "timeout:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr obj = communicator->stringToProxy(sref); test(obj); diff --git a/cpp/test/Ice/timeout/Makefile b/cpp/test/Ice/timeout/Makefile index 8645ffcfafe..06612cb534b 100644 --- a/cpp/test/Ice/timeout/Makefile +++ b/cpp/test/Ice/timeout/Makefile @@ -32,10 +32,12 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) +LINKWITH := -lTestCommon $(LIBS) + $(CLIENT): $(COBJS) rm -f $@ - $(call mktest,$@,$(COBJS),$(LIBS)) + $(call mktest,$@,$(COBJS),$(LINKWITH)) $(SERVER): $(SOBJS) rm -f $@ - $(call mktest,$@,$(SOBJS),$(LIBS)) + $(call mktest,$@,$(SOBJS),$(LINKWITH)) diff --git a/cpp/test/Ice/timeout/Makefile.mak b/cpp/test/Ice/timeout/Makefile.mak index ed6be9201ec..12f159ea365 100644 --- a/cpp/test/Ice/timeout/Makefile.mak +++ b/cpp/test/Ice/timeout/Makefile.mak @@ -41,6 +41,7 @@ OBJS = $(COBJS) \ !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS) !if "$(GENERATE_PDB)" == "yes" CPDBFLAGS = /pdb:$(CLIENT).pdb @@ -48,12 +49,12 @@ SPDBFLAGS = /pdb:$(SERVER).pdb !endif $(CLIENT)$(EXT): $(COBJS) - $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest $(SERVER)$(EXT): $(SOBJS) - $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/test/Ice/timeout/Server.cpp b/cpp/test/Ice/timeout/Server.cpp index ba693d08d39..a5b6e8c8d77 100644 --- a/cpp/test/Ice/timeout/Server.cpp +++ b/cpp/test/Ice/timeout/Server.cpp @@ -18,7 +18,7 @@ using namespace std; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(TimeoutI); adapter->add(object, communicator->stringToIdentity("timeout")); diff --git a/cpp/test/Ice/timeout/run.py b/cpp/test/Ice/timeout/run.py index ce8c5dd4b18..c1eec8b731d 100755 --- a/cpp/test/Ice/timeout/run.py +++ b/cpp/test/Ice/timeout/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/cpp/test/Makefile b/cpp/test/Makefile index ae9994a3c45..791d209ab7a 100644 --- a/cpp/test/Makefile +++ b/cpp/test/Makefile @@ -17,7 +17,8 @@ SUBDIRS = IceUtil \ else -SUBDIRS = IceUtil \ +SUBDIRS = Common \ + IceUtil \ Slice \ Ice \ IceSSL \ diff --git a/cpp/test/Makefile.mak b/cpp/test/Makefile.mak index 650f43b2528..ace4d3a2953 100644 --- a/cpp/test/Makefile.mak +++ b/cpp/test/Makefile.mak @@ -13,7 +13,8 @@ top_srcdir = .. !if "$(WINRT)" == "yes" -SUBDIRS = Ice +SUBDIRS = Common \ + Ice !elseif "$(CPP11_MAPPING)" == "yes" SUBDIRS = IceUtil \ @@ -22,12 +23,14 @@ SUBDIRS = IceUtil \ !elseif "$(CPP_COMPILER)" == "VC100" SUBDIRS = IceUtil \ Slice \ + Common \ Ice \ IceSSL \ IceDiscovery !else SUBDIRS = IceUtil \ Slice \ + Common \ Ice \ IceSSL \ Glacier2 \ diff --git a/cpp/test/TestSuite/Controller.ice b/cpp/test/TestSuite/Controller.ice index 7e4c2b95eda..5178df68660 100644 --- a/cpp/test/TestSuite/Controller.ice +++ b/cpp/test/TestSuite/Controller.ice @@ -29,7 +29,8 @@ sequence<string> StringSeq; interface Controller { - Server* runServer(string lang, string name, string protocol, string host, bool winrt, StringSeq options); + Server* runServer(string lang, string name, string protocol, string host, bool winrt, string configName, + StringSeq options); }; }; diff --git a/cpp/test/TestSuite/MainPage.xaml.cpp b/cpp/test/TestSuite/MainPage.xaml.cpp index cabd8733ad2..13ae68006a6 100755 --- a/cpp/test/TestSuite/MainPage.xaml.cpp +++ b/cpp/test/TestSuite/MainPage.xaml.cpp @@ -98,10 +98,10 @@ static const string noIPv6[] = }; void -addConfiguration(const TestCasePtr& test, const string& name, const vector<string>& options = vector<string>(), - const vector<string>& languages = vector<string>()) +addConfiguration(const TestCasePtr& test, const string& desc, const string& configName, bool localOnly, + const vector<string>& options = vector<string>(), const vector<string>& languages = vector<string>()) { - TestConfigurationPtr configuration(new TestConfiguration(name, options, languages)); + TestConfigurationPtr configuration(new TestConfiguration(desc, configName, localOnly, options, languages)); test->configurations.push_back(configuration); } @@ -125,12 +125,12 @@ vector<TestCasePtr> allTest(bool remoteserver) all.push_back(test); test.reset(new TestCase("Ice", "exceptions", "client.dll", "server.dll", "serveramd.dll", "collocated.dll")); - addConfiguration(test, "compact (default) format"); - addConfiguration(test, "sliced format", { "--Ice.Default.SlicedFormat" }); - addConfiguration(test, "1.0 encoding", { "--Ice.Default.EncodingVersion=1.0" }); - addConfiguration(test, "compact (default) format and AMD server"); - addConfiguration(test, "sliced format and AMD server", { "--Ice.Default.SlicedFormat" }); - addConfiguration(test, "1.0 encoding and AMD server", { "--Ice.Default.EncodingVersion=1.0" }); + addConfiguration(test, "compact (default) format", "compact"); + addConfiguration(test, "sliced format", "sliced", false, { "--Ice.Default.SlicedFormat" }); + addConfiguration(test, "1.0 encoding", "1.0", false, { "--Ice.Default.EncodingVersion=1.0" }); + addConfiguration(test, "compact (default) format and AMD server", "", true); + addConfiguration(test, "sliced format and AMD server", "", true, { "--Ice.Default.SlicedFormat" }); + addConfiguration(test, "1.0 encoding and AMD server", "", true, { "--Ice.Default.EncodingVersion=1.0" }); all.push_back(test); test.reset(new TestCase("Ice", "facets", "client.dll", "server.dll", "", "collocated.dll")); @@ -146,31 +146,31 @@ vector<TestCasePtr> allTest(bool remoteserver) all.push_back(test); test.reset(new TestCase("Ice", "invoke", "client.dll", "server.dll")); - addConfiguration(test, "Blobject server", {}, { "cpp", "java", "csharp" }); - addConfiguration(test, "BlobjectArray server", {}, { "cpp" }); - addConfiguration(test, "BlobjectAsync server", {}, { "cpp", "java", "csharp" }); - addConfiguration(test, "BlobjectAsyncArray server", {}, { "cpp" }); + addConfiguration(test, "Blobject server", "blobject", false, {}, { "cpp", "java", "csharp" }); + addConfiguration(test, "BlobjectArray server", "blobjectArray", false, {}, { "cpp" }); + addConfiguration(test, "BlobjectAsync server", "blobjectAsync", false, {}, { "cpp", "java", "csharp" }); + addConfiguration(test, "BlobjectAsyncArray server", "blobjectAsyncArray", false, {}, { "cpp" }); all.push_back(test); test.reset(new TestCase("Ice", "location", "client.dll", "server.dll")); all.push_back(test); test.reset(new TestCase("Ice", "objects", "client.dll", "server.dll", "", "collocated.dll")); - addConfiguration(test, "compact (default) format"); - addConfiguration(test, "sliced format", { "--Ice.Default.SlicedFormat" }); - addConfiguration(test, "1.0 encoding", { "--Ice.Default.EncodingVersion=1.0" }); + addConfiguration(test, "compact (default) format", "compact"); + addConfiguration(test, "sliced format", "sliced", false, { "--Ice.Default.SlicedFormat" }); + addConfiguration(test, "1.0 encoding", "1.0", false, { "--Ice.Default.EncodingVersion=1.0" }); all.push_back(test); test.reset(new TestCase("Ice", "operations", "client.dll", "server.dll", "serveramd.dll", "collocated.dll")); addConfiguration(test, "regular server"); - addConfiguration(test, "AMD server"); - addConfiguration(test, "TIE server", {}, {"java", "csharp"}); - addConfiguration(test, "AMD TIE server", {}, { "java", "csharp" }); + addConfiguration(test, "AMD server", "", true); + addConfiguration(test, "TIE server", "", true, {}, {"java", "csharp"}); + addConfiguration(test, "AMD TIE server", "", true, {}, { "java", "csharp" }); all.push_back(test); test.reset(new TestCase("Ice", "proxy", "client.dll", "server.dll", "serveramd.dll", "collocated.dll")); addConfiguration(test, "regular server"); - addConfiguration(test, "AMD server"); + addConfiguration(test, "AMD server", "", true); all.push_back(test); test.reset(new TestCase("Ice", "retry", "client.dll", "server.dll")); @@ -201,17 +201,17 @@ vector<TestCasePtr> allTest(bool remoteserver) } test.reset(new TestCase("Ice", "optional", "client.dll", "server.dll")); - addConfiguration(test, "compact (default) format"); - addConfiguration(test, "sliced format", { "--Ice.Default.SlicedFormat" }); - addConfiguration(test, "AMD server"); + addConfiguration(test, "compact (default) format", "compact"); + addConfiguration(test, "sliced format", "sliced", false, { "--Ice.Default.SlicedFormat" }); + addConfiguration(test, "AMD server", "", true); all.push_back(test); test.reset(new TestCase("Ice", "admin", "client.dll", "server.dll")); all.push_back(test); test.reset(new TestCase("Ice", "enums", "client.dll", "server.dll")); - addConfiguration(test, "1.0 encoding", { "--Ice.Default.EncodingVersion=1.0" }); - addConfiguration(test, "1.1 encoding"); + addConfiguration(test, "1.0 encoding", "1.0", false, { "--Ice.Default.EncodingVersion=1.0" }); + addConfiguration(test, "1.1 encoding", "1.1"); all.push_back(test); @@ -225,7 +225,7 @@ class Runnable : public IceUtil::Thread, public Test::MainHelper { public: - Runnable(const TestRunnerPtr&, const string&, DllCache&, const TestConfig&, + Runnable(const TestRunnerPtr&, const string&, DllCache&, const TestConfig&, const vector<string>& options = vector<string>()); virtual ~Runnable(); @@ -243,7 +243,7 @@ private: void completed(int); IceUtil::Monitor<IceUtil::Mutex> _monitor; - TestRunnerPtr _runner; + TestRunnerPtr _runner; string _test; TestConfig _config; bool _started; @@ -261,14 +261,14 @@ class TestRunner : public IceUtil::Thread public: TestRunner(const std::shared_ptr<TestCase>&, const TestConfig&, MainPage^, - const Ice::CommunicatorPtr&, DllCache&); + const Ice::CommunicatorPtr&, DllCache&); virtual void run(); void runClientServerTest(const string&, const string&); void runClientServerTestWithRemoteServer(const string&); void runClientTest(const string&, bool); - void printToConsoleOutput(const std::string&); - void printLineToConsoleOutput(const std::string&); + void printToConsoleOutput(const std::string&); + void printLineToConsoleOutput(const std::string&); private: @@ -281,7 +281,7 @@ private: Runnable::Runnable(const TestRunnerPtr& runner, const string& test, DllCache& dlls, const TestConfig& config, const vector<string>& options) : - _runner(runner), + _runner(runner), _test(test), _config(config), _started(false), @@ -299,7 +299,7 @@ Runnable::~Runnable() void Runnable::run() { - HINSTANCE hnd = _dlls.loadDll(_test); + HINSTANCE hnd = _dlls.loadDll(_test); if(hnd == 0) { ostringstream os; @@ -312,7 +312,7 @@ Runnable::run() _dllTestShutdown = GetProcAddress(hnd, "dllTestShutdown"); if(_dllTestShutdown == 0) { - _runner->printLineToConsoleOutput("failed to find dllTestShutdown function from `" + _test + "'"); + _runner->printLineToConsoleOutput("failed to find dllTestShutdown function from `" + _test + "'"); completed(-1); return; } @@ -320,7 +320,7 @@ Runnable::run() FARPROC dllMain = GetProcAddress(hnd, "dllMain"); if(dllMain == 0) { - _runner->printLineToConsoleOutput("failed to find dllMain function from `" + _test + "'"); + _runner->printLineToConsoleOutput("failed to find dllMain function from `" + _test + "'"); completed(-1); return; } @@ -352,7 +352,7 @@ Runnable::run() { args.push_back("--Ice.ThreadPool.Server.Size=1"); args.push_back("--Ice.ThreadPool.Server.SizeMax=3"); - args.push_back("--Ice.ThreadPool.Server.SizeWarn=0"); + args.push_back("--Ice.ThreadPool.Server.SizeWarn=0"); } args.push_back("--Ice.Default.Host=" + _config.host); @@ -445,7 +445,7 @@ Runnable::redirect() void Runnable::print(const string& message) { - _runner->printToConsoleOutput(message); + _runner->printToConsoleOutput(message); } int @@ -465,7 +465,7 @@ Runnable::completed(int status) } TestRunner::TestRunner(const TestCasePtr& test, const TestConfig& config, MainPage^ page, - const Ice::CommunicatorPtr& communicator, DllCache& dlls) : + const Ice::CommunicatorPtr& communicator, DllCache& dlls) : _test(test), _config(config), _page(page), @@ -477,26 +477,26 @@ TestRunner::TestRunner(const TestCasePtr& test, const TestConfig& config, MainPa void TestRunner::printToConsoleOutput(const std::string& message) { - vector<string> lines; - string::size_type pos = 0; - string data = message; - while((pos = data.find("\n")) != string::npos) - { - lines.push_back(data.substr(0, pos)); - data = data.substr(pos + 1); - } - lines.push_back(data); - - for(vector<string>::const_iterator i = lines.begin(); i != lines.end(); ++i) - { - _page->printToConsoleOutput(ref new String(IceUtil::stringToWstring(*i).c_str()), i != lines.begin()); - } + vector<string> lines; + string::size_type pos = 0; + string data = message; + while((pos = data.find("\n")) != string::npos) + { + lines.push_back(data.substr(0, pos)); + data = data.substr(pos + 1); + } + lines.push_back(data); + + for(vector<string>::const_iterator i = lines.begin(); i != lines.end(); ++i) + { + _page->printToConsoleOutput(ref new String(IceUtil::stringToWstring(*i).c_str()), i != lines.begin()); + } } void TestRunner::printLineToConsoleOutput(const std::string& msg) { - printToConsoleOutput(msg + '\n'); + printToConsoleOutput(msg + '\n'); } void @@ -563,10 +563,10 @@ TestRunner::run() { _page->failed(ex->Message); } - catch (Test::Common::ServerFailedException& ex) - { - _page->failed(ref new String(IceUtil::stringToWstring("Server failed to start:\n\n" + ex.reason).c_str())); - } + catch (Test::Common::ServerFailedException& ex) + { + _page->failed(ref new String(IceUtil::stringToWstring("Server failed to start:\n\n" + ex.reason).c_str())); + } catch(const std::exception& ex) { _page->failed(ref new String(IceUtil::stringToWstring(ex.what()).c_str())); @@ -594,7 +594,7 @@ TestRunner::runClientServerTest(const string& server, const string& client) TestConfig cltConfig = _config; cltConfig.type = TestConfigTypeClient; - RunnablePtr clientRunable = new Runnable(this, _test->prefix + client, _dlls, cltConfig); + RunnablePtr clientRunable = new Runnable(this, _test->prefix + client, _dlls, cltConfig); clientRunable->start(); clientRunable->getThreadControl().detach(); @@ -645,7 +645,6 @@ createProxy(const string id, TestConfig config) void TestRunner::runClientServerTestWithRemoteServer(const string& client) { - RunnablePtr serverRunable; ControllerPrx controller = ControllerPrx::uncheckedCast( _communicator->stringToProxy(createProxy("controller", _config))); StringSeq options; @@ -666,12 +665,6 @@ TestRunner::runClientServerTestWithRemoteServer(const string& client) options.push_back("Ice.IPv6=0"); } - ServerPrx server = - controller->runServer(_config.server, _test->name, _config.protocol, _config.host, true, options); - - server = ServerPrx::uncheckedCast( - _communicator->stringToProxy(createProxy(server->ice_getIdentity().name, _config))); - vector<TestConfigurationPtr> configurations; if(_test->configurations.empty()) { @@ -683,10 +676,10 @@ TestRunner::runClientServerTestWithRemoteServer(const string& client) configurations = _test->configurations; } - for(vector<TestConfigurationPtr>::const_iterator i = configurations.begin(); - i != configurations.end(); ++i) + for(vector<TestConfigurationPtr>::const_iterator i = configurations.begin(); i != configurations.end(); ++i) { TestConfigurationPtr configuration = *i; + if(!configuration->languages.empty() && find(configuration->languages.begin(), configuration->languages.end(), _config.server) == configuration->languages.end()) @@ -694,13 +687,27 @@ TestRunner::runClientServerTestWithRemoteServer(const string& client) continue; } - printLineToConsoleOutput("*** Running test with " + - (configuration->name.empty() ? "regular server" : configuration->name)); + const string desc = configuration->desc.empty() ? "default configuration" : configuration->desc; + + if(configuration->localOnly) + { + printLineToConsoleOutput("*** Skipping remote test with " + desc); + continue; + } + + RunnablePtr serverRunable; + ServerPrx server = controller->runServer(_config.server, _test->name, _config.protocol, _config.host, true, + configuration->configName, options); + + server = ServerPrx::uncheckedCast( + _communicator->stringToProxy(createProxy(server->ice_getIdentity().name, _config))); + + printLineToConsoleOutput("*** Running test with " + desc); server->waitForServer(); TestConfig cltConfig = _config; cltConfig.type = TestConfigTypeClient; - RunnablePtr runnable = new Runnable(this, _test->prefix + client, _dlls, cltConfig, configuration->options); + RunnablePtr runnable = new Runnable(this, _test->prefix + client, _dlls, cltConfig, configuration->options); runnable->start(); runnable->getThreadControl().detach(); @@ -730,7 +737,7 @@ TestRunner::runClientTest(const string& client, bool collocated) { TestConfig cltConfig = _config; cltConfig.type = collocated ? TestConfigTypeColloc : TestConfigTypeClient; - RunnablePtr clientRunable = new Runnable(this, _test->prefix + client, _dlls, cltConfig); + RunnablePtr clientRunable = new Runnable(this, _test->prefix + client, _dlls, cltConfig); clientRunable->start(); clientRunable->getThreadControl().detach(); clientRunable->waitForCompleted(); @@ -738,9 +745,11 @@ TestRunner::runClientTest(const string& client, bool collocated) } -TestConfiguration::TestConfiguration(const string& name, const vector<string>& options, - const vector<string>& languages) : - name(name), +TestConfiguration::TestConfiguration(const string& desc, const string& configName, bool localOnly, + const vector<string>& options, const vector<string>& languages) : + desc(desc), + configName(configName), + localOnly(localOnly), options(options), languages(languages) { @@ -818,7 +827,7 @@ MainPage::Configuration_Loaded(Platform::Object^ sender, Windows::UI::Xaml::Rout _ipv6 = findChild<CheckBox>(this, "IPv6"); _run = findChild<Button>(this, "Run"); _stop = findChild<Button>(this, "Stop"); - _stop->IsEnabled = false; + _stop->IsEnabled = false; initializeSupportedProtocols(); initializeSupportedTests(); @@ -833,9 +842,9 @@ MainPage::OnNavigatedTo(NavigationEventArgs^ e) void MainPage::failed(String^ msg) { - printToConsoleOutput(ref new String(L"Test failed"), false); - printToConsoleOutput(msg, true); - completed(); + printToConsoleOutput(ref new String(L"Test failed"), false); + printToConsoleOutput(msg, true); + completed(); } void @@ -999,27 +1008,27 @@ TestSuite::MainPage::Language_SelectionChanged(Platform::Object^ sender, Selecti void TestSuite::MainPage::printToConsoleOutput(String^ message, bool newline) { - _output->Dispatcher->RunAsync(CoreDispatcherPriority::Normal, ref new DispatchedHandler( - [=]() - { - if(newline) - { - _messages->Append(ref new String(L"")); - } - - if(_messages->Size > 0) - { - String^ item = _messages->GetAt(_messages->Size - 1); - wstring s(item->Data()); - s += wstring(message->Data()); - _messages->SetAt(_messages->Size - 1, ref new String(s.c_str())); - } - else - { - _messages->Append(message); - } - - _output->SelectedIndex = _messages->Size - 1; - _output->ScrollIntoView(_output->SelectedItem); - }, CallbackContext::Any)); + _output->Dispatcher->RunAsync(CoreDispatcherPriority::Normal, ref new DispatchedHandler( + [=]() + { + if(newline) + { + _messages->Append(ref new String(L"")); + } + + if(_messages->Size > 0) + { + String^ item = _messages->GetAt(_messages->Size - 1); + wstring s(item->Data()); + s += wstring(message->Data()); + _messages->SetAt(_messages->Size - 1, ref new String(s.c_str())); + } + else + { + _messages->Append(message); + } + + _output->SelectedIndex = _messages->Size - 1; + _output->ScrollIntoView(_output->SelectedItem); + }, CallbackContext::Any)); } diff --git a/cpp/test/TestSuite/MainPage.xaml.h b/cpp/test/TestSuite/MainPage.xaml.h index c9106044271..fc113d87f9f 100644 --- a/cpp/test/TestSuite/MainPage.xaml.h +++ b/cpp/test/TestSuite/MainPage.xaml.h @@ -21,11 +21,15 @@ namespace TestSuite struct TestConfiguration { - TestConfiguration(const std::string& name = "", + TestConfiguration(const std::string& desc = "", + const std::string& configName = "", + bool localOnly = false, const std::vector<std::string>& options = std::vector<std::string>(), const std::vector<std::string>& languages = std::vector<std::string>()); - const std::string name; + const std::string desc; + const std::string configName; + const bool localOnly; const std::vector<std::string> options; const std::vector<std::string> languages; }; diff --git a/cpp/test/include/.gitignore b/cpp/test/include/.gitignore new file mode 100644 index 00000000000..05cdd03c294 --- /dev/null +++ b/cpp/test/include/.gitignore @@ -0,0 +1,4 @@ +// Generated by makegitignore.py + +// IMPORTANT: Do not edit this file -- any edits made here will be lost! +Controller.h diff --git a/cpp/test/include/TestCommon.h b/cpp/test/include/TestCommon.h index 1a6261ee080..d5b2585c627 100644 --- a/cpp/test/include/TestCommon.h +++ b/cpp/test/include/TestCommon.h @@ -10,7 +10,8 @@ #ifndef TEST_COMMON_H #define TEST_COMMON_H -#include <IceUtil/IceUtil.h> +#include <Ice/CommunicatorF.h> +#include <Ice/ProxyF.h> #ifdef ICE_CPP11_MAPPING # define ICE_IN(T) T @@ -24,6 +25,18 @@ # include <Ice/LocalException.h> #endif +#include <IceUtil/IceUtil.h> + +#ifndef TEST_API +# ifdef TEST_API_EXPORTS +# define TEST_API ICE_DECLSPEC_EXPORT +# elif defined(ICE_STATIC_LIBS) +# define TEST_API /**/ +# else +# define TEST_API ICE_DECLSPEC_IMPORT +# endif +#endif + void inline print(const std::string& msg) { @@ -36,6 +49,24 @@ inline println(const std::string& msg) std::cout << msg << std::endl; } +TEST_API std::string getTestEndpoint(const Ice::CommunicatorPtr&, int, const std::string = std::string()); + +class TEST_API RemoteConfig +{ +public: + + RemoteConfig(const std::string&, int, char**, const Ice::CommunicatorPtr&); + ~RemoteConfig(); + + bool isRemote() const; + void finished(int); + +private: + + Ice::ObjectPrxPtr _server; + int _status; +}; + #if !defined(ICE_OS_WINRT) && (TARGET_OS_IPHONE == 0) void diff --git a/csharp/src/Ice/PropertyNames.cs b/csharp/src/Ice/PropertyNames.cs index 2f0d8797791..36655fb0e34 100644 --- a/csharp/src/Ice/PropertyNames.cs +++ b/csharp/src/Ice/PropertyNames.cs @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Nov 9 08:34:24 2015 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Nov 24 08:50:30 2015 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -1021,7 +1021,6 @@ namespace IceInternal public static Property[] IceBTProps = { - new Property(@"^IceBT\.DefaultAddress$", false, null), new Property(@"^IceBT\.RcvSize$", false, null), new Property(@"^IceBT\.SndSize$", false, null), null diff --git a/csharp/test/Ice/acm/run.py b/csharp/test/Ice/acm/run.py index 3f2e91f0009..5c9bb399cb3 100755 --- a/csharp/test/Ice/acm/run.py +++ b/csharp/test/Ice/acm/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/adapterDeactivation/run.py b/csharp/test/Ice/adapterDeactivation/run.py index ac7bc7f799e..5eabdba41f2 100755 --- a/csharp/test/Ice/adapterDeactivation/run.py +++ b/csharp/test/Ice/adapterDeactivation/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/admin/run.py b/csharp/test/Ice/admin/run.py index 74d2e5d1724..aeb71ef588e 100755 --- a/csharp/test/Ice/admin/run.py +++ b/csharp/test/Ice/admin/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/ami/run.py b/csharp/test/Ice/ami/run.py index 73dc16e6fc7..5eabdba41f2 100755 --- a/csharp/test/Ice/ami/run.py +++ b/csharp/test/Ice/ami/run.py @@ -20,7 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/background/run.py b/csharp/test/Ice/background/run.py index 3f2e91f0009..5c9bb399cb3 100755 --- a/csharp/test/Ice/background/run.py +++ b/csharp/test/Ice/background/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/binding/run.py b/csharp/test/Ice/binding/run.py index 3f2e91f0009..5c9bb399cb3 100755 --- a/csharp/test/Ice/binding/run.py +++ b/csharp/test/Ice/binding/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/checksum/run.py b/csharp/test/Ice/checksum/run.py index c47b07bcb45..e852e8a9605 100755 --- a/csharp/test/Ice/checksum/run.py +++ b/csharp/test/Ice/checksum/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest(server = os.path.join(os.getcwd(), "server", "server")) +TestUtil.queueClientServerTest(server = os.path.join(os.getcwd(), "server", "server")) +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/dictMapping/run.py b/csharp/test/Ice/dictMapping/run.py index eec082f03e5..d25963849a4 100755 --- a/csharp/test/Ice/dictMapping/run.py +++ b/csharp/test/Ice/dictMapping/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/dispatcher/run.py b/csharp/test/Ice/dispatcher/run.py index 8f5fa2b1152..5eabdba41f2 100755 --- a/csharp/test/Ice/dispatcher/run.py +++ b/csharp/test/Ice/dispatcher/run.py @@ -20,8 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() - +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/enums/run.py b/csharp/test/Ice/enums/run.py index 614bfe363bf..e53c6cc89a3 100755 --- a/csharp/test/Ice/enums/run.py +++ b/csharp/test/Ice/enums/run.py @@ -20,9 +20,9 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with 1.1 encoding.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "1.1", message = "Running test with 1.1 encoding.") +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/exceptions/run.py b/csharp/test/Ice/exceptions/run.py index 57808be6caf..608504d18da 100755 --- a/csharp/test/Ice/exceptions/run.py +++ b/csharp/test/Ice/exceptions/run.py @@ -20,29 +20,31 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() - -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") - -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") - -print("Running test with compact (default) format and AMD server.") -TestUtil.clientServerTest(server="serveramd") - -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="serveramd", - additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") - -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="serveramd", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") - -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") + +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") + +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") + +TestUtil.queueClientServerTest(configName = "compactAMD", localOnly = True, + message = "Running test with compact (default) format and AMD server.", + server="serveramd") + +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", + server="serveramd", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") + +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", + server="serveramd", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") + +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/facets/run.py b/csharp/test/Ice/facets/run.py index ac7bc7f799e..5eabdba41f2 100755 --- a/csharp/test/Ice/facets/run.py +++ b/csharp/test/Ice/facets/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/hash/run.py b/csharp/test/Ice/hash/run.py index 1b4279c449b..3a9fbc10e17 100755 --- a/csharp/test/Ice/hash/run.py +++ b/csharp/test/Ice/hash/run.py @@ -21,4 +21,3 @@ sys.path.append(os.path.join(path[0], "scripts")) import TestUtil TestUtil.simpleTest() - diff --git a/csharp/test/Ice/hold/run.py b/csharp/test/Ice/hold/run.py index 3f2e91f0009..5c9bb399cb3 100755 --- a/csharp/test/Ice/hold/run.py +++ b/csharp/test/Ice/hold/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/info/run.py b/csharp/test/Ice/info/run.py index 74d2e5d1724..aeb71ef588e 100755 --- a/csharp/test/Ice/info/run.py +++ b/csharp/test/Ice/info/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/inheritance/run.py b/csharp/test/Ice/inheritance/run.py index ac7bc7f799e..5eabdba41f2 100755 --- a/csharp/test/Ice/inheritance/run.py +++ b/csharp/test/Ice/inheritance/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/invoke/run.py b/csharp/test/Ice/invoke/run.py index e3172b537ae..cee6489ddad 100755 --- a/csharp/test/Ice/invoke/run.py +++ b/csharp/test/Ice/invoke/run.py @@ -20,8 +20,7 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with Blobject server.") -TestUtil.clientServerTest() - -print("tests with BlobjectAsync server.") -TestUtil.clientServerTest(additionalServerOptions = "--async") +TestUtil.queueClientServerTest(configName = "blobject", message = "Running test with Blobject server.") +TestUtil.queueClientServerTest(configName = "blobjectAsync", message = "Running test with BlobjectAsync server.", + additionalServerOptions = "--async") +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/location/run.py b/csharp/test/Ice/location/run.py index 3f2e91f0009..5c9bb399cb3 100755 --- a/csharp/test/Ice/location/run.py +++ b/csharp/test/Ice/location/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/metrics/run.py b/csharp/test/Ice/metrics/run.py index eadac777a2c..67e01ac5bbd 100755 --- a/csharp/test/Ice/metrics/run.py +++ b/csharp/test/Ice/metrics/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server = "serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server = "serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/objects/run.py b/csharp/test/Ice/objects/run.py index bad83a5b610..b435bbdbdcf 100755 --- a/csharp/test/Ice/objects/run.py +++ b/csharp/test/Ice/objects/run.py @@ -20,16 +20,15 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/operations/run.py b/csharp/test/Ice/operations/run.py index 08eda9b1ee1..d81e4ead8b8 100755 --- a/csharp/test/Ice/operations/run.py +++ b/csharp/test/Ice/operations/run.py @@ -20,13 +20,12 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0") -print("tests with AMD server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0", server="serveramd") -print("tests with TIE server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0", server="servertie") -print("tests with AMD TIE server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0", server="serveramdtie") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0") +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + additionalClientOptions = "--Ice.Warn.AMICallback=0", server="serveramd") +TestUtil.queueClientServerTest(configName = "tie", message = "Running test with TIE server.", + additionalClientOptions = "--Ice.Warn.AMICallback=0", server="servertie") +TestUtil.queueClientServerTest(configName = "amdTie", localOnly = True, message = "Running test with AMD TIE server.", + additionalClientOptions = "--Ice.Warn.AMICallback=0", server="serveramdtie") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/optional/run.py b/csharp/test/Ice/optional/run.py index 95214f14a11..0800854ef5c 100755 --- a/csharp/test/Ice/optional/run.py +++ b/csharp/test/Ice/optional/run.py @@ -20,9 +20,10 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with AMD server.") -TestUtil.clientServerTest(server="serveramd") +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="serveramd") +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/proxy/run.py b/csharp/test/Ice/proxy/run.py index eec082f03e5..d25963849a4 100755 --- a/csharp/test/Ice/proxy/run.py +++ b/csharp/test/Ice/proxy/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/retry/run.py b/csharp/test/Ice/retry/run.py index 73dc16e6fc7..5eabdba41f2 100755 --- a/csharp/test/Ice/retry/run.py +++ b/csharp/test/Ice/retry/run.py @@ -20,7 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/seqMapping/run.py b/csharp/test/Ice/seqMapping/run.py index eec082f03e5..d25963849a4 100755 --- a/csharp/test/Ice/seqMapping/run.py +++ b/csharp/test/Ice/seqMapping/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/servantLocator/run.py b/csharp/test/Ice/servantLocator/run.py index e80167930ef..e0e979ea9c2 100755 --- a/csharp/test/Ice/servantLocator/run.py +++ b/csharp/test/Ice/servantLocator/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="serveramd") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="serveramd") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/slicing/exceptions/run.py b/csharp/test/Ice/slicing/exceptions/run.py index 53eee80b8f3..0e3aa2f01bc 100755 --- a/csharp/test/Ice/slicing/exceptions/run.py +++ b/csharp/test/Ice/slicing/exceptions/run.py @@ -20,17 +20,17 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="serveramd") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="serveramd") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="serveramd", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", server="serveramd", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/slicing/objects/run.py b/csharp/test/Ice/slicing/objects/run.py index 53eee80b8f3..0e3aa2f01bc 100755 --- a/csharp/test/Ice/slicing/objects/run.py +++ b/csharp/test/Ice/slicing/objects/run.py @@ -20,17 +20,17 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="serveramd") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="serveramd") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="serveramd", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", server="serveramd", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/threadPoolPriority/run.py b/csharp/test/Ice/threadPoolPriority/run.py index 3f2e91f0009..5c9bb399cb3 100644 --- a/csharp/test/Ice/threadPoolPriority/run.py +++ b/csharp/test/Ice/threadPoolPriority/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/csharp/test/Ice/timeout/run.py b/csharp/test/Ice/timeout/run.py index 3f2e91f0009..5c9bb399cb3 100755 --- a/csharp/test/Ice/timeout/run.py +++ b/csharp/test/Ice/timeout/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/BuildInstructions.md b/java/BuildInstructions.md index 414c6b0956e..05a0a6e3e88 100644 --- a/java/BuildInstructions.md +++ b/java/BuildInstructions.md @@ -194,9 +194,9 @@ the IceGrid Admin tool by double-clicking the IceGrid Admin icon in Finder. ## Test Controller -The test Controller is an Ice server that allows to start servers for languages -that doesn't provide a full server side. This is currently used by JavaScript -and WinRT test suites to start the required servers. +The test Controller is an Ice server that starts servers for languages that +don't provide a full server side implementation. This is currently used by +the JavaScript and WinRT test suites to start the required servers. > gradlew :testController:assemble diff --git a/java/Makefile b/java/Makefile index 7dbff67b408..8faf591196e 100644 --- a/java/Makefile +++ b/java/Makefile @@ -24,7 +24,8 @@ all: dist: $(GRADLE) $(BUILD_FLAGS) :Ice:assemble :Glacier2:assemble :IceGrid:assemble \ - :IceBox:assemble :IceDiscovery:assemble :IcePatch2:assemble :IceStorm:assemble :IceGridGUI:assemble + :IceBox:assemble :IceBT:assemble :IceDiscovery:assemble :IcePatch2:assemble :IceStorm:assemble \ + :IceGridGUI:assemble clean: $(GRADLE) clean diff --git a/java/Makefile.mak b/java/Makefile.mak index 4d59dfd774c..5d0a9d88110 100644 --- a/java/Makefile.mak +++ b/java/Makefile.mak @@ -16,7 +16,8 @@ all: dist: $(GRADLE) :Ice:assemble :Glacier2:assemble :IceGrid:assemble :ant:assemble \ - :IceBox:assemble :IceDiscovery:assemble :IcePatch2:assemble :IceStorm:assemble :IceGridGUI:assemble + :IceBox:assemble :IceBT:assemble :IceDiscovery:assemble :IcePatch2:assemble :IceStorm:assemble \ + :IceGridGUI:assemble clean: $(GRADLE) clean diff --git a/java/src/Ice/src/main/java/IceInternal/PropertyNames.java b/java/src/Ice/src/main/java/IceInternal/PropertyNames.java index 147a6adc6b1..d689997225a 100644 --- a/java/src/Ice/src/main/java/IceInternal/PropertyNames.java +++ b/java/src/Ice/src/main/java/IceInternal/PropertyNames.java @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Nov 9 08:34:24 2015 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Nov 24 08:50:30 2015 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -1021,7 +1021,6 @@ public final class PropertyNames public static final Property IceBTProps[] = { - new Property("IceBT\\.DefaultAddress", false, null), new Property("IceBT\\.RcvSize", false, null), new Property("IceBT\\.SndSize", false, null), null diff --git a/java/src/IceBT/src/main/java/IceBT/EndpointI.java b/java/src/IceBT/src/main/java/IceBT/EndpointI.java index 4c18fbdb687..156918de45d 100644 --- a/java/src/IceBT/src/main/java/IceBT/EndpointI.java +++ b/java/src/IceBT/src/main/java/IceBT/EndpointI.java @@ -276,13 +276,22 @@ final class EndpointI extends IceInternal.EndpointI if(_addr.length() == 0) { - _addr = _instance.properties().getProperty("IceBT.DefaultAddress"); + _addr = _instance.defaultHost(); } - if(!oaEndpoint && _addr.length() == 0) + if(_addr.length() == 0 || _addr.equals("*")) { - throw new Ice.EndpointParseException( - "a device address must be specified using the -a option or IceBT.DefaultAddress"); + if(oaEndpoint) + { + // + // Ignore a missing address, we always use the default adapter anyway. + // + } + else + { + throw new Ice.EndpointParseException( + "a device address must be specified using the -a option or Ice.Default.Host"); + } } if(_name.length() == 0) @@ -292,7 +301,17 @@ final class EndpointI extends IceInternal.EndpointI if(_uuid == null) { - throw new Ice.EndpointParseException("a UUID must be specified using the -u option"); + if(oaEndpoint) + { + // + // Generate a UUID for object adapters that don't specify one. + // + _uuid = UUID.randomUUID(); + } + else + { + throw new Ice.EndpointParseException("a UUID must be specified using the -u option"); + } } hashInit(); @@ -408,7 +427,7 @@ final class EndpointI extends IceInternal.EndpointI { throw new Ice.EndpointParseException("no argument provided for -a option in endpoint " + endpoint); } - if(!BluetoothAdapter.checkBluetoothAddress(argument.toUpperCase())) + if(!argument.equals("*") && !BluetoothAdapter.checkBluetoothAddress(argument.toUpperCase())) { throw new Ice.EndpointParseException("invalid address provided for -a option in endpoint " + endpoint); } @@ -512,7 +531,6 @@ final class EndpointI extends IceInternal.EndpointI int h = 5381; h = IceInternal.HashUtil.hashAdd(h, _addr); h = IceInternal.HashUtil.hashAdd(h, _uuid.toString()); - h = IceInternal.HashUtil.hashAdd(h, _channel); h = IceInternal.HashUtil.hashAdd(h, _timeout); h = IceInternal.HashUtil.hashAdd(h, _connectionId); h = IceInternal.HashUtil.hashAdd(h, _compress); diff --git a/java/test/controller/src/main/java/Test/Common/ControllerServer.java b/java/test/controller/src/main/java/Test/Common/ControllerServer.java index 6bb7d874993..60e586e20de 100644 --- a/java/test/controller/src/main/java/Test/Common/ControllerServer.java +++ b/java/test/controller/src/main/java/Test/Common/ControllerServer.java @@ -183,7 +183,7 @@ public class ControllerServer extends Ice.Application @Override public ServerPrx runServer(String lang, final String name, String protocol, String host, - boolean winrt, String[] options, Ice.Current current) + boolean winrt, String configName, String[] options, Ice.Current current) { if(_server != null) { @@ -204,14 +204,23 @@ public class ControllerServer extends Ice.Application args.add("--server"); args.add("--protocol"); args.add(protocol); - args.add("--host"); - args.add(host); + if(!host.isEmpty()) + { + args.add("--host"); + args.add(host); + } if(winrt) { args.add("--winrt"); } + if(!configName.isEmpty()) + { + args.add("--configName"); + args.add(configName); + } + for(String option : options) { args.add("--arg"); diff --git a/java/test/controller/src/main/slice/Controller.ice b/java/test/controller/src/main/slice/Controller.ice index 7e4c2b95eda..5178df68660 100644 --- a/java/test/controller/src/main/slice/Controller.ice +++ b/java/test/controller/src/main/slice/Controller.ice @@ -29,7 +29,8 @@ sequence<string> StringSeq; interface Controller { - Server* runServer(string lang, string name, string protocol, string host, bool winrt, StringSeq options); + Server* runServer(string lang, string name, string protocol, string host, bool winrt, string configName, + StringSeq options); }; }; diff --git a/java/test/src/main/java/test/Ice/acm/run.py b/java/test/src/main/java/test/Ice/acm/run.py index 4e0bb6a5e1a..0787ce1a13c 100755 --- a/java/test/src/main/java/test/Ice/acm/run.py +++ b/java/test/src/main/java/test/Ice/acm/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/adapterDeactivation/run.py b/java/test/src/main/java/test/Ice/adapterDeactivation/run.py index 9a5e3a95e82..047dd1fbe33 100755 --- a/java/test/src/main/java/test/Ice/adapterDeactivation/run.py +++ b/java/test/src/main/java/test/Ice/adapterDeactivation/run.py @@ -21,5 +21,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/admin/run.py b/java/test/src/main/java/test/Ice/admin/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/admin/run.py +++ b/java/test/src/main/java/test/Ice/admin/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/ami/run.py b/java/test/src/main/java/test/Ice/ami/run.py index abd3ce1d74e..047dd1fbe33 100755 --- a/java/test/src/main/java/test/Ice/ami/run.py +++ b/java/test/src/main/java/test/Ice/ami/run.py @@ -21,7 +21,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/background/run.py b/java/test/src/main/java/test/Ice/background/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/background/run.py +++ b/java/test/src/main/java/test/Ice/background/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/binding/run.py b/java/test/src/main/java/test/Ice/binding/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/binding/run.py +++ b/java/test/src/main/java/test/Ice/binding/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/checksum/run.py b/java/test/src/main/java/test/Ice/checksum/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/checksum/run.py +++ b/java/test/src/main/java/test/Ice/checksum/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/classLoader/run.py b/java/test/src/main/java/test/Ice/classLoader/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/classLoader/run.py +++ b/java/test/src/main/java/test/Ice/classLoader/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/custom/run.py b/java/test/src/main/java/test/Ice/custom/run.py index 9a5e3a95e82..047dd1fbe33 100755 --- a/java/test/src/main/java/test/Ice/custom/run.py +++ b/java/test/src/main/java/test/Ice/custom/run.py @@ -21,5 +21,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/dispatcher/run.py b/java/test/src/main/java/test/Ice/dispatcher/run.py index abd3ce1d74e..047dd1fbe33 100755 --- a/java/test/src/main/java/test/Ice/dispatcher/run.py +++ b/java/test/src/main/java/test/Ice/dispatcher/run.py @@ -21,7 +21,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/enums/run.py b/java/test/src/main/java/test/Ice/enums/run.py index aa9cee6668a..a6d4808f447 100755 --- a/java/test/src/main/java/test/Ice/enums/run.py +++ b/java/test/src/main/java/test/Ice/enums/run.py @@ -21,9 +21,9 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with 1.1 encoding.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "1.1", message = "Running test with 1.1 encoding.") +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/exceptions/run.py b/java/test/src/main/java/test/Ice/exceptions/run.py index c3241835224..3f1e537501d 100755 --- a/java/test/src/main/java/test/Ice/exceptions/run.py +++ b/java/test/src/main/java/test/Ice/exceptions/run.py @@ -21,29 +21,31 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() - -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") - -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") - -print("Running test with compact (default) format and AMD server.") -TestUtil.clientServerTest(server="test.Ice.exceptions.AMDServer") - -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="test.Ice.exceptions.AMDServer", - additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") - -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="test.Ice.exceptions.AMDServer", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") - -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") + +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") + +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") + +TestUtil.queueClientServerTest(configName = "compactAMD", localOnly = True, + message = "Running test with compact (default) format and AMD server.", + server="test.Ice.exceptions.AMDServer") + +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", + server="test.Ice.exceptions.AMDServer", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") + +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", + server="test.Ice.exceptions.AMDServer", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") + +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/facets/run.py b/java/test/src/main/java/test/Ice/facets/run.py index 9a5e3a95e82..047dd1fbe33 100755 --- a/java/test/src/main/java/test/Ice/facets/run.py +++ b/java/test/src/main/java/test/Ice/facets/run.py @@ -21,5 +21,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/hold/run.py b/java/test/src/main/java/test/Ice/hold/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/hold/run.py +++ b/java/test/src/main/java/test/Ice/hold/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/info/run.py b/java/test/src/main/java/test/Ice/info/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/info/run.py +++ b/java/test/src/main/java/test/Ice/info/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/inheritance/run.py b/java/test/src/main/java/test/Ice/inheritance/run.py index 9a5e3a95e82..047dd1fbe33 100755 --- a/java/test/src/main/java/test/Ice/inheritance/run.py +++ b/java/test/src/main/java/test/Ice/inheritance/run.py @@ -21,5 +21,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/interrupt/run.py b/java/test/src/main/java/test/Ice/interrupt/run.py index d486b571d5e..047dd1fbe33 100755 --- a/java/test/src/main/java/test/Ice/interrupt/run.py +++ b/java/test/src/main/java/test/Ice/interrupt/run.py @@ -21,8 +21,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() - -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/invoke/run.py b/java/test/src/main/java/test/Ice/invoke/run.py index 804bfd70db9..31ad497c1ac 100755 --- a/java/test/src/main/java/test/Ice/invoke/run.py +++ b/java/test/src/main/java/test/Ice/invoke/run.py @@ -21,8 +21,7 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with Blobject server.") -TestUtil.clientServerTest() - -print("tests with BlobjectAsync server.") -TestUtil.clientServerTest(additionalServerOptions = "--async") +TestUtil.queueClientServerTest(configName = "blobject", message = "Running test with Blobject server.") +TestUtil.queueClientServerTest(configName = "blobjectAsync", message = "Running test with BlobjectAsync server.", + additionalServerOptions = "--async") +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/location/run.py b/java/test/src/main/java/test/Ice/location/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/location/run.py +++ b/java/test/src/main/java/test/Ice/location/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/metrics/run.py b/java/test/src/main/java/test/Ice/metrics/run.py index e058d7937da..058e3f9488d 100755 --- a/java/test/src/main/java/test/Ice/metrics/run.py +++ b/java/test/src/main/java/test/Ice/metrics/run.py @@ -21,9 +21,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="test.Ice.metrics.AMDServer") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="test.Ice.metrics.AMDServer") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/objects/run.py b/java/test/src/main/java/test/Ice/objects/run.py index 21d64b525a6..9ee646cb11a 100755 --- a/java/test/src/main/java/test/Ice/objects/run.py +++ b/java/test/src/main/java/test/Ice/objects/run.py @@ -21,16 +21,15 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/operations/run.py b/java/test/src/main/java/test/Ice/operations/run.py index 1fae9b8e38f..40e1128de10 100755 --- a/java/test/src/main/java/test/Ice/operations/run.py +++ b/java/test/src/main/java/test/Ice/operations/run.py @@ -21,17 +21,19 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0") +TestUtil.queueClientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0") -print("tests with AMD server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0", server="test.Ice.operations.AMDServer") +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + additionalClientOptions = "--Ice.Warn.AMICallback=0", + server="test.Ice.operations.AMDServer") -print("tests with TIE server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0", server="test.Ice.operations.TieServer") +TestUtil.queueClientServerTest(configName = "tie", localOnly = True, message = "Running test with TIE server.", + additionalClientOptions = "--Ice.Warn.AMICallback=0", + server="test.Ice.operations.TieServer") -print("tests with AMD TIE server.") -TestUtil.clientServerTest(additionalClientOptions = "--Ice.Warn.AMICallback=0", server="test.Ice.operations.AMDTieServer") +TestUtil.queueClientServerTest(configName = "amdTie", localOnly = True, message = "Running test with AMD TIE server.", + additionalClientOptions = "--Ice.Warn.AMICallback=0", + server="test.Ice.operations.AMDTieServer") -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/optional/run.py b/java/test/src/main/java/test/Ice/optional/run.py index b81ad4dbf07..4cc6ed244b2 100755 --- a/java/test/src/main/java/test/Ice/optional/run.py +++ b/java/test/src/main/java/test/Ice/optional/run.py @@ -21,9 +21,10 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with AMD server.") -TestUtil.clientServerTest(server="test.Ice.optional.AMDServer") +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="test.Ice.optional.AMDServer") +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/packagemd/run.py b/java/test/src/main/java/test/Ice/packagemd/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/packagemd/run.py +++ b/java/test/src/main/java/test/Ice/packagemd/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/proxy/run.py b/java/test/src/main/java/test/Ice/proxy/run.py index d25521c969d..e4f43586d57 100755 --- a/java/test/src/main/java/test/Ice/proxy/run.py +++ b/java/test/src/main/java/test/Ice/proxy/run.py @@ -21,11 +21,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() - -print("tests with AMD server.") -TestUtil.clientServerTest(server="test.Ice.proxy.AMDServer") - -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="test.Ice.proxy.AMDServer") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/retry/run.py b/java/test/src/main/java/test/Ice/retry/run.py index abd3ce1d74e..047dd1fbe33 100755 --- a/java/test/src/main/java/test/Ice/retry/run.py +++ b/java/test/src/main/java/test/Ice/retry/run.py @@ -21,7 +21,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/seqMapping/run.py b/java/test/src/main/java/test/Ice/seqMapping/run.py index 42ea8491dd1..76237b27659 100755 --- a/java/test/src/main/java/test/Ice/seqMapping/run.py +++ b/java/test/src/main/java/test/Ice/seqMapping/run.py @@ -21,11 +21,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() - -print("tests with AMD server.") -TestUtil.clientServerTest(server="test.Ice.seqMapping.AMDServer") - -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="test.Ice.seqMapping.AMDServer") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/serialize/run.py b/java/test/src/main/java/test/Ice/serialize/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/serialize/run.py +++ b/java/test/src/main/java/test/Ice/serialize/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/servantLocator/run.py b/java/test/src/main/java/test/Ice/servantLocator/run.py index 25e2e38c539..fe56c25e0b7 100755 --- a/java/test/src/main/java/test/Ice/servantLocator/run.py +++ b/java/test/src/main/java/test/Ice/servantLocator/run.py @@ -21,11 +21,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() - -print("tests with AMD server.") -TestUtil.clientServerTest(server="test.Ice.servantLocator.AMDServer") - -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="test.Ice.servantLocator.AMDServer") +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/slicing/exceptions/run.py b/java/test/src/main/java/test/Ice/slicing/exceptions/run.py index 320adc02d0c..b4f86610c35 100755 --- a/java/test/src/main/java/test/Ice/slicing/exceptions/run.py +++ b/java/test/src/main/java/test/Ice/slicing/exceptions/run.py @@ -21,17 +21,20 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="test.Ice.slicing.exceptions.AMDServer") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", + server="test.Ice.slicing.exceptions.AMDServer") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="test.Ice.slicing.exceptions.AMDServer", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", + server="test.Ice.slicing.exceptions.AMDServer", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") + +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/slicing/objects/run.py b/java/test/src/main/java/test/Ice/slicing/objects/run.py index 491896f9dec..3e08bd650f1 100755 --- a/java/test/src/main/java/test/Ice/slicing/objects/run.py +++ b/java/test/src/main/java/test/Ice/slicing/objects/run.py @@ -21,17 +21,20 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="test.Ice.slicing.objects.AMDServer") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", + server="test.Ice.slicing.objects.AMDServer") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="test.Ice.slicing.objects.AMDServer", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", + server="test.Ice.slicing.objects.AMDServer", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") + +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/threadPoolPriority/run.py b/java/test/src/main/java/test/Ice/threadPoolPriority/run.py index e2491210cdc..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/threadPoolPriority/run.py +++ b/java/test/src/main/java/test/Ice/threadPoolPriority/run.py @@ -21,5 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/java/test/src/main/java/test/Ice/timeout/run.py b/java/test/src/main/java/test/Ice/timeout/run.py index 3b3ba708056..6f2097cc6b6 100755 --- a/java/test/src/main/java/test/Ice/timeout/run.py +++ b/java/test/src/main/java/test/Ice/timeout/run.py @@ -21,4 +21,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/js/bin/HttpServer.js b/js/bin/HttpServer.js index aced89162f5..4d2d1311e9e 100644 --- a/js/bin/HttpServer.js +++ b/js/bin/HttpServer.js @@ -111,7 +111,7 @@ function Init() res.writeHead(302, {"Location": location}); res.end(); - console.log("HTTP/302 (Redierct) -> " + location); + console.log("HTTP/302 (Redirect) -> " + location); } else { @@ -167,7 +167,7 @@ function Init() var ext = path.extname(filePath).slice(1); // - // When the browser ask for a .js or .css file and it has support for gzip content + // When the browser asks for a .js or .css file and it has support for gzip content // check if a gzip version (.js.gz or .css.gz) of the file exists and use that instead. // if((ext == "js" || ext == "css" || ext == "map") && req.headers["accept-encoding"].indexOf("gzip") !== -1) diff --git a/js/src/Ice/PropertyNames.js b/js/src/Ice/PropertyNames.js index 9927b69e6c7..cfbf217a7e9 100644 --- a/js/src/Ice/PropertyNames.js +++ b/js/src/Ice/PropertyNames.js @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Nov 9 08:34:24 2015 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Nov 24 08:50:30 2015 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/js/test/Common/Controller.ice b/js/test/Common/Controller.ice index 7e4c2b95eda..5178df68660 100644 --- a/js/test/Common/Controller.ice +++ b/js/test/Common/Controller.ice @@ -29,7 +29,8 @@ sequence<string> StringSeq; interface Controller { - Server* runServer(string lang, string name, string protocol, string host, bool winrt, StringSeq options); + Server* runServer(string lang, string name, string protocol, string host, bool winrt, string configName, + StringSeq options); }; }; diff --git a/js/test/Common/TestCases.json b/js/test/Common/TestCases.json index 63aad046a21..535080da002 100644 --- a/js/test/Common/TestCases.json +++ b/js/test/Common/TestCases.json @@ -21,11 +21,13 @@ "configurations": [ { - "name": "1.0 encoding", + "configName": "1.0", + "desc": "1.0 encoding", "args": ["--Ice.Default.EncodingVersion=1.0"] }, { - "name": "1.1 encoding" + "configName": "1.1", + "desc": "1.1 encoding" } ] }, @@ -35,25 +37,17 @@ "configurations": [ { - "name": "compact (default) format" + "configName": "compact", + "desc": "compact (default) format" }, { - "name": "sliced format", + "configName": "sliced", + "desc": "sliced format", "args": ["--Ice.Default.SlicedFormat"] }, { - "name": "1.0 encoding", - "args": ["--Ice.Default.EncodingVersion=1.0"] - }, - { - "name": "compact (default) format and AMD server" - }, - { - "name": "sliced format and AMD server.", - "args": ["--Ice.Default.SlicedFormat"] - }, - { - "name": "1.0 encoding and AMD server", + "configName": "1.0", + "desc": "1.0 encoding", "args": ["--Ice.Default.EncodingVersion=1.0"] } ] @@ -89,24 +83,7 @@ }, "Ice/operations": { - "files": ["Test.js", "Twoways.js", "Oneways.js", "BatchOneways.js", "Client.js"], - "configurations": - [ - { - "name": "regular server" - }, - { - "name": "AMD server" - }, - { - "name": "TIE server", - "langs": ["java", "csharp"] - }, - { - "name": "AMD TIE server", - "langs": ["java", "csharp"] - } - ] + "files": ["Test.js", "Twoways.js", "Oneways.js", "BatchOneways.js", "Client.js"] }, "Ice/operationsBidir": { @@ -120,14 +97,17 @@ "configurations": [ { - "name": "compact (default) format" + "configName": "compact", + "desc": "compact (default) format" }, { - "name": "sliced format", + "configName": "sliced", + "desc": "sliced format", "args": ["--Ice.Default.SlicedFormat"] }, { - "name": "1.0 encoding", + "configName": "1.0", + "desc": "1.0 encoding", "args": ["--Ice.Default.EncodingVersion=1.0"] } ] @@ -138,14 +118,13 @@ "configurations": [ { - "name": "compact (default) format" + "configName": "compact", + "desc": "compact (default) format" }, { - "name": "sliced format", + "configName": "sliced", + "desc": "sliced format", "args": ["--Ice.Default.SlicedFormat"] - }, - { - "name": "AMD server" } ] }, @@ -163,16 +142,7 @@ }, "Ice/proxy": { - "files": ["Test.js", "Client.js"], - "configurations": - [ - { - "name": "regular server" - }, - { - "name": "AMD server" - } - ] + "files": ["Test.js", "Client.js"] }, "Ice/retry": { @@ -184,17 +154,12 @@ "configurations": [ { - "name": "sliced format" + "configName": "sliced", + "desc": "sliced format" }, { - "name": "1.0 encoding", - "args": ["--Ice.Default.EncodingVersion=1.0"] - }, - { - "name": "sliced format and AMD server" - }, - { - "name": "1.0 encoding and AMD server", + "configName": "1.0", + "desc": "1.0 encoding", "args": ["--Ice.Default.EncodingVersion=1.0"] } ] @@ -205,17 +170,12 @@ "configurations": [ { - "name": "sliced format" - }, - { - "name": "1.0 encoding", - "args": ["--Ice.Default.EncodingVersion=1.0"] - }, - { - "name": "sliced format and AMD server" + "configName": "sliced", + "desc": "sliced format" }, { - "name": "1.0 encoding and AMD server", + "configName": "1.0", + "desc": "1.0 encoding", "args": ["--Ice.Default.EncodingVersion=1.0"] } ] @@ -228,4 +188,4 @@ { "files": ["Client.js"] } -}
\ No newline at end of file +} diff --git a/js/test/Common/TestRunner.js b/js/test/Common/TestRunner.js index a1f51d19440..922ed798c4e 100644 --- a/js/test/Common/TestRunner.js +++ b/js/test/Common/TestRunner.js @@ -49,86 +49,81 @@ function runTest(name, language, defaultHost, protocol, configurations, out) { options = options.concat(__runEchoServerOptions__); } - out.write("starting " + srv + " server... "); - return controller.runServer(language, srv, protocol, defaultHost, false, options).then( - function(proxy) - { - var ref = proxy.ice_getIdentity().name + ":" + protocol + " -h " + defaultHost + " -p " + - (protocol == "ws" ? "15002" : "15003"); - out.writeLine("ok"); - server = Test.Common.ServerPrx.uncheckedCast(communicator.stringToProxy(ref)); - if(configurations === undefined) + if(configurations === undefined) + { + configurations = [ { configName: "", desc: "default configuration" } ]; + } + + var prev = new Ice.Promise().succeed(); + configurations.forEach( + function(config) + { + if(config.langs && config.langs.indexOf(language) == -1) { - return server.waitForServer().then( - function() - { - return __test__(out, id); - }); + return prev; } - else - { - var prev = new Ice.Promise().succeed(); - configurations.forEach( - function(configuration) - { - if(configuration.langs && configuration.langs.indexOf(language) == -1) + prev = prev.then( + function() + { + out.write("starting " + srv + " server... "); + return controller.runServer(language, srv, protocol, defaultHost, false, + config.configName, options).then( + function(proxy) { - return prev; + var ref = proxy.ice_getIdentity().name + ":" + protocol + " -h " + + defaultHost + " -p " + (protocol == "ws" ? "15002" : "15003"); + out.writeLine("ok"); + server = Test.Common.ServerPrx.uncheckedCast(communicator.stringToProxy(ref)); + out.writeLine("Running test with " + config.desc + "."); + return server.waitForServer().then( + function() + { + var initData = id.clone(); + if(config.args !== undefined) + { + initData.properties = + Ice.createProperties(config.args, id.properties); + } + return __test__(out, initData); + }); + }, + function(ex) + { + out.writeLine("failed! (" + ex + ")"); + throw ex; } - prev = prev.then( - function() + ).then( + function() + { + if(server) { - out.writeLine("Running test with " + configuration.name + "."); - return server.waitForServer().then( + return server.waitTestSuccess(); + } + } + ).exception( + function(ex) + { + if(server) + { + return server.terminate().then( function() { - var initData = id.clone(); - if(configuration.args !== undefined) - { - initData.properties = - Ice.createProperties(configuration.args, id.properties); - } - return __test__(out, initData); + throw ex; + }, + function() + { + throw ex; }); - }); - }); - return prev; - } - }, - function(ex) - { - out.writeLine("failed! (" + ex + ")"); - throw ex; - } - ).then( - function() - { - if(server) - { - return server.waitTestSuccess(); - } - } - ).exception( - function(ex) - { - if(server) - { - return server.terminate().then( - function() - { - throw ex; - }, - function() - { - throw ex; - }); - } - else - { - throw ex; - } + } + else + { + throw ex; + } + }); + }); }); + return prev; } else { diff --git a/python/test/Ice/acm/run.py b/python/test/Ice/acm/run.py index 74d2e5d1724..aeb71ef588e 100755 --- a/python/test/Ice/acm/run.py +++ b/python/test/Ice/acm/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/adapterDeactivation/run.py b/python/test/Ice/adapterDeactivation/run.py index 9487c74a4f5..713b4e80f5f 100755 --- a/python/test/Ice/adapterDeactivation/run.py +++ b/python/test/Ice/adapterDeactivation/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/ami/run.py b/python/test/Ice/ami/run.py index 2307ecfe0a6..713b4e80f5f 100755 --- a/python/test/Ice/ami/run.py +++ b/python/test/Ice/ami/run.py @@ -20,7 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/binding/run.py b/python/test/Ice/binding/run.py index 74d2e5d1724..aeb71ef588e 100755 --- a/python/test/Ice/binding/run.py +++ b/python/test/Ice/binding/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/blobject/run.py b/python/test/Ice/blobject/run.py index 74d2e5d1724..aeb71ef588e 100755 --- a/python/test/Ice/blobject/run.py +++ b/python/test/Ice/blobject/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/checksum/run.py b/python/test/Ice/checksum/run.py index 74d2e5d1724..aeb71ef588e 100755 --- a/python/test/Ice/checksum/run.py +++ b/python/test/Ice/checksum/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/enums/run.py b/python/test/Ice/enums/run.py index 614bfe363bf..e53c6cc89a3 100755 --- a/python/test/Ice/enums/run.py +++ b/python/test/Ice/enums/run.py @@ -20,9 +20,9 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with 1.1 encoding.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "1.1", message = "Running test with 1.1 encoding.") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/exceptions/run.py b/python/test/Ice/exceptions/run.py index 9445951eca9..13fd74afdcf 100755 --- a/python/test/Ice/exceptions/run.py +++ b/python/test/Ice/exceptions/run.py @@ -20,29 +20,29 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with compact (default) format and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") +TestUtil.queueClientServerTest(configName = "compactAMD", localOnly = True, + message = "Running test with compact (default) format and AMD server.", + server="ServerAMD.py") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py", - additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="ServerAMD.py", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/facets/run.py b/python/test/Ice/facets/run.py index 9487c74a4f5..713b4e80f5f 100755 --- a/python/test/Ice/facets/run.py +++ b/python/test/Ice/facets/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/info/run.py b/python/test/Ice/info/run.py index 74d2e5d1724..aeb71ef588e 100755 --- a/python/test/Ice/info/run.py +++ b/python/test/Ice/info/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/inheritance/run.py b/python/test/Ice/inheritance/run.py index 9487c74a4f5..713b4e80f5f 100755 --- a/python/test/Ice/inheritance/run.py +++ b/python/test/Ice/inheritance/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/location/run.py b/python/test/Ice/location/run.py index 74d2e5d1724..aeb71ef588e 100755 --- a/python/test/Ice/location/run.py +++ b/python/test/Ice/location/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/objects/run.py b/python/test/Ice/objects/run.py index 9e92332d98b..12ec7571e20 100755 --- a/python/test/Ice/objects/run.py +++ b/python/test/Ice/objects/run.py @@ -20,16 +20,15 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/operations/run.py b/python/test/Ice/operations/run.py index 767b20c0a2c..8ce78af0dee 100755 --- a/python/test/Ice/operations/run.py +++ b/python/test/Ice/operations/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") -print("tests with collocated server.") -TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="ServerAMD.py") +TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/optional/run.py b/python/test/Ice/optional/run.py index 1a3f97ec2e2..de8bc0159fc 100755 --- a/python/test/Ice/optional/run.py +++ b/python/test/Ice/optional/run.py @@ -20,9 +20,10 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="ServerAMD.py") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/proxy/run.py b/python/test/Ice/proxy/run.py index 767b20c0a2c..8ce78af0dee 100755 --- a/python/test/Ice/proxy/run.py +++ b/python/test/Ice/proxy/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") -print("tests with collocated server.") -TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="ServerAMD.py") +TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/servantLocator/run.py b/python/test/Ice/servantLocator/run.py index 767b20c0a2c..8ce78af0dee 100755 --- a/python/test/Ice/servantLocator/run.py +++ b/python/test/Ice/servantLocator/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") -print("tests with collocated server.") -TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="ServerAMD.py") +TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/slicing/exceptions/run.py b/python/test/Ice/slicing/exceptions/run.py index 95757ae246f..7d44f1ecf34 100755 --- a/python/test/Ice/slicing/exceptions/run.py +++ b/python/test/Ice/slicing/exceptions/run.py @@ -20,17 +20,17 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="ServerAMD.py") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/slicing/objects/run.py b/python/test/Ice/slicing/objects/run.py index a2cb1c4544e..2efd046dde6 100755 --- a/python/test/Ice/slicing/objects/run.py +++ b/python/test/Ice/slicing/objects/run.py @@ -20,17 +20,17 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="ServerAMD.py") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/timeout/run.py b/python/test/Ice/timeout/run.py index 74d2e5d1724..aeb71ef588e 100755 --- a/python/test/Ice/timeout/run.py +++ b/python/test/Ice/timeout/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/scripts/IceGridAdmin.py b/scripts/IceGridAdmin.py index 3f65308929e..ba7fbb634bc 100644 --- a/scripts/IceGridAdmin.py +++ b/scripts/IceGridAdmin.py @@ -140,7 +140,7 @@ def iceGridNodePropertiesOverride(): # Create property overrides from command line options. # overrideOptions = '' - for opt in shlex.split(TestUtil.getCommandLineProperties("", TestUtil.DriverConfig("server"))): + for opt in shlex.split(TestUtil.getCommandLineProperties("", TestUtil.DriverConfig("server"), "")): opt = opt.strip().replace("--", "") index = opt.find("=") if index == -1: diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py index b721ffb2259..b712a50d10d 100755 --- a/scripts/TestUtil.py +++ b/scripts/TestUtil.py @@ -10,7 +10,7 @@ import sys, os, re, getopt, time, string, threading, atexit, platform, traceback, subprocess # Global flags and their default values. -protocol = "" # If unset, default to TCP. Valid values are "tcp", "ssl", "ws" or "wss". +protocol = "" # If unset, default to TCP. Valid values are "tcp", "ssl", "ws", "wss" or "bt". compress = False # Set to True to enable bzip2 compression. serialize = False # Set to True to have tests use connection serialization host = None # Will default to loopback. @@ -49,6 +49,10 @@ winrt = False global serverOnly serverOnly = False mx = False +controller = None +configName = None + +queuedTests = [] # # Linux distribution @@ -377,7 +381,7 @@ except: sys.exit(1) # -# Figure out Ice installation directoty +# Figure out Ice installation directory # iceHome = None # Binary distribution to use (or None to use binaries from source distribution) if os.environ.get("USE_BIN_DIST", "no") == "yes": @@ -393,7 +397,7 @@ if os.environ.get("USE_BIN_DIST", "no") == "yes": if path and len(path) > 0 and os.path.exists(path[0]): iceHome = path[0] -# List of supported cross languages test. +# List of supported cross-language tests. crossTests = [ #"Ice/adapterDeactivation", #"Ice/background", #"Ice/binding", @@ -422,37 +426,38 @@ crossTests = [ #"Ice/adapterDeactivation", def run(tests, root = False): def usage(): print("usage: " + sys.argv[0] + """ - --all Run all sensible permutations of the tests. - --all-cross Run all sensible permutations of cross language tests. - --start=index Start running the tests at the given index. - --loop Run the tests in a loop. - --filter=<regex> Run all the tests that match the given regex. - --rfilter=<regex> Run all the tests that do not match the given regex. - --debug Display debugging information on each test. - --protocol=tcp|ssl|ws|wss Run with the given protocol. - --compress Run the tests with protocol compression. - --host=host Set --Ice.Default.Host=<host>. - --valgrind Run the test with valgrind. - --appverifier Run the test with appverifier under Windows. - --serialize Run with connection serialization. - --continue Keep running when a test fails - --ipv6 Use IPv6 addresses. - --socks Use SOCKS proxy running on localhost. - --no-ipv6 Don't use IPv6 addresses. - --ice-home=<path> Use the binary distribution from the given path. - --x86 Binary distribution is 32-bit. - --x64 Binary distribution is 64-bit. - --c++11 Binary distribution is c++11. - --cross=lang Run cross language test. - --client-home=<dir> Run cross test clients from the given Ice source distribution. - --script Generate a script to run the tests. - --env Print important environment variables. - --service-dir=<dir> Where to locate services for builds without service support. - --compact Ice for .NET uses the Compact Framework. - --winrt Run server with configuration suited for WinRT client. - --server Run only the server. - --mx Enable IceMX when running the tests. - --arg=<property> Append the given argument. + --all Run all sensible permutations of the tests. + --all-cross Run all sensible permutations of cross language tests. + --start=index Start running the tests at the given index. + --loop Run the tests in a loop. + --filter=<regex> Run all the tests that match the given regex. + --rfilter=<regex> Run all the tests that do not match the given regex. + --debug Display debugging information on each test. + --protocol=<prot> Run with the given protocol (tcp|ssl|ws|wss|bt). + --compress Run the tests with protocol compression. + --host=host Set --Ice.Default.Host=<host>. + --valgrind Run the test with valgrind. + --appverifier Run the test with appverifier under Windows. + --serialize Run with connection serialization. + --continue Keep running when a test fails. + --ipv6 Use IPv6 addresses. + --socks Use SOCKS proxy running on localhost. + --no-ipv6 Don't use IPv6 addresses. + --ice-home=<path> Use the binary distribution from the given path. + --x86 Binary distribution is 32-bit. + --x64 Binary distribution is 64-bit. + --c++11 Binary distribution is c++11. + --cross=lang Run cross language test. + --client-home=<dir> Run cross test clients from the given Ice source distribution. + --script Generate a script to run the tests. + --env Print important environment variables. + --service-dir=<dir> Where to locate services for builds without service support. + --compact Ice for .NET uses the Compact Framework. + --winrt Run server with configuration suited for WinRT client. + --server Run only the server. + --mx Enable IceMX when running the tests. + --controller=<host> Use the test controller on the specified host. + --arg=<property> Append the given argument. """) sys.exit(2) @@ -462,7 +467,7 @@ def run(tests, root = False): "debug", "protocol=", "compress", "valgrind", "host=", "serialize", "continue", "ipv6", "no-ipv6", "socks", "ice-home=", "cross=", "client-home=", "x64", "x86", "script", "env", "arg=", "service-dir=", "appverifier", "compact", - "winrt", "server", "mx", "c++11"]) + "winrt", "server", "mx", "c++11", "controller=", "configName="]) except getopt.GetoptError: usage() @@ -480,6 +485,8 @@ def run(tests, root = False): winrt = "--winrt" in opts serverOnly = "--server" in opts mx = "--mx" in opts + controller = "--controller" in opts + configName = "--configName" in opts filters = [] for o, a in opts: @@ -516,7 +523,7 @@ def run(tests, root = False): arg += a arg += '"' elif o == "--protocol": - if a not in ( "ws", "wss", "ssl", "tcp"): + if a not in ("bt", "ws", "wss", "ssl", "tcp"): usage() if not root and getDefaultMapping() == "csharp" and (a == "ssl" or a == "wss"): if mono: @@ -525,6 +532,9 @@ def run(tests, root = False): if compact: print("SSL is not supported with the Compact Framework") sys.exit(1) + if a == "bt" and not isLinux(): + print("Bluetooth is only supported on Linux") + sys.exit(1) elif o == "--c++11": global cpp11 cpp11 = True @@ -537,7 +547,7 @@ def run(tests, root = False): if o in ( "--cross", "--protocol", "--host", "--debug", "--compress", "--valgrind", "--serialize", "--ipv6", \ "--socks", "--ice-home", "--x86", "--x64", "--c++11", "--env", \ "--service-dir", "--appverifier", "--compact", "--winrt", \ - "--server", "--mx", "--client-home"): + "--server", "--mx", "--client-home", "--controller", "--configName"): arg += " " + o if len(a) > 0: arg += " " + a @@ -545,7 +555,7 @@ def run(tests, root = False): if not root: tests = [ (os.path.join(getDefaultMapping(), "test", x), y) for x, y in tests ] - # Expand all the tests and argument combinations. + # Expand all the test and argument combinations. expanded = [] if all: expanded.append([(test, arg, config) for test,config in tests if "once" in config ]) @@ -559,6 +569,9 @@ def run(tests, root = False): a = '--protocol=ws %s' % arg expanded.append([ (test, a, config) for test,config in tests if "core" in config]) + a = '--protocol=bt %s' % arg + expanded.append([ (test, a, config) for test,config in tests if "core" in config]) + if not noipv6: a = "--ipv6 --protocol=wss --compress --mx --serialize %s" % arg expanded.append([ (test, a, config) for test,config in tests if "core" in config]) @@ -927,7 +940,7 @@ sslConfigTree["php"] = sslConfigTree["cpp"] sslConfigTree["objective-c"] = sslConfigTree["cpp"] def getDefaultMapping(): - """Try and guess the language mapping out of the current path""" + """Try to guess the language mapping from the current path""" here = os.getcwd().split(os.sep) here.reverse() for i in range(0, len(here)): @@ -961,6 +974,7 @@ class DriverConfig: cpp11 = False serviceDir = None mx = False + controller = None extraArgs = [] def __init__(self, type = None): @@ -979,6 +993,7 @@ class DriverConfig: global serviceDir global compact global mx + global controller global extraArgs self.lang = getDefaultMapping() self.protocol = protocol @@ -997,6 +1012,7 @@ class DriverConfig: self.serviceDir = serviceDir self.compact = compact self.mx = mx + self.controller = controller self.extraArgs = extraArgs def argsToDict(argumentString, results): @@ -1018,7 +1034,7 @@ def argsToDict(argumentString, results): results[current] = None return results -def getCommandLineProperties(exe, config): +def getCommandLineProperties(exe, config, cfgName): # # Command lines are built up from the items in the components @@ -1036,8 +1052,7 @@ def getCommandLineProperties(exe, config): #components.append("--Ice.Trace.Network=3") # - # Now we add additional components dependent on the desired - # configuration. + # Now we add additional components depending on the desired configuration. # if config.protocol == "ssl" or config.protocol == "wss": sslenv = {} @@ -1050,6 +1065,9 @@ def getCommandLineProperties(exe, config): components.append(sslConfigTree[config.lang]["plugin"] % sslenv) components.append(sslConfigTree[config.lang][config.type] % sslenv) + if config.protocol == "bt": + components.append("--Ice.Plugin.IceBT=IceBT:createIceBT") + components.append("--Ice.Default.Protocol=" + config.protocol) if config.compress: @@ -1086,6 +1104,12 @@ def getCommandLineProperties(exe, config): components.append("--IceMX.Metrics.Parent.GroupBy=parent") components.append("--IceMX.Metrics.All.GroupBy=none") + if config.controller: + components.append("--ControllerHost=" + config.controller) + + if cfgName: + components.append("--ConfigName=" + cfgName) + if config.socksProxy: components.append("--Ice.SOCKSProxyHost=127.0.0.1") @@ -1094,8 +1118,9 @@ def getCommandLineProperties(exe, config): if config.host == None: components.append("--Ice.Default.Host=0:0:0:0:0:0:0:1") else: - components.append("--Ice.IPv4=1 --Ice.IPv6=0") - if config.host == None: + if config.protocol != "bt": + components.append("--Ice.IPv4=1 --Ice.IPv6=0") + if config.host == None and config.protocol != "bt": components.append("--Ice.Default.Host=127.0.0.1") if config.host != None and len(config.host) != 0: @@ -1128,7 +1153,7 @@ def getCommandLineProperties(exe, config): output.close() return properties -def getCommandLine(exe, config, options = "", interpreterOptions = ""): +def getCommandLine(exe, config, options = "", interpreterOptions = "", cfgName = None): output = getStringIO() if config.mono and config.lang == "csharp": @@ -1183,7 +1208,7 @@ def getCommandLine(exe, config, options = "", interpreterOptions = ""): if exe.find("IceUtil\\") != -1 or exe.find("IceUtil/") != -1: output.write(' ' + options) else: - output.write(getCommandLineProperties(exe, config) + ' ' + options) + output.write(getCommandLineProperties(exe, config, cfgName) + ' ' + options) commandline = output.getvalue() output.close() @@ -1445,7 +1470,7 @@ def getClientCrossTestDir(base): return os.path.join(clientHome, lang, *after) -def clientServerTest(additionalServerOptions = "", additionalClientOptions = "", +def clientServerTest(cfgName = None, additionalServerOptions = "", additionalClientOptions = "", server = None, client = None, serverenv = None, clientenv = None, interpreterOptions = ""): if server is None: @@ -1480,6 +1505,7 @@ def clientServerTest(additionalServerOptions = "", additionalClientOptions = "", elif len(cross) == 0: cross.append(lang) + global controller global clientHome for clientLang in cross: clientCfg = DriverConfig("client") @@ -1521,15 +1547,16 @@ def clientServerTest(additionalServerOptions = "", additionalClientOptions = "", if appverifier: setAppVerifierSettings([clientExe, serverExe]) - sys.stdout.write("starting " + serverDesc + "... ") - sys.stdout.flush() - serverCfg = DriverConfig("server") - if lang in ["ruby", "php", "js"]: - serverCfg.lang = "cpp" - server = getCommandLine(server, serverCfg, additionalServerOptions, interpreterOptions) - serverProc = spawnServer(server, env = serverenv, lang=serverCfg.lang, mx=serverCfg.mx) - print("ok") - sys.stdout.flush() + if not controller: + sys.stdout.write("starting " + serverDesc + "... ") + sys.stdout.flush() + serverCfg = DriverConfig("server") + if lang in ["ruby", "php", "js"]: + serverCfg.lang = "cpp" + server = getCommandLine(server, serverCfg, additionalServerOptions, interpreterOptions) + serverProc = spawnServer(server, env = serverenv, lang=serverCfg.lang, mx=serverCfg.mx) + print("ok") + sys.stdout.flush() if not serverOnly: if clientLang == lang: @@ -1537,7 +1564,9 @@ def clientServerTest(additionalServerOptions = "", additionalClientOptions = "", else: sys.stdout.write("starting %s %s ... " % (clientLang, clientDesc)) sys.stdout.flush() - client = getCommandLine(client, clientCfg, additionalClientOptions, interpreterOptions) + if not controller: + cfgName = None + client = getCommandLine(client, clientCfg, additionalClientOptions, interpreterOptions, cfgName) clientProc = spawnClient(client, env = clientenv, cwd = clientdir, startReader = False, lang=clientCfg.lang) print("ok") @@ -1545,13 +1574,14 @@ def clientServerTest(additionalServerOptions = "", additionalClientOptions = "", clientProc.startReader(watchDog) clientProc.waitTestSuccess() - serverProc.waitTestSuccess() + if not controller: + serverProc.waitTestSuccess() if appverifier: appVerifierAfterTestEnd([clientExe, serverExe]) def collocatedTest(additionalOptions = ""): - if serverOnly: + if controller or serverOnly: print("** skipping collocated test") return lang = getDefaultMapping() @@ -2044,29 +2074,30 @@ class WatchDog(threading.Thread): def processCmdLine(): def usage(): print("usage: " + sys.argv[0] + """ - --debug Display debugging information on each test. - --trace=<file> Display tracing. - --protocol=tcp|ssl|ws|wss Run with the given protocol. - --compress Run the tests with protocol compression. - --valgrind Run the tests with valgrind. - --appverifier Run the tests with appverifier. - --host=host Set --Ice.Default.Host=<host>. - --serialize Run with connection serialization. - --ipv6 Use IPv6 addresses. - --socks Use SOCKS proxy running on localhost. - --ice-home=<path> Use the binary distribution from the given path. - --x86 Binary distribution is 32-bit. - --x64 Binary distribution is 64-bit. - --c++11 Binary distribution is c++11. - --env Print important environment variables. - --cross=lang Run cross language test. - --client-home=<dir> Run cross test clients from the given Ice source distribution. - --service-dir=<dir> Where to locate services for builds without service support. - --compact Ice for .NET uses the Compact Framework. - --winrt Run server with configuration suited for WinRT client. - --server Run only the server. - --mx Enable IceMX when running the tests. - --arg=<property> Append the given argument. + --debug Display debugging information on each test. + --trace=<file> Display tracing. + --protocol=<prot> Run with the given protocol (tcp|ssl|ws|wss|bt). + --compress Run the tests with protocol compression. + --valgrind Run the tests with valgrind. + --appverifier Run the tests with appverifier. + --host=host Set --Ice.Default.Host=<host>. + --serialize Run with connection serialization. + --ipv6 Use IPv6 addresses. + --socks Use SOCKS proxy running on localhost. + --ice-home=<path> Use the binary distribution from the given path. + --x86 Binary distribution is 32-bit. + --x64 Binary distribution is 64-bit. + --c++11 Binary distribution is c++11. + --env Print important environment variables. + --cross=lang Run cross language test. + --client-home=<dir> Run cross test clients from the given Ice source distribution. + --service-dir=<dir> Where to locate services for builds without service support. + --compact Ice for .NET uses the Compact Framework. + --winrt Run server with configuration suited for WinRT client. + --server Run only the server. + --mx Enable IceMX when running the tests. + --controller=<host> Use the test controller on the specified host. + --arg=<property> Append the given argument. """) sys.exit(2) @@ -2075,7 +2106,7 @@ def processCmdLine(): sys.argv[1:], "", ["debug", "trace=", "protocol=", "compress", "valgrind", "host=", "serialize", "ipv6", \ "socks", "ice-home=", "x86", "x64", "cross=", "client-home=", "env", \ "service-dir=", "appverifier", "arg=", \ - "compact", "winrt", "server", "mx", "c++11"]) + "compact", "winrt", "server", "mx", "c++11", "controller=", "configName="]) except getopt.GetoptError: usage() @@ -2147,12 +2178,15 @@ def processCmdLine(): global printenv printenv = True elif o == "--protocol": - if a not in ( "ws", "wss", "ssl", "tcp"): + if a not in ("bt", "ws", "wss", "ssl", "tcp"): usage() # ssl protocol isn't directly supported with mono. if mono and getDefaultMapping() == "csharp" and (a == "ssl" or a == "wss"): print("SSL is not supported with mono") sys.exit(1) + if a == "bt" and not isLinux(): + print("Bluetooth is only supported on Linux") + sys.exit(1) global protocol protocol = a elif o == "--service-dir": @@ -2171,6 +2205,12 @@ def processCmdLine(): elif o == "--mx": global mx mx = True + elif o == "--controller": + global controller + controller = a + elif o == "--configName": + global configName + configName = a if protocol in ["ssl", "wss"] and not serverOnly and getDefaultMapping() == "js": print("SSL is not supported with Node.js") sys.exit(1) @@ -2329,6 +2369,10 @@ def runTests(start, expanded, num = 0, script = False): print("%s*** test not supported with IceSSL%s" % (prefix, suffix)) continue + if (args.find("bt") != -1) and ("bt" not in config): + print("%s*** test not supported with Bluetooth%s" % (prefix, suffix)) + continue + if (args.find("ws") != -1 or args.find("wss") != -1) and ("nows" in config): print("%s*** test not supported with IceWS%s" % (prefix, suffix)) continue @@ -2380,6 +2424,99 @@ def runTests(start, expanded, num = 0, script = False): global testErrors testErrors.append(message) +class ClientServerTest: + def __init__(self, cfgName, message, additionalServerOptions, additionalClientOptions, + server, client, serverenv, clientenv, interpreterOptions, localOnly): + if cfgName is None: + cfgName = "default" + self.cfgName = cfgName + self.message = message + self.additionalServerOptions = additionalServerOptions + self.additionalClientOptions = additionalClientOptions + self.server = server + self.client = client + self.serverenv = serverenv + self.clientenv = clientenv + self.interpreterOptions = interpreterOptions + self.localOnly = localOnly + + def getConfigName(self): + return self.cfgName + + def getMessage(self): + return self.message + + def isLocalOnly(self): + return self.localOnly + + def getDefaultMessage(self): + return "Running test with regular server." + + def run(self): + clientServerTest(self.cfgName, self.additionalServerOptions, self.additionalClientOptions, self.server, + self.client, self.serverenv, self.clientenv, self.interpreterOptions) + +def queueClientServerTest(configName = None, message = None, additionalServerOptions = "", + additionalClientOptions = "", server = None, client = None, serverenv = None, + clientenv = None, interpreterOptions = "", localOnly = False): + global queuedTests + queuedTests.append(ClientServerTest(configName, message, additionalServerOptions, additionalClientOptions, server, + client, serverenv, clientenv, interpreterOptions, localOnly)) + +class CollocatedTest: + def __init__(self, message = None, additionalOptions = ""): + self.message = message + self.additionalOptions = additionalOptions + + def getMessage(self): + return self.message + + def isLocalOnly(self): + return True + + def getDefaultMessage(self): + return "Running test with collocated server." + + def run(self): + collocatedTest(self.additionalOptions) + +def queueCollocatedTest(message = None, additionalOptions = ""): + global queuedTests + queuedTests.append(CollocatedTest(message, additionalOptions)) + +def runQueuedTests(): + global queuedTests + global serverOnly + global controller + global configName + + if serverOnly: + name = configName + if not name: + name = "default" + + for t in queuedTests: + if isinstance(t, ClientServerTest) and t.getConfigName() == name: + t.run() + return + + print("no queued test found matching configuration name `" + name + "'") + sys.exit(1) + + tests = [] + for t in queuedTests: + if controller and t.isLocalOnly(): + continue + tests.append(t) + + for t in tests: + msg = t.getMessage() + if msg: + print(msg) + elif len(tests) > 1: + print(t.getDefaultMessage()) + t.run() + if "ICE_CONFIG" in os.environ: os.unsetenv("ICE_CONFIG") |