From 083434f6951b2bd5de81c67d96cd94d8fb793c68 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 11 Dec 2012 16:48:39 +0000 Subject: [PATCH] eeze: Make sure we use the modules from the current build for make check. Befoe this we always used the installed modules from the system. That is often fine but there are cases we would need the local. un-installed, modules. The coverage check is a example. The system modules normally don't had the options for coverage enabled and thus would not produce anything for the modules. Default still stays as it was. You would need to set an env var to use the local modules. SVN revision: 80670 --- legacy/eeze/Makefile.am | 6 +++--- legacy/eeze/src/lib/Makefile.am | 1 + legacy/eeze/src/lib/eeze_sensor.c | 11 ++++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/legacy/eeze/Makefile.am b/legacy/eeze/Makefile.am index 8f2609cdf9..8af59fd855 100644 --- a/legacy/eeze/Makefile.am +++ b/legacy/eeze/Makefile.am @@ -60,9 +60,9 @@ lcov-report: @echo "Coverage Report at $(top_builddir)/coverage/html" check-local: - @$(MAKE) lcov-reset - @./src/tests/eeze_suite - @$(MAKE) lcov-report + @$(MAKE) $(AM_MAKEFLAGS) lcov-reset + @EEZE_USE_IN_TREE_MODULES=1 ./src/tests/eeze_suite + @$(MAKE) $(AM_MAKEFLAGS) lcov-report else diff --git a/legacy/eeze/src/lib/Makefile.am b/legacy/eeze/src/lib/Makefile.am index cadc46071c..0b4ec330e8 100644 --- a/legacy/eeze/src/lib/Makefile.am +++ b/legacy/eeze/src/lib/Makefile.am @@ -1,6 +1,7 @@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = @EEZE_CFLAGS@ \ +-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" includes_HEADERS = Eeze.h Eeze_Net.h Eeze_Sensor.h diff --git a/legacy/eeze/src/lib/eeze_sensor.c b/legacy/eeze/src/lib/eeze_sensor.c index 77508ba248..7122514876 100644 --- a/legacy/eeze/src/lib/eeze_sensor.c +++ b/legacy/eeze/src/lib/eeze_sensor.c @@ -66,9 +66,14 @@ eeze_sensor_obj_get(Eeze_Sensor_Type sensor_type) static void eeze_sensor_modules_load(void) { - /* Check for available runtime modules and load them */ - g_handle->modules_array = eina_module_list_get(NULL, PACKAGE_LIB_DIR "/eeze-sensor/", 0, NULL, NULL); - /* FIXME check for modules also in HOME and other locations */ + /* Check for available runtime modules and load them. In some cases the + * un-installed modules to be used from the local build dir. Coverage check + * is one of these items. We do load the modules from the builddir if the + * environment is set. Normal case is to use installed modules from system */ + if (getenv("EEZE_USE_IN_TREE_MODULES")) + g_handle->modules_array = eina_module_list_get(NULL, PACKAGE_BUILD_DIR "/src/modules/.libs/", 0, NULL, NULL); + else + g_handle->modules_array = eina_module_list_get(NULL, PACKAGE_LIB_DIR "/eeze-sensor/", 0, NULL, NULL); if (!g_handle->modules_array) {