Verified Commit 26e069d6 authored by A. Wilcox's avatar A. Wilcox
Browse files

Tests: Fix backend loading for tests

Using $<TARGET_FILE> we receive the entire plugin file path, leading to
errors such as:

kf.coreaddons: no metadata found in "kpmcore//home/awilcox/Code/KDE/kpmcore/bin/kpmcore/pmdummybackendplugin.so" "The shared library was not found."

Using $<TARGET_FILE_NAME> instead we are able to have just the plugin
name, which does load properly.  The tests now pass.
parent eb50358b
Pipeline #189460 passed with stage
in 1 minute and 19 seconds
......@@ -34,15 +34,15 @@ endmacro()
# Tests of initialization: try explicitly loading some backends
kpm_test(testinit testinit.cpp) # Default backend
if(TARGET pmdummybackendplugin)
add_test(NAME testinit-dummy COMMAND testinit $<TARGET_FILE:pmdummybackendplugin>)
add_test(NAME testinit-dummy COMMAND testinit $<TARGET_FILE_NAME:pmdummybackendplugin>)
endif()
if(TARGET pmsfdiskbackendplugin)
add_test(NAME testinit-sfdisk COMMAND testinit $<TARGET_FILE:pmsfdiskbackendplugin>)
add_test(NAME testinit-sfdisk COMMAND testinit $<TARGET_FILE_NAME:pmsfdiskbackendplugin>)
else()
return() # All the rest really needs a working backend
endif()
set(BACKEND $<TARGET_FILE:pmsfdiskbackendplugin>)
set(BACKEND $<TARGET_FILE_NAME:pmsfdiskbackendplugin>)
###
#
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment