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.master
parent
eb50358b72
commit
26e069d6cd
|
@ -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>)
|
||||
|
||||
###
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue