summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/Makefile3
-rwxr-xr-xcpp/test/Ice/acm/run.py2
-rwxr-xr-xcpp/test/Ice/adapterDeactivation/run.py2
-rwxr-xr-xcpp/test/Ice/admin/run.py2
-rwxr-xr-xcpp/test/Ice/ami/run.py2
-rwxr-xr-xcpp/test/Ice/background/run.py2
-rw-r--r--cpp/test/Ice/binding/AllTests.cpp85
-rwxr-xr-xcpp/test/Ice/binding/run.py2
-rwxr-xr-xcpp/test/Ice/checksum/run.py2
-rwxr-xr-xcpp/test/Ice/custom/run.py2
-rwxr-xr-xcpp/test/Ice/defaultServant/run.py2
-rwxr-xr-xcpp/test/Ice/defaultValue/run.py2
-rwxr-xr-xcpp/test/Ice/dispatcher/run.py2
-rwxr-xr-xcpp/test/Ice/echo/run.py2
-rwxr-xr-xcpp/test/Ice/enums/run.py2
-rwxr-xr-xcpp/test/Ice/exceptions/run.py2
-rwxr-xr-xcpp/test/Ice/facets/run.py2
-rwxr-xr-xcpp/test/Ice/faultTolerance/run.py2
-rwxr-xr-xcpp/test/Ice/gc/run.py2
-rw-r--r--cpp/test/Ice/hash/Client.cpp10
-rwxr-xr-xcpp/test/Ice/hash/run.py2
-rwxr-xr-xcpp/test/Ice/hold/run.py2
-rwxr-xr-xcpp/test/Ice/info/run.py2
-rwxr-xr-xcpp/test/Ice/inheritance/run.py2
-rw-r--r--cpp/test/Ice/interceptor/Client.cpp57
-rwxr-xr-xcpp/test/Ice/interceptor/run.py2
-rwxr-xr-xcpp/test/Ice/invoke/run.py2
-rwxr-xr-xcpp/test/Ice/location/run.py2
-rwxr-xr-xcpp/test/Ice/logger/run.py2
-rw-r--r--cpp/test/Ice/metrics/AllTests.cpp8
-rwxr-xr-xcpp/test/Ice/metrics/run.py2
-rwxr-xr-xcpp/test/Ice/networkProxy/run.py2
-rwxr-xr-xcpp/test/Ice/objects/run.py2
-rwxr-xr-xcpp/test/Ice/operations/run.py2
-rwxr-xr-xcpp/test/Ice/optional/run.py2
-rwxr-xr-xcpp/test/Ice/plugin/run.py3
-rwxr-xr-xcpp/test/Ice/properties/run.py2
-rw-r--r--cpp/test/Ice/proxy/AllTests.cpp2
-rwxr-xr-xcpp/test/Ice/proxy/run.py2
-rwxr-xr-xcpp/test/Ice/retry/run.py2
-rwxr-xr-xcpp/test/Ice/servantLocator/run.py2
-rwxr-xr-xcpp/test/Ice/slicing/exceptions/run.py2
-rwxr-xr-xcpp/test/Ice/slicing/objects/run.py2
-rwxr-xr-xcpp/test/Ice/stream/run.py2
-rwxr-xr-xcpp/test/Ice/stringConverter/run.py2
-rwxr-xr-xcpp/test/Ice/threadPoolPriority/run.py2
-rw-r--r--cpp/test/Ice/timeout/AllTests.cpp3
-rw-r--r--cpp/test/Ice/timeout/Client.cpp8
-rw-r--r--cpp/test/Ice/timeout/Server.cpp8
-rwxr-xr-xcpp/test/Ice/timeout/run.py2
-rw-r--r--cpp/test/Ice/udp/AllTests.cpp2
-rw-r--r--cpp/test/Ice/udp/Client.cpp8
-rwxr-xr-xcpp/test/Ice/udp/run.py2
-rw-r--r--cpp/test/include/TestCommon.h17
54 files changed, 230 insertions, 66 deletions
diff --git a/cpp/test/Ice/Makefile b/cpp/test/Ice/Makefile
index 0629ad464bb..37b00f4c76f 100644
--- a/cpp/test/Ice/Makefile
+++ b/cpp/test/Ice/Makefile
@@ -51,7 +51,8 @@ SUBDIRS = proxy \
enums \
echo \
logger \
- networkProxy
+ networkProxy \
+ services
.PHONY: $(EVERYTHING) $(SUBDIRS)
diff --git a/cpp/test/Ice/acm/run.py b/cpp/test/Ice/acm/run.py
index 74d2e5d1724..ce8c5dd4b18 100755
--- a/cpp/test/Ice/acm/run.py
+++ b/cpp/test/Ice/acm/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/adapterDeactivation/run.py b/cpp/test/Ice/adapterDeactivation/run.py
index 9487c74a4f5..c9767485188 100755
--- a/cpp/test/Ice/adapterDeactivation/run.py
+++ b/cpp/test/Ice/adapterDeactivation/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/admin/run.py b/cpp/test/Ice/admin/run.py
index 74d2e5d1724..ce8c5dd4b18 100755
--- a/cpp/test/Ice/admin/run.py
+++ b/cpp/test/Ice/admin/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/ami/run.py b/cpp/test/Ice/ami/run.py
index 2307ecfe0a6..0816938a196 100755
--- a/cpp/test/Ice/ami/run.py
+++ b/cpp/test/Ice/ami/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/background/run.py b/cpp/test/Ice/background/run.py
index 74d2e5d1724..ce8c5dd4b18 100755
--- a/cpp/test/Ice/background/run.py
+++ b/cpp/test/Ice/background/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/binding/AllTests.cpp b/cpp/test/Ice/binding/AllTests.cpp
index 1d2851c6bcc..f9e7323a870 100644
--- a/cpp/test/Ice/binding/AllTests.cpp
+++ b/cpp/test/Ice/binding/AllTests.cpp
@@ -455,12 +455,33 @@ allTests(const Ice::CommunicatorPtr& communicator)
// one after the other.
//
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter31"; i++);
+#if TARGET_OS_IPHONE > 0
+ if(i != nRetry)
+ {
+ test->ice_getConnection()->close(false);
+ for(i = 0; i < nRetry && test->getAdapterName() == "Adapter31"; i++);
+ }
+#endif
test(i == nRetry);
com->deactivateObjectAdapter(adapters[0]);
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter32"; i++);
+#if TARGET_OS_IPHONE > 0
+ if(i != nRetry)
+ {
+ test->ice_getConnection()->close(false);
+ for(i = 0; i < nRetry && test->getAdapterName() == "Adapter32"; i++);
+ }
+#endif
test(i == nRetry);
com->deactivateObjectAdapter(adapters[1]);
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter33"; i++);
+#if TARGET_OS_IPHONE > 0
+ if(i != nRetry)
+ {
+ test->ice_getConnection()->close(false);
+ for(i = 0; i < nRetry && test->getAdapterName() == "Adapter33"; i++);
+ }
+#endif
test(i == nRetry);
com->deactivateObjectAdapter(adapters[2]);
@@ -482,14 +503,35 @@ allTests(const Ice::CommunicatorPtr& communicator)
//
adapters.push_back(com->createObjectAdapter("Adapter36", endpoints[2]->toString()));
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter36"; i++);
+#if TARGET_OS_IPHONE > 0
+ if(i != nRetry)
+ {
+ test->ice_getConnection()->close(false);
+ for(i = 0; i < nRetry && test->getAdapterName() == "Adapter36"; i++);
+ }
+#endif
test(i == nRetry);
test->ice_getConnection()->close(false);
adapters.push_back(com->createObjectAdapter("Adapter35", endpoints[1]->toString()));
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter35"; i++);
+#if TARGET_OS_IPHONE > 0
+ if(i != nRetry)
+ {
+ test->ice_getConnection()->close(false);
+ for(i = 0; i < nRetry && test->getAdapterName() == "Adapter35"; i++);
+ }
+#endif
test(i == nRetry);
test->ice_getConnection()->close(false);
adapters.push_back(com->createObjectAdapter("Adapter34", endpoints[0]->toString()));
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter34"; i++);
+#if TARGET_OS_IPHONE > 0
+ if(i != nRetry)
+ {
+ test->ice_getConnection()->close(false);
+ for(i = 0; i < nRetry && test->getAdapterName() == "Adapter34"; i++);
+ }
+#endif
test(i == nRetry);
deactivate(com, adapters);
@@ -614,13 +656,25 @@ allTests(const Ice::CommunicatorPtr& communicator)
// one after the other.
//
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter61"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
com->deactivateObjectAdapter(adapters[0]);
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter62"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
com->deactivateObjectAdapter(adapters[1]);
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter63"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
com->deactivateObjectAdapter(adapters[2]);
try
@@ -641,13 +695,25 @@ allTests(const Ice::CommunicatorPtr& communicator)
//
adapters.push_back(com->createObjectAdapter("Adapter66", endpoints[2]->toString()));
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter66"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
adapters.push_back(com->createObjectAdapter("Adapter65", endpoints[1]->toString()));
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter65"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
adapters.push_back(com->createObjectAdapter("Adapter64", endpoints[0]->toString()));
for(i = 0; i < nRetry && test->getAdapterName() == "Adapter64"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
deactivate(com, adapters);
}
@@ -673,13 +739,25 @@ allTests(const Ice::CommunicatorPtr& communicator)
// one after the other.
//
for(i = 0; i < nRetry && getAdapterNameWithAMI(test) == "AdapterAMI61"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
com->deactivateObjectAdapter(adapters[0]);
for(i = 0; i < nRetry && getAdapterNameWithAMI(test) == "AdapterAMI62"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
com->deactivateObjectAdapter(adapters[1]);
for(i = 0; i < nRetry && getAdapterNameWithAMI(test) == "AdapterAMI63"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
com->deactivateObjectAdapter(adapters[2]);
try
@@ -700,7 +778,11 @@ allTests(const Ice::CommunicatorPtr& communicator)
//
adapters.push_back(com->createObjectAdapter("AdapterAMI66", endpoints[2]->toString()));
for(i = 0; i < nRetry && getAdapterNameWithAMI(test) == "AdapterAMI66"; i++);
+#if TARGET_OS_IPHONE > 0
+ test(i >= nRetry - 1); // WORKAROUND: for connection establishment hang.
+#else
test(i == nRetry);
+#endif
adapters.push_back(com->createObjectAdapter("AdapterAMI65", endpoints[1]->toString()));
for(i = 0; i < nRetry && getAdapterNameWithAMI(test) == "AdapterAMI65"; i++);
test(i == nRetry);
@@ -733,7 +815,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
cout << "ok" << endl;
- if(!communicator->getProperties()->getProperty("Ice.Plugin.IceSSL").empty())
+ if(!communicator->getProperties()->getProperty("Ice.Plugin.IceSSL").empty() &&
+ communicator->getProperties()->getProperty("Ice.Default.Protocol") == "ssl")
{
cout << "testing unsecure vs. secure endpoints... " << flush;
{
diff --git a/cpp/test/Ice/binding/run.py b/cpp/test/Ice/binding/run.py
index 74d2e5d1724..ce8c5dd4b18 100755
--- a/cpp/test/Ice/binding/run.py
+++ b/cpp/test/Ice/binding/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/checksum/run.py b/cpp/test/Ice/checksum/run.py
index c9e3019c470..db935718825 100755
--- a/cpp/test/Ice/checksum/run.py
+++ b/cpp/test/Ice/checksum/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/custom/run.py b/cpp/test/Ice/custom/run.py
index eadac777a2c..6d8f4682523 100755
--- a/cpp/test/Ice/custom/run.py
+++ b/cpp/test/Ice/custom/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/defaultServant/run.py b/cpp/test/Ice/defaultServant/run.py
index 6e3c798398d..834f7ff9385 100755
--- a/cpp/test/Ice/defaultServant/run.py
+++ b/cpp/test/Ice/defaultServant/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/defaultValue/run.py b/cpp/test/Ice/defaultValue/run.py
index ecdefe0fbf9..e925f3c7010 100755
--- a/cpp/test/Ice/defaultValue/run.py
+++ b/cpp/test/Ice/defaultValue/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/dispatcher/run.py b/cpp/test/Ice/dispatcher/run.py
index 2307ecfe0a6..0816938a196 100755
--- a/cpp/test/Ice/dispatcher/run.py
+++ b/cpp/test/Ice/dispatcher/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/echo/run.py b/cpp/test/Ice/echo/run.py
index 06935984836..ee2384427e0 100755
--- a/cpp/test/Ice/echo/run.py
+++ b/cpp/test/Ice/echo/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/enums/run.py b/cpp/test/Ice/enums/run.py
index 614bfe363bf..ad8767bd99e 100755
--- a/cpp/test/Ice/enums/run.py
+++ b/cpp/test/Ice/enums/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/exceptions/run.py b/cpp/test/Ice/exceptions/run.py
index d838c867ba9..b90a1b41d48 100755
--- a/cpp/test/Ice/exceptions/run.py
+++ b/cpp/test/Ice/exceptions/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/facets/run.py b/cpp/test/Ice/facets/run.py
index 9487c74a4f5..c9767485188 100755
--- a/cpp/test/Ice/facets/run.py
+++ b/cpp/test/Ice/facets/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/faultTolerance/run.py b/cpp/test/Ice/faultTolerance/run.py
index 5becc9faba0..a709e8a24d2 100755
--- a/cpp/test/Ice/faultTolerance/run.py
+++ b/cpp/test/Ice/faultTolerance/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/gc/run.py b/cpp/test/Ice/gc/run.py
index 16f8da441e6..9533b681a21 100755
--- a/cpp/test/Ice/gc/run.py
+++ b/cpp/test/Ice/gc/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/hash/Client.cpp b/cpp/test/Ice/hash/Client.cpp
index 520c1dbe8f5..46fa0170e6b 100644
--- a/cpp/test/Ice/hash/Client.cpp
+++ b/cpp/test/Ice/hash/Client.cpp
@@ -33,7 +33,7 @@ int main(int argc, char** argv)
Ice::InitializationData id;
id.properties = Ice::createProperties(argc, argv);
-#ifndef ICE_OS_WINRT
+#if !defined(ICE_OS_WINRT) && TARGET_OS_IPHONE==0
//
// In Ice for WinRT IceSSL is part of Ice core.
//
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
ostringstream os;
os << i << ":tcp -p " << IceUtilInternal::random(65536) << " -t 10" << IceUtilInternal::random(1000000)
<< ":udp -p " << IceUtilInternal::random(65536) << " -h " << IceUtilInternal::random(100);
-
+
Ice::ObjectPrx obj = communicator->stringToProxy(os.str());
Ice::EndpointSeq endpoints = obj->ice_getEndpoints();
if(!seenProxy.insert(make_pair(obj->__hash(), obj)).second)
@@ -57,7 +57,7 @@ int main(int argc, char** argv)
test(obj->__hash() == obj->__hash());
}
test(proxyCollisions < maxCollisions);
-
+
//
// Check the same proxy produce the same hash, even when we recreate the proxy.
//
@@ -94,9 +94,9 @@ int main(int argc, char** argv)
test( communicator->stringToProxy("Glacier2/router:ssl -p 10011 -t 10000")->__hash() == proxyMap["prx8"]);
test( communicator->stringToProxy("Glacier2/router:tcp -h zeroc.com -p 10010 -t 10000")->__hash() == proxyMap["prx9"]);
test( communicator->stringToProxy("Glacier2/router:ssl -h zeroc.com -p 10011 -t 10000")->__hash() == proxyMap["prx10"]);
-
+
cerr << "ok" << endl;
-
+
if(communicator)
{
try
diff --git a/cpp/test/Ice/hash/run.py b/cpp/test/Ice/hash/run.py
index fde45700ed2..b155d75909d 100755
--- a/cpp/test/Ice/hash/run.py
+++ b/cpp/test/Ice/hash/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/hold/run.py b/cpp/test/Ice/hold/run.py
index 74d2e5d1724..ce8c5dd4b18 100755
--- a/cpp/test/Ice/hold/run.py
+++ b/cpp/test/Ice/hold/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/info/run.py b/cpp/test/Ice/info/run.py
index 74d2e5d1724..ce8c5dd4b18 100755
--- a/cpp/test/Ice/info/run.py
+++ b/cpp/test/Ice/info/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/inheritance/run.py b/cpp/test/Ice/inheritance/run.py
index 9487c74a4f5..c9767485188 100755
--- a/cpp/test/Ice/inheritance/run.py
+++ b/cpp/test/Ice/inheritance/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/interceptor/Client.cpp b/cpp/test/Ice/interceptor/Client.cpp
index 79ed9bcc62a..5f25a07f199 100644
--- a/cpp/test/Ice/interceptor/Client.cpp
+++ b/cpp/test/Ice/interceptor/Client.cpp
@@ -27,7 +27,58 @@ DEFINE_TEST("client")
using namespace std;
-class Client : public Ice::Application
+#ifdef __APPLE__
+namespace
+{
+
+class App
+{
+public:
+
+ ~App()
+ {
+ if(_communicator)
+ {
+ try
+ {
+ _communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cout << ex << endl;
+ }
+ }
+ }
+
+ Ice::CommunicatorPtr communicator()
+ {
+ return _communicator;
+ }
+
+ virtual int _main(int argc, char** argv)
+ {
+ Ice::InitializationData initData;
+ initData.properties = Ice::createProperties(argc, argv);
+ initData.properties->setProperty("Ice.Warn.Dispatch", "0");
+ _communicator = Ice::initialize(initData);
+ return run(argc, argv);
+ }
+ virtual int run(int argc, char** argv) = 0;
+
+private:
+
+ Ice::CommunicatorPtr _communicator;
+};
+
+}
+#else
+namespace
+{
+typedef Ice::Application App;
+}
+#endif
+
+class Client : public App
{
public:
@@ -61,7 +112,11 @@ main(int argc, char* argv[])
#endif
Client app;
+#if __APPLE__
+ int result = app._main(argc, argv);
+#else
int result = app.main(argc, argv);
+#endif
#ifndef _WIN32
//
diff --git a/cpp/test/Ice/interceptor/run.py b/cpp/test/Ice/interceptor/run.py
index 4832f30eccd..e7ab1bd2fe0 100755
--- a/cpp/test/Ice/interceptor/run.py
+++ b/cpp/test/Ice/interceptor/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/invoke/run.py b/cpp/test/Ice/invoke/run.py
index 0e6eb8cb37e..0b5d905d8d5 100755
--- a/cpp/test/Ice/invoke/run.py
+++ b/cpp/test/Ice/invoke/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/location/run.py b/cpp/test/Ice/location/run.py
index 74d2e5d1724..ce8c5dd4b18 100755
--- a/cpp/test/Ice/location/run.py
+++ b/cpp/test/Ice/location/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/logger/run.py b/cpp/test/Ice/logger/run.py
index 0e50de7df43..f7c35cf1865 100755
--- a/cpp/test/Ice/logger/run.py
+++ b/cpp/test/Ice/logger/run.py
@@ -11,7 +11,7 @@
import os, sys, subprocess
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/metrics/AllTests.cpp b/cpp/test/Ice/metrics/AllTests.cpp
index e7a8ca344f4..3fee13ab968 100644
--- a/cpp/test/Ice/metrics/AllTests.cpp
+++ b/cpp/test/Ice/metrics/AllTests.cpp
@@ -706,7 +706,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const CommunicatorObserverIPt
// Ice doesn't do any endpoint lookup with WinRT, the WinRT
// runtime takes care of if.
//
-#ifndef ICE_OS_WINRT
+#if !defined(ICE_OS_WINRT) && TARGET_OS_IPHONE==0
cout << "testing endpoint lookup metrics... " << flush;
props["IceMX.Metrics.View.Map.ConnectionEstablishment.GroupBy"] = "id";
@@ -1169,7 +1169,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const CommunicatorObserverIPt
{
test(obsv->connectionObserver->getTotal() > 0);
test(obsv->connectionEstablishmentObserver->getTotal() > 0);
-#ifndef ICE_OS_WINRT
+#if !defined(ICE_OS_WINRT) && TARGET_OS_IPHONE==0
test(obsv->endpointLookupObserver->getTotal() > 0);
#endif
test(obsv->invocationObserver->remoteObserver->getTotal() > 0);
@@ -1186,7 +1186,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const CommunicatorObserverIPt
{
test(obsv->connectionObserver->getCurrent() > 0);
test(obsv->connectionEstablishmentObserver->getCurrent() == 0);
-#ifndef ICE_OS_WINRT
+#if !defined(ICE_OS_WINRT) && TARGET_OS_IPHONE==0
test(obsv->endpointLookupObserver->getCurrent() == 0);
#endif
test(obsv->invocationObserver->remoteObserver->getCurrent() == 0);
@@ -1214,7 +1214,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const CommunicatorObserverIPt
{
test(obsv->connectionObserver->getFailedCount() > 0);
test(obsv->connectionEstablishmentObserver->getFailedCount() > 0);
-#ifndef ICE_OS_WINRT
+#if !defined(ICE_OS_WINRT) && TARGET_OS_IPHONE==0
test(obsv->endpointLookupObserver->getFailedCount() > 0);
#endif
}
diff --git a/cpp/test/Ice/metrics/run.py b/cpp/test/Ice/metrics/run.py
index eadac777a2c..6d8f4682523 100755
--- a/cpp/test/Ice/metrics/run.py
+++ b/cpp/test/Ice/metrics/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/networkProxy/run.py b/cpp/test/Ice/networkProxy/run.py
index 143b054256a..9a1726f72ff 100755
--- a/cpp/test/Ice/networkProxy/run.py
+++ b/cpp/test/Ice/networkProxy/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/objects/run.py b/cpp/test/Ice/objects/run.py
index 9e92332d98b..6014ec1878d 100755
--- a/cpp/test/Ice/objects/run.py
+++ b/cpp/test/Ice/objects/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/operations/run.py b/cpp/test/Ice/operations/run.py
index 6ad78ab6b8e..996d09d4d36 100755
--- a/cpp/test/Ice/operations/run.py
+++ b/cpp/test/Ice/operations/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/optional/run.py b/cpp/test/Ice/optional/run.py
index 4a27c40427e..54cbcb67bee 100755
--- a/cpp/test/Ice/optional/run.py
+++ b/cpp/test/Ice/optional/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/plugin/run.py b/cpp/test/Ice/plugin/run.py
index 0fb29bd2923..e925f3c7010 100755
--- a/cpp/test/Ice/plugin/run.py
+++ b/cpp/test/Ice/plugin/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
@@ -22,4 +22,3 @@ import TestUtil
client = os.path.join(os.getcwd(), "client")
TestUtil.simpleTest(client)
-
diff --git a/cpp/test/Ice/properties/run.py b/cpp/test/Ice/properties/run.py
index 5b79ee8deee..3fc30655f5b 100755
--- a/cpp/test/Ice/properties/run.py
+++ b/cpp/test/Ice/properties/run.py
@@ -11,7 +11,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp
index 7f2752a8196..545dc04037d 100644
--- a/cpp/test/Ice/proxy/AllTests.cpp
+++ b/cpp/test/Ice/proxy/AllTests.cpp
@@ -984,7 +984,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
bool ssl;
try
{
- Ice::ObjectPrx prx = communicator->stringToProxy("dummy:ssl");
+ communicator->stringToProxy("dummy:ssl");
ssl = true;
}
catch(const Ice::EndpointParseException&)
diff --git a/cpp/test/Ice/proxy/run.py b/cpp/test/Ice/proxy/run.py
index eadac777a2c..6d8f4682523 100755
--- a/cpp/test/Ice/proxy/run.py
+++ b/cpp/test/Ice/proxy/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/retry/run.py b/cpp/test/Ice/retry/run.py
index 2307ecfe0a6..0816938a196 100755
--- a/cpp/test/Ice/retry/run.py
+++ b/cpp/test/Ice/retry/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/servantLocator/run.py b/cpp/test/Ice/servantLocator/run.py
index eadac777a2c..6d8f4682523 100755
--- a/cpp/test/Ice/servantLocator/run.py
+++ b/cpp/test/Ice/servantLocator/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/slicing/exceptions/run.py b/cpp/test/Ice/slicing/exceptions/run.py
index a8b5474de97..526c93a88c2 100755
--- a/cpp/test/Ice/slicing/exceptions/run.py
+++ b/cpp/test/Ice/slicing/exceptions/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.."]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../..", "../../../../../.."]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/slicing/objects/run.py b/cpp/test/Ice/slicing/objects/run.py
index bf9b7a46a77..7e9990a8753 100755
--- a/cpp/test/Ice/slicing/objects/run.py
+++ b/cpp/test/Ice/slicing/objects/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../..", "../../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/stream/run.py b/cpp/test/Ice/stream/run.py
index a98fdc69fc8..365a6517aa2 100755
--- a/cpp/test/Ice/stream/run.py
+++ b/cpp/test/Ice/stream/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/stringConverter/run.py b/cpp/test/Ice/stringConverter/run.py
index 74d2e5d1724..ce8c5dd4b18 100755
--- a/cpp/test/Ice/stringConverter/run.py
+++ b/cpp/test/Ice/stringConverter/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/threadPoolPriority/run.py b/cpp/test/Ice/threadPoolPriority/run.py
index ad87c2a4b24..67a56bb220d 100755
--- a/cpp/test/Ice/threadPoolPriority/run.py
+++ b/cpp/test/Ice/threadPoolPriority/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/timeout/AllTests.cpp b/cpp/test/Ice/timeout/AllTests.cpp
index c6eec9f62be..8cfa598e86e 100644
--- a/cpp/test/Ice/timeout/AllTests.cpp
+++ b/cpp/test/Ice/timeout/AllTests.cpp
@@ -296,7 +296,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
initData.properties->setProperty("Ice.Override.Timeout", "100");
Ice::CommunicatorPtr comm = Ice::initialize(initData);
TimeoutPrx to = TimeoutPrx::checkedCast(comm->stringToProxy(sref));
- timeout->holdAdapter(500);
+ timeout->holdAdapter(700);
try
{
to->sendData(seq);
@@ -306,6 +306,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
// Expected.
}
+
//
// Calling ice_timeout() should have no effect.
//
diff --git a/cpp/test/Ice/timeout/Client.cpp b/cpp/test/Ice/timeout/Client.cpp
index 10f59e2d6bd..90b000702aa 100644
--- a/cpp/test/Ice/timeout/Client.cpp
+++ b/cpp/test/Ice/timeout/Client.cpp
@@ -41,6 +41,14 @@ main(int argc, char* argv[])
//
initData.properties->setProperty("Ice.RetryIntervals", "-1");
+#if TARGET_OS_IPHONE != 0
+ //
+ // COMPILERFIX: Disable connect timeout introduced for
+ // workaround to iOS device hangs when using SSL
+ //
+ initData.properties->setProperty("Ice.Override.ConnectTimeout", "");
+#endif
+
//
// This test kills connections, so we don't want warnings.
//
diff --git a/cpp/test/Ice/timeout/Server.cpp b/cpp/test/Ice/timeout/Server.cpp
index b8821afafdd..31da110c400 100644
--- a/cpp/test/Ice/timeout/Server.cpp
+++ b/cpp/test/Ice/timeout/Server.cpp
@@ -39,6 +39,14 @@ main(int argc, char* argv[])
Ice::InitializationData initData;
initData.properties = Ice::createProperties(argc, argv);
+#if TARGET_OS_IPHONE != 0
+ //
+ // COMPILERFIX: Disable connect timeout introduced for
+ // workaround to iOS device hangs when using SSL
+ //
+ initData.properties->setProperty("Ice.Override.ConnectTimeout", "");
+#endif
+
//
// This test kills connections, so we don't want warnings.
//
diff --git a/cpp/test/Ice/timeout/run.py b/cpp/test/Ice/timeout/run.py
index 74d2e5d1724..ce8c5dd4b18 100755
--- a/cpp/test/Ice/timeout/run.py
+++ b/cpp/test/Ice/timeout/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/Ice/udp/AllTests.cpp b/cpp/test/Ice/udp/AllTests.cpp
index ab9099987e3..b741719eef8 100644
--- a/cpp/test/Ice/udp/AllTests.cpp
+++ b/cpp/test/Ice/udp/AllTests.cpp
@@ -150,7 +150,7 @@ allTests(const CommunicatorPtr& communicator)
}
base = communicator->stringToProxy("test -d:" + endpoint);
TestIntfPrx objMcast = TestIntfPrx::uncheckedCast(base);
-#ifndef ICE_OS_WINRT
+#if !defined(ICE_OS_WINRT) && (!defined(__APPLE__) || (defined(__APPLE__) && !TARGET_OS_IPHONE))
cout << "testing udp multicast... " << flush;
nRetry = 5;
diff --git a/cpp/test/Ice/udp/Client.cpp b/cpp/test/Ice/udp/Client.cpp
index 845ef856ddf..f836ecc1912 100644
--- a/cpp/test/Ice/udp/Client.cpp
+++ b/cpp/test/Ice/udp/Client.cpp
@@ -69,5 +69,13 @@ main(int argc, char* argv[])
}
}
+#if TARGET_OS_IPHONE != 0
+ //
+ // iOS WORKAROUND: without a sleep before the communicator
+ // destroy, the close on the UDP socket hangs.
+ //
+ IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(500));
+#endif
+
return status;
}
diff --git a/cpp/test/Ice/udp/run.py b/cpp/test/Ice/udp/run.py
index d648b279327..ddc8c7e76eb 100755
--- a/cpp/test/Ice/udp/run.py
+++ b/cpp/test/Ice/udp/run.py
@@ -10,7 +10,7 @@
import os, sys
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
+path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
path = [os.path.join(head, p) for p in path]
diff --git a/cpp/test/include/TestCommon.h b/cpp/test/include/TestCommon.h
index 87ad90b67d0..2c2cf185673 100644
--- a/cpp/test/include/TestCommon.h
+++ b/cpp/test/include/TestCommon.h
@@ -11,7 +11,8 @@
#define TEST_COMMON_H
#include <IceUtil/IceUtil.h>
-#ifdef ICE_OS_WINRT
+
+#if defined(ICE_OS_WINRT) || (TARGET_OS_IPHONE)
# include <Ice/Initialize.h>
# include <Ice/Logger.h>
# include <Ice/LocalException.h>
@@ -19,7 +20,7 @@
#include <cstdlib>
-void
+void
inline print(const std::string& msg)
{
std::cout << msg << std::flush;
@@ -31,7 +32,7 @@ inline println(const std::string& msg)
std::cout << msg << std::endl;
}
-#ifndef ICE_OS_WINRT
+#if !defined(ICE_OS_WINRT) && (TARGET_OS_IPHONE == 0)
void
inline testFailed(const char* expr, const char* file, unsigned int line)
@@ -130,10 +131,10 @@ public:
{
_previousLogger = Ice::getProcessLogger();
Ice::setProcessLogger(Ice::getProcessLogger()->cloneWithPrefix(name));
-
+
_previousCoutBuffer = std::cout.rdbuf();
std::cout.rdbuf(r);
-
+
_previousCerrBuffer = std::cerr.rdbuf();
std::cerr.rdbuf(r);
}
@@ -168,7 +169,7 @@ class TestFailedException : public ::Ice::LocalException
{
public:
- TestFailedException(const char* file, int line) :
+ TestFailedException(const char* file, int line) :
LocalException(file, line)
{
}
@@ -213,7 +214,7 @@ inline testFailed(const char* expr, const char* file, unsigned int line)
Test::MainHelper* Test::helper; \
Ice::CommunicatorPtr communicatorInstance; \
extern "C" { \
- _declspec(dllexport) void dllTestShutdown(); \
+ ICE_DECLSPEC_EXPORT void dllTestShutdown(); \
void dllTestShutdown() \
{ \
try \
@@ -224,6 +225,7 @@ inline testFailed(const char* expr, const char* file, unsigned int line)
{ \
} \
} \
+ ICE_DECLSPEC_EXPORT int dllMain(int, char**, Test::MainHelper*); \
int dllMain(int argc, char** argv, Test::MainHelper* helper) \
{ \
Test::MainHelperInit init(helper, name, helper->redirect()); \
@@ -239,4 +241,3 @@ inline testFailed(const char* expr, const char* file, unsigned int line)
#define test(ex) ((ex) ? ((void)0) : testFailed(#ex, __FILE__, __LINE__))
#endif
-