mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-21 15:33:53 +03:00
tests: Remove -module flag for mocks
macOS has two kinds of loadable libraries: MH_BUNDLE, and MH_DYLIB. bundle is used for plugins that are loaded with dlopen/dlsym/dlclose. And there's no way to preload a bundle into an application. dynamic linker (dyld) will reject it when finds it in DYLD_INSERT_LIBRARIES. Unfortunately, a bundle is built if -module flag is provided to libtool. The flag has been removed to build dylibs with ".dylib" suffix. Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
This commit is contained in:
committed by
Daniel P. Berrangé
parent
fde361083d
commit
647c65186a
@@ -119,8 +119,10 @@ int virTestMain(int argc,
|
||||
|
||||
#ifdef __APPLE__
|
||||
# define PRELOAD_VAR "DYLD_INSERT_LIBRARIES"
|
||||
# define MOCK_EXT ".dylib"
|
||||
#else
|
||||
# define PRELOAD_VAR "LD_PRELOAD"
|
||||
# define MOCK_EXT ".so"
|
||||
#endif
|
||||
|
||||
#define VIR_TEST_PRELOAD(lib) \
|
||||
@@ -148,8 +150,6 @@ int virTestMain(int argc,
|
||||
return virTestMain(argc, argv, func, __VA_ARGS__, NULL); \
|
||||
}
|
||||
|
||||
#define MOCK_EXT ".so"
|
||||
|
||||
#define VIR_TEST_MOCK(mock) (abs_builddir "/.libs/lib" mock "mock" MOCK_EXT)
|
||||
|
||||
virCapsPtr virTestGenericCapsInit(void);
|
||||
|
Reference in New Issue
Block a user