1
0
Fork 0
mutter-performance-source/tests/unit
Neil Roberts e6fb1fb433 Use GModule instead of libdl to load unit test symbols
Previously the unit tests were using libdl without directly linking to
it. It looks like this ends up working because one of Cogl's
dependencies ends up pulling adding -ldl via libtool. However in some
configurations it looks like this wasn't happening.

To avoid this problem we can just use GModule to resolve the symbols.
g_module_open is documented to return a handle to the ‘main program’
when NULL is passed as the filename and looking at the code it seems
that this ends up using RTLD_DEFAULT so it will have the same effect.

The in-tree copy of glib already has the code for gmodule so this
shouldn't cause problems for --disable-glib.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit b14ece116ed3e4b18d59b645e77b3449fac51137)
2013-06-12 15:04:54 +01:00
..
Makefile.am tests: Adds our first white-box unit test 2013-06-06 21:27:16 +01:00
test-unit-main.c Use GModule instead of libdl to load unit test symbols 2013-06-12 15:04:54 +01:00