From a59ce8331a868aa4214241b1395b2af395afed27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 4 Jul 2017 22:11:14 +0200 Subject: [PATCH] tests: load plugins from build directory instead of installed libdir This allows to run tests without running "make install". --- tests/CMakeLists.txt | 2 ++ tests/tests.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cffec7ffb..77ef7ec3d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -75,3 +75,5 @@ add_dependencies(tests add_test(NAME unit WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND tests -v) +set_property(TEST unit PROPERTY + ENVIRONMENT "WEECHAT_TESTS_ARGS=-p -r '/set weechat.plugin.path \"${PROJECT_BINARY_DIR}/src/plugins\"'") diff --git a/tests/tests.cpp b/tests/tests.cpp index 098feea65..226206d66 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -160,6 +160,9 @@ main (int argc, char *argv[]) /* display WeeChat version */ input_data (gui_buffer_search_main (), "/command core version"); + /* auto-load plugins, only from path in option weechat.plugin.path */ + plugin_auto_load (0, NULL, 1, 0); + /* run all tests */ printf ("\n"); printf (">>>>>>>>>> TESTS >>>>>>>>>>\n");