From f3b4ee3b5f010c5305d2cbf8436e6634910f5983 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 17 Apr 2022 18:37:18 +0200 Subject: [PATCH] Skip dynamic library file existence check under Darwin Under Monterrey (macOS 10.12) we can actually load the file using wxDynamicLibrary even though it does _not_ exist on the disk, so don't skip the test just because of this. --- tests/misc/dynamiclib.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/misc/dynamiclib.cpp b/tests/misc/dynamiclib.cpp index 8db9f254ba..99aca1bf74 100644 --- a/tests/misc/dynamiclib.cpp +++ b/tests/misc/dynamiclib.cpp @@ -58,12 +58,16 @@ void DynamicLibraryTestCase::Load() #endif static const wxChar *FUNC_NAME = wxT("strlen"); + // Under macOS 12+ we can actually load the libc dylib even though the + // corresponding file doesn't exist on disk, so skip this check there. +#ifndef __DARWIN__ if ( !wxFileName::Exists(LIB_NAME) ) { WARN("Shared library \"" << wxString(LIB_NAME) << "\" doesn't exist, " "skipping DynamicLibraryTestCase::Load() test."); return; } +#endif // !__DARWIN__ #else #error "don't know how to test wxDllLoader on this platform" #endif