summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--objective-c/test/Common/TestCommon.m18
-rw-r--r--objective-c/test/Ice/ami/AllTests.m4
-rw-r--r--objective-c/test/Ice/ami/Collocated.m4
-rw-r--r--objective-c/test/Ice/ami/Server.m4
-rw-r--r--objective-c/test/Ice/enums/AllTests.m2
-rw-r--r--objective-c/test/Ice/enums/Server.m2
-rw-r--r--objective-c/test/Ice/exceptions/AllTests.m2
-rw-r--r--objective-c/test/Ice/exceptions/Collocated.m2
-rw-r--r--objective-c/test/Ice/exceptions/Server.m2
-rw-r--r--objective-c/test/Ice/facets/AllTests.m2
-rw-r--r--objective-c/test/Ice/facets/Collocated.m2
-rw-r--r--objective-c/test/Ice/facets/Server.m2
-rw-r--r--objective-c/test/Ice/inheritance/AllTests.m2
-rw-r--r--objective-c/test/Ice/inheritance/Collocated.m2
-rw-r--r--objective-c/test/Ice/inheritance/Server.m2
-rw-r--r--objective-c/test/Ice/invoke/AllTests.m2
-rw-r--r--objective-c/test/Ice/invoke/Server.m2
-rw-r--r--objective-c/test/Ice/objects/AllTests.m14
-rw-r--r--objective-c/test/Ice/objects/Collocated.m2
-rw-r--r--objective-c/test/Ice/objects/Server.m2
-rw-r--r--objective-c/test/Ice/operations/AllTests.m4
-rw-r--r--objective-c/test/Ice/operations/Collocated.m2
-rw-r--r--objective-c/test/Ice/operations/Server.m2
-rw-r--r--objective-c/test/Ice/operations/Twoways.m2
-rw-r--r--objective-c/test/Ice/operations/TwowaysAMI.m2
-rw-r--r--objective-c/test/Ice/optional/AllTests.m2
-rw-r--r--objective-c/test/Ice/optional/Server.m2
-rw-r--r--objective-c/test/Ice/proxy/AllTests.m18
-rw-r--r--objective-c/test/Ice/proxy/Collocated.m2
-rw-r--r--objective-c/test/Ice/proxy/Server.m2
-rw-r--r--objective-c/test/Ice/slicing/exceptions/AllTests.m2
-rw-r--r--objective-c/test/Ice/slicing/exceptions/Server.m2
-rw-r--r--objective-c/test/Ice/slicing/objects/AllTests.m2
-rw-r--r--objective-c/test/Ice/slicing/objects/Server.m2
-rw-r--r--objective-c/test/include/TestCommon.h2
-rw-r--r--scripts/Component.py3
-rw-r--r--scripts/Util.py19
37 files changed, 80 insertions, 64 deletions
diff --git a/objective-c/test/Common/TestCommon.m b/objective-c/test/Common/TestCommon.m
index 6688a6dc7b7..f26f0ef5464 100644
--- a/objective-c/test/Common/TestCommon.m
+++ b/objective-c/test/Common/TestCommon.m
@@ -95,7 +95,9 @@ defaultServerProperties(int *argc, char** argv)
}
#endif
- NSArray* args = [properties parseIceCommandLineOptions:[ICEUtil argsToStringSeq:*argc argv:argv]];
+ NSArray* args = [ICEUtil argsToStringSeq:*argc argv:argv];
+ args = [properties parseIceCommandLineOptions:args];
+ args = [properties parseCommandLineOptions:@"Test" options:args];
[ICEUtil stringSeqToArgs:args argc:argc argv:argv];
return properties;
@@ -149,11 +151,23 @@ defaultClientProperties(int* argc, char** argv)
}
#endif
- NSArray* args = [properties parseIceCommandLineOptions:[ICEUtil argsToStringSeq:*argc argv:argv]];
+ NSArray* args = [ICEUtil argsToStringSeq:*argc argv:argv];
+ args = [properties parseIceCommandLineOptions:args];
+ args = [properties parseCommandLineOptions:@"Test" options:args];
[ICEUtil stringSeqToArgs:args argc:argc argv:argv];
+
return properties;
}
+NSString*
+getTestEndpoint(id<ICECommunicator> com, int num)
+{
+ id<ICEProperties> properties = [com getProperties];
+ NSString* protocol = [properties getPropertyWithDefault:@"Ice.Default.Protocol" value:@"default"];
+ int basePort = [properties getPropertyAsIntWithDefault:@"Test.BasePort" value:12010];
+ return [NSString stringWithFormat:@"%@ -p %d", protocol, basePort + num];
+}
+
#if TARGET_OS_IPHONE
void
diff --git a/objective-c/test/Ice/ami/AllTests.m b/objective-c/test/Ice/ami/AllTests.m
index 2c42b7f7864..5763abfdb72 100644
--- a/objective-c/test/Ice/ami/AllTests.m
+++ b/objective-c/test/Ice/ami/AllTests.m
@@ -86,12 +86,12 @@
void
amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
{
- NSString* ref = @"test:default -p 12010";
+ NSString* ref = [NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> base = [communicator stringToProxy:(ref)];
id<TestAMITestIntfPrx> p = [TestAMITestIntfPrx checkedCast:base];
test(p);
- ref = @"testController:default -p 12011";
+ ref = [NSString stringWithFormat:@"testController:%@", getTestEndpoint(communicator, 1)];
base = [communicator stringToProxy:ref];
TestAMITestIntfControllerPrx* testController = [TestAMITestIntfControllerPrx uncheckedCast:base];
test(testController);
diff --git a/objective-c/test/Ice/ami/Collocated.m b/objective-c/test/Ice/ami/Collocated.m
index 5620ca440e2..c6947a375c2 100644
--- a/objective-c/test/Ice/ami/Collocated.m
+++ b/objective-c/test/Ice/ami/Collocated.m
@@ -9,8 +9,8 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAMIAdapter.Endpoints" value:@"default -p 12010:udp"];
- [[communicator getProperties] setProperty:@"ControllerAdapter.Endpoints" value:@"default -p 12011"];
+ [[communicator getProperties] setProperty:@"TestAMIAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
+ [[communicator getProperties] setProperty:@"ControllerAdapter.Endpoints" value:getTestEndpoint(communicator, 1)];
[[communicator getProperties] setProperty:@"ControllerAdapter.ThreadPool.Size" value:@"1"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAMIAdapter"];
diff --git a/objective-c/test/Ice/ami/Server.m b/objective-c/test/Ice/ami/Server.m
index b98c458ea7a..1e8a2e6394c 100644
--- a/objective-c/test/Ice/ami/Server.m
+++ b/objective-c/test/Ice/ami/Server.m
@@ -9,8 +9,8 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAMIAdapter.Endpoints" value:@"default -p 12010:udp"];
- [[communicator getProperties] setProperty:@"ControllerAdapter.Endpoints" value:@"default -p 12011"];
+ [[communicator getProperties] setProperty:@"TestAMIAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
+ [[communicator getProperties] setProperty:@"ControllerAdapter.Endpoints" value:getTestEndpoint(communicator, 1)];
[[communicator getProperties] setProperty:@"ControllerAdapter.ThreadPool.Size" value:@"1"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAMIAdapter"];
diff --git a/objective-c/test/Ice/enums/AllTests.m b/objective-c/test/Ice/enums/AllTests.m
index b116c9ec60d..c636c771bbd 100644
--- a/objective-c/test/Ice/enums/AllTests.m
+++ b/objective-c/test/Ice/enums/AllTests.m
@@ -10,7 +10,7 @@ TestEnumTestIntfPrx*
enumAllTests(id<ICECommunicator> communicator)
{
- ICEObjectPrx* obj = [communicator stringToProxy:@"test:default -p 12010"];
+ ICEObjectPrx* obj = [communicator stringToProxy:[NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)]];
test(obj);
TestEnumTestIntfPrx* proxy = [TestEnumTestIntfPrx checkedCast:obj];
test(proxy);
diff --git a/objective-c/test/Ice/enums/Server.m b/objective-c/test/Ice/enums/Server.m
index e5dd6f9a4ef..a2e5d726760 100644
--- a/objective-c/test/Ice/enums/Server.m
+++ b/objective-c/test/Ice/enums/Server.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
[adapter add:[TestEnumTestIntfI testIntf] identity:[ICEUtil stringToIdentity:@"test"]];
[adapter activate];
diff --git a/objective-c/test/Ice/exceptions/AllTests.m b/objective-c/test/Ice/exceptions/AllTests.m
index 18eebfae3db..05fb5f5eabb 100644
--- a/objective-c/test/Ice/exceptions/AllTests.m
+++ b/objective-c/test/Ice/exceptions/AllTests.m
@@ -86,7 +86,7 @@ exceptionsAllTests(id<ICECommunicator> communicator)
tprintf("ok\n");
tprintf("testing stringToProxy... ");
- NSString *ref = @"thrower:default -p 12010";
+ NSString *ref = [NSString stringWithFormat:@"thrower:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> base = [communicator stringToProxy:ref];
test(base);
tprintf("ok\n");
diff --git a/objective-c/test/Ice/exceptions/Collocated.m b/objective-c/test/Ice/exceptions/Collocated.m
index 974e47519af..23f18964663 100644
--- a/objective-c/test/Ice/exceptions/Collocated.m
+++ b/objective-c/test/Ice/exceptions/Collocated.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [ThrowerI thrower];
[adapter add:object identity:[ICEUtil stringToIdentity:@"thrower"]];
diff --git a/objective-c/test/Ice/exceptions/Server.m b/objective-c/test/Ice/exceptions/Server.m
index 270f701dbb0..0996a45cb73 100644
--- a/objective-c/test/Ice/exceptions/Server.m
+++ b/objective-c/test/Ice/exceptions/Server.m
@@ -10,7 +10,7 @@ static int
run(id<ICECommunicator> communicator)
{
[[communicator getProperties] setProperty:@"Ice.Warn.Dispatch" value:@"0"];
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
[[communicator getProperties] setProperty:@"TestAdapter2.Endpoints" value:@"default -p 12011"];
[[communicator getProperties] setProperty:@"TestAdapter2.MessageSizeMax" value:@"0"];
[[communicator getProperties] setProperty:@"TestAdapter3.Endpoints" value:@"default -p 12012"];
diff --git a/objective-c/test/Ice/facets/AllTests.m b/objective-c/test/Ice/facets/AllTests.m
index 51423814953..26a46c3fb82 100644
--- a/objective-c/test/Ice/facets/AllTests.m
+++ b/objective-c/test/Ice/facets/AllTests.m
@@ -94,7 +94,7 @@ facetsAllTests(id<ICECommunicator> communicator)
[adapter deactivate];
tprintf("testing stringToProxy... ");
- NSString* ref = @"d:default -p 12010";
+ NSString* ref = [NSString stringWithFormat:@"d:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> db = [communicator stringToProxy:ref];
test(db);
tprintf("ok\n");
diff --git a/objective-c/test/Ice/facets/Collocated.m b/objective-c/test/Ice/facets/Collocated.m
index 4c0fd744203..6bab048ea9b 100644
--- a/objective-c/test/Ice/facets/Collocated.m
+++ b/objective-c/test/Ice/facets/Collocated.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* d = [TestFacetsDI d];
ICEObject* f = [TestFacetsFI f];
diff --git a/objective-c/test/Ice/facets/Server.m b/objective-c/test/Ice/facets/Server.m
index 6284dc8425b..aa1569a535e 100644
--- a/objective-c/test/Ice/facets/Server.m
+++ b/objective-c/test/Ice/facets/Server.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* d = [TestFacetsDI d];
ICEObject* f = [TestFacetsFI f];
diff --git a/objective-c/test/Ice/inheritance/AllTests.m b/objective-c/test/Ice/inheritance/AllTests.m
index 3c062301488..699e67a417b 100644
--- a/objective-c/test/Ice/inheritance/AllTests.m
+++ b/objective-c/test/Ice/inheritance/AllTests.m
@@ -10,7 +10,7 @@ id<TestInheritanceInitialPrx>
inheritanceAllTests(id<ICECommunicator> communicator)
{
tprintf("testing stringToProxy... ");
- NSString* ref = @"initial:default -p 12010";
+ NSString* ref = [NSString stringWithFormat:@"initial:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> base = [communicator stringToProxy:ref];
test(base);
tprintf("ok\n");
diff --git a/objective-c/test/Ice/inheritance/Collocated.m b/objective-c/test/Ice/inheritance/Collocated.m
index 58f8e3b6d6c..97e829a6f3c 100644
--- a/objective-c/test/Ice/inheritance/Collocated.m
+++ b/objective-c/test/Ice/inheritance/Collocated.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = ICE_AUTORELEASE([[TestInheritanceInitialI alloc] initWithAdapter:adapter]);
[adapter add:object identity:[ICEUtil stringToIdentity:@"initial"]];
diff --git a/objective-c/test/Ice/inheritance/Server.m b/objective-c/test/Ice/inheritance/Server.m
index 6ad2008acf8..3483e696119 100644
--- a/objective-c/test/Ice/inheritance/Server.m
+++ b/objective-c/test/Ice/inheritance/Server.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = ICE_AUTORELEASE([[TestInheritanceInitialI alloc] initWithAdapter:adapter]);
[adapter add:object identity:[ICEUtil stringToIdentity:@"initial"]];
diff --git a/objective-c/test/Ice/invoke/AllTests.m b/objective-c/test/Ice/invoke/AllTests.m
index 92d1962e6bb..c172334277c 100644
--- a/objective-c/test/Ice/invoke/AllTests.m
+++ b/objective-c/test/Ice/invoke/AllTests.m
@@ -112,7 +112,7 @@ static NSString* testString = @"This is a test string";
id<TestInvokeMyClassPrx>
invokeAllTests(id<ICECommunicator> communicator)
{
- NSString* ref = @"test:default -p 12010";
+ NSString* ref = [NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> base = [communicator stringToProxy:ref];
test(base);
diff --git a/objective-c/test/Ice/invoke/Server.m b/objective-c/test/Ice/invoke/Server.m
index 7f3d065095c..7dabc32f3ea 100644
--- a/objective-c/test/Ice/invoke/Server.m
+++ b/objective-c/test/Ice/invoke/Server.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
[adapter addDefaultServant:ICE_AUTORELEASE([[BlobjectI alloc] init]) category:@""];
[adapter activate];
diff --git a/objective-c/test/Ice/objects/AllTests.m b/objective-c/test/Ice/objects/AllTests.m
index d5f770f95a4..f88a3adc7c8 100644
--- a/objective-c/test/Ice/objects/AllTests.m
+++ b/objective-c/test/Ice/objects/AllTests.m
@@ -61,7 +61,7 @@ id<TestObjectsInitialPrx>
objectsAllTests(id<ICECommunicator> communicator, BOOL __unused collocated)
{
tprintf("testing stringToProxy... ");
- NSString* ref = @"initial:default -p 12010";
+ NSString* ref = [NSString stringWithFormat:@"initial:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> base = [communicator stringToProxy:ref];
test(base);
tprintf("ok\n");
@@ -353,7 +353,7 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL __unused collocated)
tprintf("ok\n");
tprintf("testing UnexpectedObjectException... ");
- ref = @"uoet:default -p 12010";
+ ref = [NSString stringWithFormat:@"uoet:%@", getTestEndpoint(communicator, 0)];
base = [communicator stringToProxy:ref];
test(base);
id<TestObjectsUnexpectedObjectExceptionTestPrx> uoet = [TestObjectsUnexpectedObjectExceptionTestPrx uncheckedCast:base];
@@ -475,7 +475,7 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL __unused collocated)
TestObjectsMutableBasePrxSeq* seq = [TestObjectsMutableBasePrxSeq array];
[seq addObject:[NSNull null]];
- ref = @"base:default -p 12010";
+ ref = [NSString stringWithFormat:@"base:%@", getTestEndpoint(communicator, 0)];
base = [communicator stringToProxy:ref];
id<TestObjectsBasePrx> b = [TestObjectsBasePrx uncheckedCast:base];
[seq addObject:b];
@@ -539,7 +539,7 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL __unused collocated)
TestObjectsMutableObjectPrxDict* dict = [TestObjectsMutableObjectPrxDict dictionary];
[dict setObject:[NSNull null] forKey:@"zero"];
- ref = @"object:default -p 12010";
+ ref = [NSString stringWithFormat:@"object:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> o = [communicator stringToProxy:ref];
[dict setObject:o forKey:@"one"];
@@ -602,7 +602,7 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL __unused collocated)
TestObjectsMutableBasePrxDict* dict = [TestObjectsMutableBasePrxDict dictionary];
[dict setObject:[NSNull null] forKey:@"zero"];
- ref = @"base:default -p 12010";
+ ref = [NSString stringWithFormat:@"base:%@", getTestEndpoint(communicator, 0)];
base = [communicator stringToProxy:ref];
id<TestObjectsBasePrx> b = [TestObjectsBasePrx uncheckedCast:base];
[dict setObject:b forKey:@"one"];
@@ -636,7 +636,7 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL __unused collocated)
@try
{
- ref = @"test:default -p 12010";
+ ref = [NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)];
id<TestObjectsTestIntfPrx> q = [TestObjectsTestIntfPrx checkedCast:[communicator stringToProxy:ref]];
{
@@ -697,7 +697,7 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL __unused collocated)
test([f12.name isEqualToString:@"F12"]);
TestObjectsF2Prx* f22;
- ref = @"F21:default -p 12010";
+ ref = [NSString stringWithFormat:@"F21:%@", getTestEndpoint(communicator, 0)];
TestObjectsF2Prx* f21 = [initial opF2:[TestObjectsF2Prx uncheckedCast:[communicator stringToProxy:ref]]
f22: &f22];
test([[f21 ice_getIdentity].name isEqualToString:@"F21"]);
diff --git a/objective-c/test/Ice/objects/Collocated.m b/objective-c/test/Ice/objects/Collocated.m
index 2240ae05937..26af67be66d 100644
--- a/objective-c/test/Ice/objects/Collocated.m
+++ b/objective-c/test/Ice/objects/Collocated.m
@@ -88,7 +88,7 @@ run(id<ICECommunicator> communicator)
id<ICEObjectFactory> objectFactory = ICE_AUTORELEASE([[CollocatedMyObjectFactory alloc] init]);
[communicator addObjectFactory:objectFactory sliceId:@"TestOF" ];
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
TestObjectsInitialI* initial = [TestObjectsInitialI initial];
[adapter add:initial identity:[ICEUtil stringToIdentity:@"initial"]];
diff --git a/objective-c/test/Ice/objects/Server.m b/objective-c/test/Ice/objects/Server.m
index 3d92e4d3fa0..101e0a3baeb 100644
--- a/objective-c/test/Ice/objects/Server.m
+++ b/objective-c/test/Ice/objects/Server.m
@@ -38,7 +38,7 @@ run(id<ICECommunicator> communicator)
[[communicator getValueFactoryManager] add:factory sliceId:@"::Test::J"];
[[communicator getValueFactoryManager] add:factory sliceId:@"::Test::H"];
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* initial = [TestObjectsInitialI initial];
[adapter add:initial identity:[ICEUtil stringToIdentity:@"initial"]];
diff --git a/objective-c/test/Ice/operations/AllTests.m b/objective-c/test/Ice/operations/AllTests.m
index 52613b2e068..4a33ef85182 100644
--- a/objective-c/test/Ice/operations/AllTests.m
+++ b/objective-c/test/Ice/operations/AllTests.m
@@ -9,12 +9,12 @@
id<TestOperationsMyClassPrx>
operationsAllTests(id<ICECommunicator> communicator)
{
- NSString* ref = @"test:default -p 12010";
+ NSString* ref = [NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> base = [communicator stringToProxy:(ref)];
id<TestOperationsMyClassPrx> cl = [TestOperationsMyClassPrx checkedCast:base];
id<TestOperationsMyDerivedClassPrx> derived = [TestOperationsMyDerivedClassPrx checkedCast:cl];
id<TestOperationsMBPrx> bprx =
- [TestOperationsMBPrx checkedCast:[communicator stringToProxy: @"b:default -p 12010"]];
+ [TestOperationsMBPrx checkedCast:[communicator stringToProxy: [NSString stringWithFormat:@"b:%@", getTestEndpoint(communicator, 0)]]];
tprintf("testing twoway operations... ");
void twoways(id<ICECommunicator>, id<TestOperationsMyClassPrx>, id<TestOperationsMBPrx>);
diff --git a/objective-c/test/Ice/operations/Collocated.m b/objective-c/test/Ice/operations/Collocated.m
index 0de36c20a52..45e388f0ea2 100644
--- a/objective-c/test/Ice/operations/Collocated.m
+++ b/objective-c/test/Ice/operations/Collocated.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestOperationsAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestOperationsAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestOperationsAdapter"];
id<ICEObjectPrx> prx = [adapter add:[TestOperationsMyDerivedClassI myDerivedClass]
identity:[ICEUtil stringToIdentity:@"test"]];
diff --git a/objective-c/test/Ice/operations/Server.m b/objective-c/test/Ice/operations/Server.m
index c8f1712c56f..209c2b9389f 100644
--- a/objective-c/test/Ice/operations/Server.m
+++ b/objective-c/test/Ice/operations/Server.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestOperationsAdapter.Endpoints" value:@"default -p 12010:udp"];
+ [[communicator getProperties] setProperty:@"TestOperationsAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestOperationsAdapter"];
[adapter add:[TestOperationsMyDerivedClassI myDerivedClass]
identity:[ICEUtil stringToIdentity:@"test"]];
diff --git a/objective-c/test/Ice/operations/Twoways.m b/objective-c/test/Ice/operations/Twoways.m
index 40c74784603..00072ee5b9c 100644
--- a/objective-c/test/Ice/operations/Twoways.m
+++ b/objective-c/test/Ice/operations/Twoways.m
@@ -1696,7 +1696,7 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p, id<Tes
[ctx setObject:@"TWO" forKey:@"two" ];
[ctx setObject:@"THREE" forKey:@"three"];
- id<TestOperationsMyClassPrx> pc = [TestOperationsMyClassPrx uncheckedCast:[ic stringToProxy:@"test:default -p 12010"]];
+ id<TestOperationsMyClassPrx> pc = [TestOperationsMyClassPrx uncheckedCast:[ic stringToProxy:[NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)]]];
[[ic getImplicitContext] setContext:ctx];
test([[[ic getImplicitContext] getContext] isEqual:ctx]);
diff --git a/objective-c/test/Ice/operations/TwowaysAMI.m b/objective-c/test/Ice/operations/TwowaysAMI.m
index a2b1b886129..f43525fc029 100644
--- a/objective-c/test/Ice/operations/TwowaysAMI.m
+++ b/objective-c/test/Ice/operations/TwowaysAMI.m
@@ -1997,7 +1997,7 @@ twowaysAMI(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
[ctx setObject:@"THREE" forKey:@"three"];
id<TestOperationsMyClassPrx> pc = [TestOperationsMyClassPrx uncheckedCast:
- [ic stringToProxy:@"test:default -p 12010"]];
+ [ic stringToProxy:[NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)]]];
[[ic getImplicitContext] setContext:(ctx)];
test([[[ic getImplicitContext] getContext] isEqualToDictionary:ctx]);
diff --git a/objective-c/test/Ice/optional/AllTests.m b/objective-c/test/Ice/optional/AllTests.m
index 7e561e97a16..d52f48f1920 100644
--- a/objective-c/test/Ice/optional/AllTests.m
+++ b/objective-c/test/Ice/optional/AllTests.m
@@ -278,7 +278,7 @@ optionalAllTests(id<ICECommunicator> communicator)
[[communicator getValueFactoryManager] add:^(id s) { return [factory create:s]; } sliceId:@""];
#endif
tprintf("testing stringToProxy... ");
- NSString* sref = @"initial:default -p 12010";
+ NSString* sref = [NSString stringWithFormat:@"initial:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> base = [communicator stringToProxy:sref];
test(base);
tprintf("ok\n");
diff --git a/objective-c/test/Ice/optional/Server.m b/objective-c/test/Ice/optional/Server.m
index 9f9b9ccd75d..351f7421538 100644
--- a/objective-c/test/Ice/optional/Server.m
+++ b/objective-c/test/Ice/optional/Server.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [InitialI initial];
[adapter add:object identity:[ICEUtil stringToIdentity:@"initial"]];
diff --git a/objective-c/test/Ice/proxy/AllTests.m b/objective-c/test/Ice/proxy/AllTests.m
index 8f450f9e7ba..151fb2de509 100644
--- a/objective-c/test/Ice/proxy/AllTests.m
+++ b/objective-c/test/Ice/proxy/AllTests.m
@@ -10,7 +10,7 @@ TestProxyMyClassPrx*
proxyAllTests(id<ICECommunicator> communicator)
{
tprintf("testing stringToProxy... ");
- NSString* ref = @"test:default -p 12010";
+ NSString* ref = [NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> base = [communicator stringToProxy:ref];
test(base);
@@ -252,7 +252,7 @@ proxyAllTests(id<ICECommunicator> communicator)
tprintf("testing propertyToProxy... ");
id<ICEProperties> prop = [communicator getProperties];
NSString* propertyPrefix = @"Foo.Proxy";
- [prop setProperty:propertyPrefix value:@"test:default -p 12010"];
+ [prop setProperty:propertyPrefix value:[NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)]];
b1 = [communicator propertyToProxy:propertyPrefix];
test([[[b1 ice_getIdentity] name] isEqualToString:@"test"] && [[[b1 ice_getIdentity] category] length] == 0 &&
[[b1 ice_getAdapterId] length] == 0 && [[b1 ice_getFacet] length] == 0);
@@ -296,7 +296,7 @@ proxyAllTests(id<ICECommunicator> communicator)
//test([b1 ice_getLocatorCacheTimeout] == 60);
//prop->setProperty("Ice.Default.LocatorCacheTimeout" :@"");
- [prop setProperty:propertyPrefix value:@"test:default -p 12010"];
+ [prop setProperty:propertyPrefix value:[NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)]];
property = [propertyPrefix stringByAppendingString:@".Router"];
test(![b1 ice_getRouter]);
@@ -770,7 +770,7 @@ proxyAllTests(id<ICECommunicator> communicator)
tprintf("testing encoding versioning... ");
TestProxyMyClassPrx* cl20 = [TestProxyMyClassPrx uncheckedCast:
- [communicator stringToProxy:@"test -e 2.0:default -p 12010"]];
+ [communicator stringToProxy:[NSString stringWithFormat:@"test -e 2.0:%@", getTestEndpoint(communicator, 0)]]];
@try
{
[cl20 ice_ping];
@@ -782,7 +782,7 @@ proxyAllTests(id<ICECommunicator> communicator)
}
TestProxyMyClassPrx* cl10 = [TestProxyMyClassPrx uncheckedCast:
- [communicator stringToProxy:@"test -e 1.0:default -p 12010"]];
+ [communicator stringToProxy:[NSString stringWithFormat:@"test -e 1.0:%@", getTestEndpoint(communicator, 0)]]];
[cl10 ice_ping];
[[cl10 ice_encodingVersion:ICEEncoding_1_0] ice_ping];
//cl->ice_collocationOptimized(false)->ice_encodingVersion(Ice::Encoding_1_0)->ice_ping();
@@ -790,7 +790,7 @@ proxyAllTests(id<ICECommunicator> communicator)
// 1.3 isn't supported but since a 1.3 proxy supports 1.1, the
// call will use the 1.1 encoding
TestProxyMyClassPrx* cl13 = [TestProxyMyClassPrx uncheckedCast:
- [communicator stringToProxy:@"test -e 1.3:default -p 12010"]];
+ [communicator stringToProxy:[NSString stringWithFormat:@"test -e 1.3:%@", getTestEndpoint(communicator, 0)]]];
[cl13 ice_ping];
[cl13 end_ice_ping:[cl13 begin_ice_ping]];
@@ -838,7 +838,7 @@ proxyAllTests(id<ICECommunicator> communicator)
tprintf("testing protocol versioning... ");
- cl20 = [TestProxyMyClassPrx uncheckedCast:[communicator stringToProxy:@"test -p 2.0:default -p 12010"]];
+ cl20 = [TestProxyMyClassPrx uncheckedCast:[communicator stringToProxy:[NSString stringWithFormat:@"test -p 2.0:%@", getTestEndpoint(communicator, 0)]]];
@try
{
[cl20 ice_ping];
@@ -849,12 +849,12 @@ proxyAllTests(id<ICECommunicator> communicator)
// Server 2.0 proxy doesn't support 1.0 version.
}
- cl10 = [TestProxyMyClassPrx uncheckedCast:[communicator stringToProxy:@"test -p 1.0:default -p 12010"]];
+ cl10 = [TestProxyMyClassPrx uncheckedCast:[communicator stringToProxy:[NSString stringWithFormat:@"test -p 1.0:%@", getTestEndpoint(communicator, 0)]]];
[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
- cl13 = [TestProxyMyClassPrx uncheckedCast:[communicator stringToProxy:@"test -p 1.3:default -p 12010"]];
+ cl13 = [TestProxyMyClassPrx uncheckedCast:[communicator stringToProxy:[NSString stringWithFormat:@"test -p 1.3:%@", getTestEndpoint(communicator, 0)]]];
[cl13 ice_ping];
[cl13 end_ice_ping:[cl13 begin_ice_ping]];
diff --git a/objective-c/test/Ice/proxy/Collocated.m b/objective-c/test/Ice/proxy/Collocated.m
index 27d0b3261ce..2c266b9781f 100644
--- a/objective-c/test/Ice/proxy/Collocated.m
+++ b/objective-c/test/Ice/proxy/Collocated.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
[adapter add:[TestProxyMyDerivedClassI myDerivedClass]
identity:[ICEUtil stringToIdentity:@"test"]];
diff --git a/objective-c/test/Ice/proxy/Server.m b/objective-c/test/Ice/proxy/Server.m
index 6343be0a91c..27bbcabdaab 100644
--- a/objective-c/test/Ice/proxy/Server.m
+++ b/objective-c/test/Ice/proxy/Server.m
@@ -9,7 +9,7 @@
static int
run(id<ICECommunicator> communicator)
{
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
[adapter add:[TestProxyMyDerivedClassI myDerivedClass]
identity:[ICEUtil stringToIdentity:@"test"]];
diff --git a/objective-c/test/Ice/slicing/exceptions/AllTests.m b/objective-c/test/Ice/slicing/exceptions/AllTests.m
index 5b1be7bee65..5a39ccbabf5 100644
--- a/objective-c/test/Ice/slicing/exceptions/AllTests.m
+++ b/objective-c/test/Ice/slicing/exceptions/AllTests.m
@@ -281,7 +281,7 @@
id<TestSlicingExceptionsClientTestIntfPrx>
slicingExceptionsAllTests(id<ICECommunicator> communicator)
{
- id<ICEObjectPrx> obj = [communicator stringToProxy:@"Test:default -p 12010"];
+ id<ICEObjectPrx> obj = [communicator stringToProxy:[NSString stringWithFormat:@"Test:%@", getTestEndpoint(communicator, 0)]];
id<TestSlicingExceptionsClientTestIntfPrx> test = [TestSlicingExceptionsClientTestIntfPrx checkedCast:obj];
tprintf("base... ");
{
diff --git a/objective-c/test/Ice/slicing/exceptions/Server.m b/objective-c/test/Ice/slicing/exceptions/Server.m
index 933e39fec8c..2bd0751959f 100644
--- a/objective-c/test/Ice/slicing/exceptions/Server.m
+++ b/objective-c/test/Ice/slicing/exceptions/Server.m
@@ -10,7 +10,7 @@ static int
run(id<ICECommunicator> communicator)
{
[[communicator getProperties] setProperty:@"Ice.Warn.Dispatch" value:@"0"];
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [TestSlicingExceptionsServerI testIntf];
[adapter add:object identity:[ICEUtil stringToIdentity:@"Test"]];
diff --git a/objective-c/test/Ice/slicing/objects/AllTests.m b/objective-c/test/Ice/slicing/objects/AllTests.m
index f41db004813..d895b770983 100644
--- a/objective-c/test/Ice/slicing/objects/AllTests.m
+++ b/objective-c/test/Ice/slicing/objects/AllTests.m
@@ -740,7 +740,7 @@ static void breakCycles(id o)
id<TestSlicingObjectsClientTestIntfPrx>
slicingObjectsAllTests(id<ICECommunicator> communicator)
{
- id<ICEObjectPrx> obj = [communicator stringToProxy:@"Test:default -p 12010"];
+ id<ICEObjectPrx> obj = [communicator stringToProxy:[NSString stringWithFormat:@"Test:%@", getTestEndpoint(communicator, 0)]];
id<TestSlicingObjectsClientTestIntfPrx> test = [TestSlicingObjectsClientTestIntfPrx checkedCast:obj];
tprintf("base as Object... ");
diff --git a/objective-c/test/Ice/slicing/objects/Server.m b/objective-c/test/Ice/slicing/objects/Server.m
index f02440acd49..a75e72ea65e 100644
--- a/objective-c/test/Ice/slicing/objects/Server.m
+++ b/objective-c/test/Ice/slicing/objects/Server.m
@@ -11,7 +11,7 @@ run(id<ICECommunicator> communicator)
{
id<ICEProperties> properties = [communicator getProperties];
[properties setProperty:@"Ice.Warn.Dispatch" value:@"0"];
- [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
+ [[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:getTestEndpoint(communicator, 0)];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [TestSlicingObjectsServerI serverI];
[adapter add:object identity:[ICEUtil stringToIdentity:@"Test"]];
diff --git a/objective-c/test/include/TestCommon.h b/objective-c/test/include/TestCommon.h
index a04a14feeb3..3e6fe1080bc 100644
--- a/objective-c/test/include/TestCommon.h
+++ b/objective-c/test/include/TestCommon.h
@@ -30,6 +30,8 @@ TEST_API void TestCommonTestInit(id, SEL, NSString*, BOOL, BOOL);
TEST_API id<ICEProperties> defaultServerProperties(int* argc, char** argv);
TEST_API id<ICEProperties> defaultClientProperties(int* argc, char** argv);
+TEST_API NSString* getTestEndpoint(id<ICECommunicator>, int);
+
TEST_API void serverReady(id<ICECommunicator>);
TEST_API void serverStop(void);
diff --git a/scripts/Component.py b/scripts/Component.py
index 96eaf36fd9e..6054dd5bd0c 100644
--- a/scripts/Component.py
+++ b/scripts/Component.py
@@ -162,7 +162,6 @@ class Ice(Component):
return True
def isMainThreadOnly(self, testId):
- #return testId.startswith("IceStorm") # TODO: WORKAROUND for ICE-8175
return False # By default, tests support being run concurrently
def getDefaultProcesses(self, mapping, processType, testId):
@@ -187,7 +186,6 @@ class Ice(Component):
def isCross(self, testId):
return testId in [
"Ice/ami",
- "Ice/info",
"Ice/exceptions",
"Ice/enums",
"Ice/facets",
@@ -196,7 +194,6 @@ class Ice(Component):
"Ice/objects",
"Ice/operations",
"Ice/proxy",
- "Ice/servantLocator",
"Ice/slicing/exceptions",
"Ice/slicing/objects",
"Ice/optional",
diff --git a/scripts/Util.py b/scripts/Util.py
index 67931169e5a..6c308aeb9b2 100644
--- a/scripts/Util.py
+++ b/scripts/Util.py
@@ -1974,16 +1974,19 @@ class TestSuite(object):
def isMainThreadOnly(self, driver):
if self.runOnMainThread or driver.getComponent().isMainThreadOnly(self.id):
return True
- for m in [CppMapping, JavaMapping, CSharpMapping, PythonMapping, PhpMapping, RubyMapping, JavaScriptMixin,
- SwiftMapping]:
- if isinstance(self.mapping, m):
- config = driver.configs[self.mapping]
- if "iphone" in config.buildPlatform or config.uwp or config.browser or config.android:
- return True # Not supported yet for tests that require a remote process controller
- return False
- else:
+
+ if isinstance(self.mapping, MatlabMapping):
return True
+ # Only Objective-C mapping cross test support workers.
+ if isinstance(self.mapping, ObjCMapping) and not driver.getComponent().isCross(self.id):
+ return True
+
+ config = driver.configs[self.mapping]
+ if "iphone" in config.buildPlatform or config.uwp or config.browser or config.android:
+ return True # Not supported yet for tests that require a remote process controller
+ return False
+
def addTestCase(self, testcase):
if testcase.name in self.testcases:
raise RuntimeError("duplicate testcase {0} in testsuite {1}".format(testcase, self))