vici: Make unit-tests independent from libcharon and libhydra
authorMartin Willi <martin@revosec.ch>
Thu, 3 Apr 2014 14:41:45 +0000 (16:41 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 7 May 2014 12:13:37 +0000 (14:13 +0200)
Fixes monolithic build, as we can't depend on the not yet built libcharon.

src/libcharon/plugins/vici/Makefile.am
src/libcharon/plugins/vici/vici_socket.c
src/libcharon/plugins/vici/vici_tests.c

index 370f8c5..df241dc 100644 (file)
@@ -61,7 +61,5 @@ vici_tests_CFLAGS = \
 
 vici_tests_LDFLAGS = @COVERAGE_LDFLAGS@
 vici_tests_LDADD = \
-       $(top_builddir)/src/libcharon/libcharon.la \
-       $(top_builddir)/src/libhydra/libhydra.la \
        $(top_builddir)/src/libstrongswan/libstrongswan.la \
        $(top_builddir)/src/libstrongswan/tests/libtest.la
index fa44c70..5a0fc81 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "vici_socket.h"
 
-#include <daemon.h>
 #include <threading/mutex.h>
 #include <threading/condvar.h>
 #include <threading/thread.h>
index ec5afa4..434aa5e 100644 (file)
@@ -32,17 +32,10 @@ static test_configuration_t tests[] = {
 
 static bool test_runner_init(bool init)
 {
-       if (init)
-       {
-               libhydra_init("vici-tests");
-               libcharon_init("vici-tests");
-       }
-       else
+       if (!init)
        {
                lib->processor->set_threads(lib->processor, 0);
                lib->processor->cancel(lib->processor);
-               libcharon_deinit();
-               libhydra_deinit();
        }
        return TRUE;
 }