From e282b73a5b02ad1dc867467c6811642aaac4f235 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 24 Oct 2012 23:13:38 +0000 Subject: [PATCH] Test for the shared library existence in DynamicLibraryTestCase. Trying to understand why does the test fail in some build slaves builds. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/misc/dynamiclib.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/misc/dynamiclib.cpp b/tests/misc/dynamiclib.cpp index acd16c4e47..7f69dc53b2 100644 --- a/tests/misc/dynamiclib.cpp +++ b/tests/misc/dynamiclib.cpp @@ -19,6 +19,10 @@ #include "wx/dynlib.h" +#ifdef __UNIX__ + #include "wx/filename.h" +#endif + // ---------------------------------------------------------------------------- // test class // ---------------------------------------------------------------------------- @@ -57,6 +61,13 @@ void DynamicLibraryTestCase::Load() static const wxChar *LIB_NAME = wxT("/lib/libc.so.6"); #endif static const wxChar *FUNC_NAME = wxT("strlen"); + + if ( !wxFileName::Exists(LIB_NAME) ) + { + wxLogWarning("Shared library \"%s\" doesn't exist, " + "skipping DynamicLibraryTestCase::Load() test."); + return; + } #else #error "don't know how to test wxDllLoader on this platform" #endif -- 2.45.2