summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-08-26 22:33:25 +0200
committerJose <jose@zeroc.com>2015-08-26 22:33:25 +0200
commita5bb3c2078c448ecc47a231dde150060cdf6a39a (patch)
tree611d1982ae70441b8dcccc7f8532c05d50b2e65e /cpp/test
parentFixed ICE-6725 - value demo python crash w/ python 2.7 on Windows (diff)
downloadice-a5bb3c2078c448ecc47a231dde150060cdf6a39a.tar.bz2
ice-a5bb3c2078c448ecc47a231dde150060cdf6a39a.tar.xz
ice-a5bb3c2078c448ecc47a231dde150060cdf6a39a.zip
priority test fixes
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/IceUtil/priority/Client.cpp4
-rw-r--r--cpp/test/IceUtil/priority/TestSuite.cpp7
2 files changed, 10 insertions, 1 deletions
diff --git a/cpp/test/IceUtil/priority/Client.cpp b/cpp/test/IceUtil/priority/Client.cpp
index f641d603638..1d04889596c 100644
--- a/cpp/test/IceUtil/priority/Client.cpp
+++ b/cpp/test/IceUtil/priority/Client.cpp
@@ -25,7 +25,11 @@ namespace IceUtil
ICE_UTIL_API MutexProtocol
getDefaultMutexProtocol()
{
+# if defined(_POSIX_THREAD_PRIO_INHERIT) && _POSIX_THREAD_PRIO_INHERIT > 0
return PrioInherit;
+# else
+ return PrioNone;
+# endif
}
}
diff --git a/cpp/test/IceUtil/priority/TestSuite.cpp b/cpp/test/IceUtil/priority/TestSuite.cpp
index 763346a63df..4e0c8701df7 100644
--- a/cpp/test/IceUtil/priority/TestSuite.cpp
+++ b/cpp/test/IceUtil/priority/TestSuite.cpp
@@ -8,6 +8,8 @@
// **********************************************************************
+#include <IceUtil/MutexProtocol.h>
+
#include <TestSuite.h>
#include <ThreadPriority.h>
#include <TimerPriority.h>
@@ -20,5 +22,8 @@ initializeTestSuite()
{
allTests.push_back(new ThreadPriorityTest);
allTests.push_back(new TimerPriorityTest);
- allTests.push_back(new PriorityInversionTest);
+ if(IceUtil::getDefaultMutexProtocol() == IceUtil::PrioInherit)
+ {
+ allTests.push_back(new PriorityInversionTest);
+ }
}