From: Martin Willi Date: Tue, 9 Apr 2013 12:05:12 +0000 (+0200) Subject: unit-tests: load all libstrongswan plugins in test-runner X-Git-Tag: 5.1.0dr1~97^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3714979427329d7e85708e586176a40e0f68ee42;p=thirdparty%2Fstrongswan.git unit-tests: load all libstrongswan plugins in test-runner --- 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());