summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-09 10:03:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-09 13:40:54 +0100
commit69f8a4cc1022edb386ae985cd39f0518d21a89d1 (patch)
tree008f78a86e71336afc51a0bce8b3b7f6ad09ed89 /sal
parent430747397508f297be7ae1fa734a43ea705e9a43 (diff)
disable environment equality test under valgrind
Change-Id: I9e0e06331f134fe89c9942f93b7546b0e67bb821
Diffstat (limited to 'sal')
-rw-r--r--sal/CppunitTest_sal_osl_process.mk4
-rw-r--r--sal/qa/osl/process/osl_process.cxx16
2 files changed, 20 insertions, 0 deletions
diff --git a/sal/CppunitTest_sal_osl_process.mk b/sal/CppunitTest_sal_osl_process.mk
index b6688d75278c..6c254d9d0730 100644
--- a/sal/CppunitTest_sal_osl_process.mk
+++ b/sal/CppunitTest_sal_osl_process.mk
@@ -19,6 +19,10 @@ $(eval $(call gb_CppunitTest_use_libraries,sal_osl_process,\
$(gb_UWINAPI) \
))
+$(eval $(call gb_CppunitTest_use_externals,sal_osl_process,\
+ valgrind \
+))
+
$(eval $(call gb_CppunitTest_use_executable,sal_osl_process,osl_process_child))
# vim: set noet sw=4 ts=4:
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 4713e5f48a98..b0ef7813cf5e 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -37,6 +37,10 @@
#include <osl/module.hxx>
#include <sal/macros.h>
+#if defined HAVE_VALGRIND_HEADERS
+#include <valgrind/memcheck.h>
+#endif
+
#if ( defined WNT ) // Windows
# include <windows.h>
# include <tchar.h>
@@ -363,6 +367,12 @@ public:
osl_freeProcessHandle(process);
+#if defined HAVE_VALGRIND_HEADERS
+ //valgrind makes these not match
+ if (RUNNING_ON_VALGRIND)
+ return;
+#endif
+
CPPUNIT_ASSERT_MESSAGE
(
"Parent and child environment not equal",
@@ -421,6 +431,12 @@ public:
different_child_env_vars.push_back(ENV2);
different_child_env_vars.push_back(ENV4);
+#if defined HAVE_VALGRIND_HEADERS
+ //valgrind makes these not match
+ if (RUNNING_ON_VALGRIND)
+ return;
+#endif
+
CPPUNIT_ASSERT_MESSAGE
(
"osl_execProc_merged_child_environment",