unit-tests: load all libstrongswan plugins in test-runner
authorMartin Willi <martin@revosec.ch>
Tue, 9 Apr 2013 12:05:12 +0000 (14:05 +0200)
committerMartin Willi <martin@revosec.ch>
Fri, 21 Jun 2013 08:53:20 +0000 (10:53 +0200)
src/libstrongswan/tests/Makefile.am
src/libstrongswan/tests/test_runner.c

index 6b4ba2c..eefb400 100644 (file)
@@ -10,6 +10,7 @@ test_runner_SOURCES = \
 
 test_runner_CFLAGS = \
   -I$(top_srcdir)/src/libstrongswan \
+  -DPLUGINS=\""${s_plugins}\"" \
   @COVERAGE_CFLAGS@ \
   @CHECK_CFLAGS@
 
index 2cce42b..3a9849e 100644 (file)
@@ -32,6 +32,12 @@ int main()
 
        library_init(NULL);
 
+       if (!lib->plugins->load(lib->plugins, NULL, PLUGINS))
+       {
+               library_deinit();
+               return EXIT_FAILURE;
+       }
+
        sr = srunner_create(NULL);
        srunner_add_suite(sr, bio_reader_suite_create());
        srunner_add_suite(sr, bio_writer_suite_create());