From 3714979427329d7e85708e586176a40e0f68ee42 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 9 Apr 2013 14:05:12 +0200 Subject: [PATCH] unit-tests: load all libstrongswan plugins in test-runner --- src/libstrongswan/tests/Makefile.am | 1 + src/libstrongswan/tests/test_runner.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/libstrongswan/tests/Makefile.am b/src/libstrongswan/tests/Makefile.am index 6b4ba2c552..eefb400fc9 100644 --- a/src/libstrongswan/tests/Makefile.am +++ b/src/libstrongswan/tests/Makefile.am @@ -10,6 +10,7 @@ test_runner_SOURCES = \ test_runner_CFLAGS = \ -I$(top_srcdir)/src/libstrongswan \ + -DPLUGINS=\""${s_plugins}\"" \ @COVERAGE_CFLAGS@ \ @CHECK_CFLAGS@ diff --git a/src/libstrongswan/tests/test_runner.c b/src/libstrongswan/tests/test_runner.c index 2cce42b274..3a9849ecc3 100644 --- a/src/libstrongswan/tests/test_runner.c +++ b/src/libstrongswan/tests/test_runner.c @@ -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()); -- 2.47.2