summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-05-03 09:03:13 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-05-03 09:03:13 +0200
commitff20dd34f91fecfc351804605b822999cde0e593 (patch)
tree9abce46a1d5403ad64bf350f6d2b5509a91e7eb6 /cpp/test
parentFix to no longer recursively try endpoints on connection establishment (diff)
downloadice-ff20dd34f91fecfc351804605b822999cde0e593.tar.bz2
ice-ff20dd34f91fecfc351804605b822999cde0e593.tar.xz
ice-ff20dd34f91fecfc351804605b822999cde0e593.zip
AIX port
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/operations/Makefile7
-rwxr-xr-xcpp/test/Ice/properties/run.py9
-rw-r--r--cpp/test/Ice/stringConverter/Client.cpp22
-rw-r--r--cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp5
-rw-r--r--cpp/test/IceSSL/configuration/AllTests.cpp8
-rwxr-xr-xcpp/test/IceSSL/configuration/run.py2
-rwxr-xr-xcpp/test/Slice/headers/run.py1
7 files changed, 48 insertions, 6 deletions
diff --git a/cpp/test/Ice/operations/Makefile b/cpp/test/Ice/operations/Makefile
index f19a50642a5..2cfbc69f2d5 100644
--- a/cpp/test/Ice/operations/Makefile
+++ b/cpp/test/Ice/operations/Makefile
@@ -54,7 +54,12 @@ OBJS = $(COBJS) \
include $(top_srcdir)/config/Make.rules
-CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+
+ifeq ($(XLC_COMPILER),yes)
+ CPPFLAGS := -qsuppress="1540-0895" $(CPPFLAGS)
+endif
+
$(CLIENT): $(COBJS)
rm -f $@
diff --git a/cpp/test/Ice/properties/run.py b/cpp/test/Ice/properties/run.py
index e50cca27fe7..3a4d9e21d24 100755
--- a/cpp/test/Ice/properties/run.py
+++ b/cpp/test/Ice/properties/run.py
@@ -9,7 +9,7 @@
#
# **********************************************************************
-import os, sys
+import os, sys, locale
path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
head = os.path.dirname(sys.argv[0])
@@ -23,6 +23,13 @@ import TestUtil
client = os.path.join(os.getcwd(), "client")
+if TestUtil.isAIX():
+ encoding = locale.getdefaultlocale()[1]
+ if encoding != "UTF-8":
+ print("Please set LC_ALL to xx_xx.UTF-8, for example FR_FR.UTF-8")
+ print("Skipping test")
+ sys.exit(0)
+
#
# Write config
#
diff --git a/cpp/test/Ice/stringConverter/Client.cpp b/cpp/test/Ice/stringConverter/Client.cpp
index 89530b5b45b..c43a6454dd3 100644
--- a/cpp/test/Ice/stringConverter/Client.cpp
+++ b/cpp/test/Ice/stringConverter/Client.cpp
@@ -63,6 +63,28 @@ main(int argc, char* argv[])
IceUtil::setProcessStringConverter(new IceUtil::IconvStringConverter<char>("iso815"));
}
IceUtil::setProcessWstringConverter(new IceUtil::IconvStringConverter<wchar_t>("ucs4"));
+
+#elif defined(_AIX)
+
+ // Always big-endian
+
+ if(useLocale)
+ {
+ IceUtil::setProcessStringConverter(new IceUtil::IconvStringConverter<char>());
+ }
+ else
+ {
+ IceUtil::setProcessStringConverter(new IceUtil::IconvStringConverter<char>("ISO8859-15"));
+ }
+
+ if(sizeof(wchar_t) == 4)
+ {
+ IceUtil::setProcessWstringConverter(new IceUtil::IconvStringConverter<wchar_t>("UTF-32"));
+ }
+ else
+ {
+ IceUtil::setProcessWstringConverter(new IceUtil::IconvStringConverter<wchar_t>("UTF-16"));
+ }
#else
if(useLocale)
diff --git a/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp b/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp
index 9fcc117d627..6172e9e689e 100644
--- a/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp
+++ b/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp
@@ -52,8 +52,11 @@ public:
{
test(_facade->getApplicationInfo(_facade->getAdapterApplication(*p)).descriptor.name == "Test");
test(_facade->getServerInfo(_facade->getAdapterServer(*p)).application == "Test");
- test(_facade->getNodeInfo(_facade->getAdapterNode(*p)).name == "localnode");
+ test(_facade->getNodeInfo(_facade->getAdapterNode(*p)).name == "localnode");
+#ifndef _AIX
+ // On AIX, icegridnode needs read permissions on /dev/kmem
test(_facade->getNodeLoad(_facade->getAdapterNode(*p)).avg1 >= 0.0);
+#endif
test(_facade->getAdapterInfo(*p)[0].replicaGroupId == id);
test(_facade->getPropertyForAdapter(*p, "Identity") == id);
}
diff --git a/cpp/test/IceSSL/configuration/AllTests.cpp b/cpp/test/IceSSL/configuration/AllTests.cpp
index 4a0cad36e52..d0235809622 100644
--- a/cpp/test/IceSSL/configuration/AllTests.cpp
+++ b/cpp/test/IceSSL/configuration/AllTests.cpp
@@ -2024,9 +2024,9 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12, b
#endif
//
- // No DSA support in Secure Transport.
+ // No DSA support in Secure Transport / AIX 7.1
//
-#ifndef ICE_USE_SECURE_TRANSPORT
+#if !defined(ICE_USE_SECURE_TRANSPORT) && !defined(_AIX)
{
//
@@ -3192,6 +3192,9 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12, b
#endif
}
+#ifndef _AIX
+ // On AIX 6.1, the default root certificates don't validate demo.zeroc.com
+
cout << "testing system CAs... " << flush;
{
InitializationData initData;
@@ -3236,6 +3239,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12, b
comm->destroy();
}
cout << "ok" << endl;
+#endif
if(shutdown)
{
diff --git a/cpp/test/IceSSL/configuration/run.py b/cpp/test/IceSSL/configuration/run.py
index 07e001c4fdc..fea76d43f3f 100755
--- a/cpp/test/IceSSL/configuration/run.py
+++ b/cpp/test/IceSSL/configuration/run.py
@@ -43,7 +43,7 @@ if TestUtil.isDarwin():
os.system("security create-keychain -p password %s" % keychainPath)
for cert in ["s_rsa_ca1.p12", "c_rsa_ca1.p12"]:
os.system("security import %s -f pkcs12 -A -P password -k %s" % (os.path.join(certsPath, cert), keychainPath))
-elif TestUtil.isLinux():
+elif TestUtil.isLinux() or TestUtil.isAIX():
#
# Create copies of the CA certificates named after the subject
# hash. This is used by the tests to find the CA certificates in
diff --git a/cpp/test/Slice/headers/run.py b/cpp/test/Slice/headers/run.py
index 6950839019d..907e9c937b4 100755
--- a/cpp/test/Slice/headers/run.py
+++ b/cpp/test/Slice/headers/run.py
@@ -37,6 +37,7 @@ os.symlink("a3.ice", os.path.join("slices", "dir1", "linktoa3.ice"))
os.symlink("dir2", os.path.join("slices", "linktodir2"))
slice2cpp = TestUtil.getSliceTranslator()
+TestUtil.addLdPath(TestUtil.getCppLibDir())
basedir = os.path.dirname(os.path.abspath(__file__))
slicedir = TestUtil.getSliceDir()