Skip to content

Commit 323c312

Browse files
jktjktmichalvasko
authored andcommitted
tests: Plugins are not supported on Windows, yet
For some reason the dlopen() always fails, like this: [ RUN ] test_add_simple libyang[2]: Searching for "ietf-yang-types" in "D:\a\oopt-gnpy-libyang\build\libyang\tests\utests". libyang[2]: Newer revision than "ietf-yang-types@2013-07-15" not found, using this as the latest revision. libyang[2]: Searching for "ietf-inet-types" in "D:\a\oopt-gnpy-libyang\build\libyang\tests\utests". libyang[2]: Newer revision than "ietf-inet-types@2013-07-15" not found, using this as the latest revision. libyang[0]: Loading "D:/a/oopt-gnpy-libyang/build/libyang/out-plugins/Release/plugin_simple.dll" as a plugin failed ("D:\a\oopt-gnpy-libyang\build\libyang\out-plugins\Release\plugin_simple.dll": The specified module could not be found.). [ ERROR ] --- 0x0 != 0x2 [ LINE ] --- D:\a\oopt-gnpy-libyang\oopt-gnpy-libyang\libyang\tests\utests\basic\test_plugins.c:50: error: Failure! [ FAILED ] test_add_simple Rather than trying to debug this on a platform that I don't really know, let's declare plugins as not supported on Windows.
1 parent 34bb928 commit 323c312

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/plugins.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ lyplg_add(const char *pathname)
494494

495495
LOGERR(NULL, LY_EINVAL, "Plugins are not supported in statically built library.");
496496
return LY_EINVAL;
497+
#elif defined (_WIN32)
498+
(void)pathname;
499+
500+
LOGERR(NULL, LY_EINVAL, "Plugins are not (yet) supported on Windows.");
501+
return LY_EINVAL;
497502
#else
498503
LY_ERR ret = LY_SUCCESS;
499504

tests/utests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ ly_add_utest(NAME set SOURCES basic/test_set.c)
4646
ly_add_utest(NAME hash_table SOURCES basic/test_hash_table.c)
4747
ly_add_utest(NAME inout SOURCES basic/test_inout.c)
4848
ly_add_utest(NAME context SOURCES basic/test_context.c)
49+
if(NOT WIN32)
4950
ly_add_utest(NAME plugins SOURCES basic/test_plugins.c)
51+
endif()
5052
ly_add_utest(NAME xml SOURCES basic/test_xml.c)
5153
ly_add_utest(NAME json SOURCES basic/test_json.c)
5254
ly_add_utest(NAME xpath SOURCES basic/test_xpath.c)

0 commit comments

Comments
 (0)