summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/Make.rules43
-rw-r--r--cpp/config/Make.rules.Darwin14
-rwxr-xr-xcpp/test/FreezeScript/dbmap/run.py8
-rwxr-xr-xcpp/test/Ice/enums/run.py4
-rw-r--r--cpp/test/Ice/exceptions/Test.ice5
-rw-r--r--cpp/test/Ice/exceptions/TestAMD.ice4
-rwxr-xr-xcpp/test/Ice/exceptions/run.py20
-rw-r--r--cpp/test/Ice/objects/TestI.cpp2
-rwxr-xr-xcpp/test/Ice/objects/run.py9
-rw-r--r--cpp/test/Ice/servantLocator/AllTests.cpp11
-rwxr-xr-xcpp/test/Ice/slicing/exceptions/run.py10
-rwxr-xr-xcpp/test/Ice/slicing/objects/run.py10
-rwxr-xr-xcpp/test/Ice/stream/run.py2
13 files changed, 90 insertions, 52 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules
index 359519655fa..f558971f81a 100644
--- a/cpp/config/Make.rules
+++ b/cpp/config/Make.rules
@@ -130,9 +130,10 @@ USE_READLINE ?= no
#GENPIC ?= yes
#
-# If building with MinGW and Ice third party packages is not installed
-# in the default location set THIRDPARTY_HOME to the Ice third party
-# installation directory.
+# If building with MinGW and if third party libraries are not
+# installed in the default location or THIRDPARTY_HOME is not set in
+# your environment variables then change the following setting to
+# reflect the installation location.
#
#THIRDPARTY_HOME ?= C:\Program Files\ZeroC\Ice-$(VERSION)-ThirdParty
@@ -263,21 +264,21 @@ ifeq ($(ice_dir), /usr)
LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS)
else
ifeq ($(MinGW), yes)
- includedir_win = $(shell $(top_srcdir)/../cpp/config/cygpath-win.sh $(includedir))
- CPPFLAGS += -I"$(includedir_win)"
- ice_dir_win = $(shell $(top_srcdir)/../cpp/config/cygpath-win.sh $(ice_dir))
- ifdef ice_src_dist
- LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
- else
- LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L"$(ice_dir_win)\$(binsubdir)"
- endif
+ includedir_win = $(shell $(top_srcdir)/../cpp/config/cygpath-win.sh $(includedir))
+ CPPFLAGS += -I"$(includedir_win)"
+ ice_dir_win = $(shell $(top_srcdir)/../cpp/config/cygpath-win.sh $(ice_dir))
+ ifdef ice_src_dist
+ LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
+ else
+ LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L"$(ice_dir_win)\$(binsubdir)"
+ endif
else
- CPPFLAGS += -I$(includedir)
- ifdef ice_src_dist
- LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
- else
- LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(ice_dir)/$(libsubdir)
- endif
+ CPPFLAGS += -I$(includedir)
+ ifdef ice_src_dist
+ LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
+ else
+ LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(ice_dir)/$(libsubdir)
+ endif
endif
endif
@@ -302,19 +303,19 @@ endif
ifdef ice_src_dist
ifeq ($(MinGW), yes)
SLICEPARSERLIB = $(bindir)/$(SLICE_LIBNAME).dll
- SLICE2CPP = $(bindir)/slice2cpp.exe
+ SLICE2CPP = $(bindir)/slice2cpp.exe
else
SLICEPARSERLIB = $(libdir)/$(call mklibfilename,Slice,$(VERSION))
- SLICE2CPP = $(bindir)/slice2cpp
+ SLICE2CPP = $(bindir)/slice2cpp
SLICE2FREEZE = $(bindir)/slice2freeze
endif
else
ifeq ($(MinGW), yes)
SLICEPARSERLIB = $(ice_dir)/$(binsubdir)/$(SLICE_LIBNAME).dll
- SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp.exe
+ SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp.exe
else
SLICEPARSERLIB = $(ice_dir)/$(libsubdir)/$(call mklibfilename,Slice,$(VERSION))
- SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp
+ SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp
SLICE2FREEZE = $(ice_dir)/$(binsubdir)/slice2freeze
endif
endif
diff --git a/cpp/config/Make.rules.Darwin b/cpp/config/Make.rules.Darwin
index 509954efa86..06568790ebf 100644
--- a/cpp/config/Make.rules.Darwin
+++ b/cpp/config/Make.rules.Darwin
@@ -12,7 +12,7 @@
#
ifeq ($(DEVELOPER_PATH),)
- DEVELOPER_PATH = $(shell xcode-select -print-path)
+ DEVELOPER_PATH = $(shell xcode-select -print-path)
endif
TOOLCHAIN_BIN_DIR = $(DEVELOPER_PATH)/Toolchains/XcodeDefault.xctoolchain/usr/bin
@@ -41,14 +41,9 @@ endif
endif
#
-# Avoid OpenSSL deprecation warnings in Os X
-#
-OPENSSL_FLAGS = -Wno-deprecated-declarations
-
-#
# C++ run-time libraries, necessary for linking some shared libraries.
#
-CXXLIBS =
+CXXLIBS =
ifneq ($(embedded_runpath_prefix),)
# Only use -rpath if Mac OS X >= 10.5
@@ -103,6 +98,11 @@ ifeq ($(DB_HOME),)
endif
endif
+#
+# Avoid OpenSSL deprecation warnings on OS X
+#
+OPENSSL_FLAGS = -Wno-deprecated-declarations
+
BASELIBS = -lIceUtil -lpthread
LIBS = -lIce $(BASELIBS)
diff --git a/cpp/test/FreezeScript/dbmap/run.py b/cpp/test/FreezeScript/dbmap/run.py
index 34cfbeaa6f3..b99ed7b78d7 100755
--- a/cpp/test/FreezeScript/dbmap/run.py
+++ b/cpp/test/FreezeScript/dbmap/run.py
@@ -124,8 +124,8 @@ print("ok")
sys.stdout.write("executing default transformations... ")
sys.stdout.flush()
-command = '"' + transformdb + '" --old "' + testold + '" --new "' + testnew + '" --key int --value ::Test::S "' + init_dbdir + \
- '" default.db "' + check_dbdir + '" '
+command = '"' + transformdb + '" --old "' + testold + '" --new "' + testnew + '" --key int --value ::Test::S "' + \
+ init_dbdir + '" default.db "' + check_dbdir + '" '
TestUtil.spawn(command).waitTestSuccess()
@@ -134,8 +134,8 @@ print("ok")
sys.stdout.write("validating database... ")
sys.stdout.flush()
-command = '"' + transformdb + '" --old "' + testnew + '" --new "' + testnew + '" -f "' + checkxml + '" "' + check_dbdir + \
- '" default.db "' + tmp_dbdir + '" '
+command = '"' + transformdb + '" --old "' + testnew + '" --new "' + testnew + '" -f "' + checkxml + '" "' + \
+ check_dbdir + '" default.db "' + tmp_dbdir + '" '
TestUtil.spawn(command).waitTestSuccess()
diff --git a/cpp/test/Ice/enums/run.py b/cpp/test/Ice/enums/run.py
index ecadfca52b9..9d197cb0ea6 100755
--- a/cpp/test/Ice/enums/run.py
+++ b/cpp/test/Ice/enums/run.py
@@ -21,6 +21,8 @@ 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.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+
print("Running test with 1.1 encoding.")
TestUtil.clientServerTest()
diff --git a/cpp/test/Ice/exceptions/Test.ice b/cpp/test/Ice/exceptions/Test.ice
index 610c7b6bdf6..5338dac2414 100644
--- a/cpp/test/Ice/exceptions/Test.ice
+++ b/cpp/test/Ice/exceptions/Test.ice
@@ -18,9 +18,7 @@ interface Empty
interface Thrower;
-exception Base {};
-
-exception A extends Base
+exception A
{
int aMem;
};
@@ -70,7 +68,6 @@ module Mod
};
};
-
["ami"] interface Thrower
{
void shutdown();
diff --git a/cpp/test/Ice/exceptions/TestAMD.ice b/cpp/test/Ice/exceptions/TestAMD.ice
index f80e031a302..a5c4353e65b 100644
--- a/cpp/test/Ice/exceptions/TestAMD.ice
+++ b/cpp/test/Ice/exceptions/TestAMD.ice
@@ -18,9 +18,7 @@ interface Empty
interface Thrower;
-exception Base {};
-
-exception A extends Base
+exception A
{
int aMem;
};
diff --git a/cpp/test/Ice/exceptions/run.py b/cpp/test/Ice/exceptions/run.py
index 35ffcc8f6f7..cc6bc3d6d64 100755
--- a/cpp/test/Ice/exceptions/run.py
+++ b/cpp/test/Ice/exceptions/run.py
@@ -22,15 +22,27 @@ 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")
+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")
+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")
+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")
+TestUtil.clientServerTest(server="serveramd",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+
print("Running collocated test.")
TestUtil.collocatedTest()
diff --git a/cpp/test/Ice/objects/TestI.cpp b/cpp/test/Ice/objects/TestI.cpp
index 648dd4df0cf..70c325475bd 100644
--- a/cpp/test/Ice/objects/TestI.cpp
+++ b/cpp/test/Ice/objects/TestI.cpp
@@ -230,7 +230,7 @@ UnexpectedObjectExceptionTestI::ice_invoke(const std::vector<Ice::Byte>&,
{
Ice::CommunicatorPtr communicator = current.adapter->getCommunicator();
Ice::OutputStreamPtr out = Ice::createOutputStream(communicator);
- out->startEncapsulation();
+ out->startEncapsulation(current.encoding, Ice::DefaultFormat);
AlsoEmptyPtr ae = new AlsoEmpty;
out->write(ae);
out->writePendingObjects();
diff --git a/cpp/test/Ice/objects/run.py b/cpp/test/Ice/objects/run.py
index b71b37f48fd..abfd9232fad 100755
--- a/cpp/test/Ice/objects/run.py
+++ b/cpp/test/Ice/objects/run.py
@@ -22,9 +22,14 @@ 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")
+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")
+TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+
print("Running collocated test.")
TestUtil.collocatedTest()
diff --git a/cpp/test/Ice/servantLocator/AllTests.cpp b/cpp/test/Ice/servantLocator/AllTests.cpp
index ff26c1178e1..362116a9332 100644
--- a/cpp/test/Ice/servantLocator/AllTests.cpp
+++ b/cpp/test/Ice/servantLocator/AllTests.cpp
@@ -89,6 +89,9 @@ testExceptions(const TestIntfPrx& obj, bool collocated)
{
test(ex.unknown == "Test::TestIntfUserException");
}
+ catch(const Ice::OperationNotExistException&)
+ {
+ }
catch(...)
{
test(false);
@@ -101,7 +104,7 @@ testExceptions(const TestIntfPrx& obj, bool collocated)
}
catch(const UnknownLocalException& ex)
{
- test(ex.unknown.find("Ice::SocketException:\nsocket exception: unknown error") != string::npos);
+ test(ex.unknown.find("Ice::SocketException") != string::npos);
}
catch(...)
{
@@ -113,6 +116,9 @@ testExceptions(const TestIntfPrx& obj, bool collocated)
obj->stdException();
test(false);
}
+ catch(const Ice::OperationNotExistException&)
+ {
+ }
catch(const UnknownException& ex)
{
test(ex.unknown == "std::exception: Hello");
@@ -131,6 +137,9 @@ testExceptions(const TestIntfPrx& obj, bool collocated)
{
test(ex.unknown == "unknown c++ exception");
}
+ catch(const Ice::OperationNotExistException&)
+ {
+ }
catch(...)
{
test(false);
diff --git a/cpp/test/Ice/slicing/exceptions/run.py b/cpp/test/Ice/slicing/exceptions/run.py
index e5626d35421..b309d3fb701 100755
--- a/cpp/test/Ice/slicing/exceptions/run.py
+++ b/cpp/test/Ice/slicing/exceptions/run.py
@@ -22,9 +22,15 @@ import TestUtil
print("Running test with sliced format.")
TestUtil.clientServerTest()
+
print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.clientServerTest(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")
+
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.clientServerTest(server="serveramd",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
diff --git a/cpp/test/Ice/slicing/objects/run.py b/cpp/test/Ice/slicing/objects/run.py
index 7ebf7f11582..caafb5a934c 100755
--- a/cpp/test/Ice/slicing/objects/run.py
+++ b/cpp/test/Ice/slicing/objects/run.py
@@ -22,9 +22,15 @@ import TestUtil
print("Running test with sliced format.")
TestUtil.clientServerTest()
+
print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.clientServerTest(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")
+
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.clientServerTest(server="serveramd",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
diff --git a/cpp/test/Ice/stream/run.py b/cpp/test/Ice/stream/run.py
index 85ddafb614f..91717f869da 100755
--- a/cpp/test/Ice/stream/run.py
+++ b/cpp/test/Ice/stream/run.py
@@ -21,7 +21,9 @@ sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
client = os.path.join(os.getcwd(), "client")
+
print("Running test with default encoding...")
TestUtil.simpleTest(client)
+
print("Running test with 1.0 encoding...")
TestUtil.simpleTest(client, "--Ice.Default.EncodingVersion=1.0")