unit-tests: Make sure plugins in the builddir are loaded
authorTobias Brunner <tobias@strongswan.org>
Fri, 9 May 2014 11:28:06 +0000 (13:28 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 19 May 2014 12:06:43 +0000 (14:06 +0200)
When running the tests in GDB the working directory apparently is
different.  With the relative path used previously the plugins would not
be found and those installed on the system would get used.

src/libstrongswan/tests/Makefile.am
src/libtls/tests/Makefile.am

index 331a548..b5fb45a 100644 (file)
@@ -52,7 +52,7 @@ tests_SOURCES = tests.h tests.c \
 tests_CFLAGS = \
   -I$(top_srcdir)/src/libstrongswan \
   -I$(top_srcdir)/src/libstrongswan/tests \
-  -DPLUGINDIR=\""$(top_builddir)/src/libstrongswan/plugins\"" \
+  -DPLUGINDIR=\""$(abs_top_builddir)/src/libstrongswan/plugins\"" \
   -DPLUGINS=\""${s_plugins}\"" \
   @COVERAGE_CFLAGS@
 
index 1c0e2f9..456383f 100644 (file)
@@ -11,7 +11,7 @@ tls_tests_CFLAGS = \
        -I$(top_srcdir)/src/libtls \
        -I$(top_srcdir)/src/libstrongswan \
        -I$(top_srcdir)/src/libstrongswan/tests \
-       -DPLUGINDIR=\""$(top_builddir)/src/libstrongswan/plugins\"" \
+       -DPLUGINDIR=\""$(abs_top_builddir)/src/libstrongswan/plugins\"" \
        -DPLUGINS=\""${s_plugins}\"" \
        @COVERAGE_CFLAGS@