test(flatpak): point flatpak tests at the external plugin sources

Rewires the flatpak unit, integration and plugin-manager tests to compile
against plugins/flatpak-provider, and updates plugin-manager.test to treat
flatpak as a runtime-loaded plugin rather than a registered built-in.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
BlackAngelTV committed 2026-08-29 20:34:50 +02:00
1 parent bd13a1404b
commit e81f5ee0cd
2 files changed
+22 -14

No files matched your search

+12 -6
View File
@@ -46,14 +46,16 @@ add_executable(pacman-manager-test tests/pacman-manager.test.cpp src/pacman-mana
target_include_directories(pacman-manager-test PRIVATE include)
add_test(NAME pacman-manager-test COMMAND pacman-manager-test)
add_executable(flatpak-manager-test tests/flatpak-manager.test.cpp src/flatpak-manager.cpp)
target_include_directories(flatpak-manager-test PRIVATE include)
add_executable(flatpak-manager-test tests/flatpak-manager.test.cpp
plugins/flatpak-provider/flatpak-manager.cpp)
target_include_directories(flatpak-manager-test PRIVATE include plugins/flatpak-provider)
add_test(NAME flatpak-manager-test COMMAND flatpak-manager-test)
# Real end-to-end test of the Flatpak provider against the live flatpak CLI
# (installs and uninstalls a small app). Skipped when flatpak is missing.
add_executable(flatpak-integration-test tests/flatpak-integration.test.cpp src/flatpak-manager.cpp)
target_include_directories(flatpak-integration-test PRIVATE include)
add_executable(flatpak-integration-test tests/flatpak-integration.test.cpp
plugins/flatpak-provider/flatpak-manager.cpp)
target_include_directories(flatpak-integration-test PRIVATE include plugins/flatpak-provider)
add_test(NAME flatpak-integration-test COMMAND flatpak-integration-test)
add_executable(package-utils-test tests/package-utils.test.cpp)
@@ -64,8 +66,9 @@ add_test(NAME package-utils-test COMMAND package-utils-test)
# built next to the test binary, so it is only enabled with the plugin option.
if(FWS_BUILD_EXAMPLE_PLUGIN)
add_executable(plugin-manager-test tests/plugin-manager.test.cpp
src/plugin-manager.cpp src/pacman-manager.cpp src/flatpak-manager.cpp)
target_include_directories(plugin-manager-test PRIVATE include)
src/plugin-manager.cpp src/pacman-manager.cpp
plugins/flatpak-provider/flatpak-manager.cpp)
target_include_directories(plugin-manager-test PRIVATE include plugins/flatpak-provider)
target_link_libraries(plugin-manager-test PRIVATE Qt6::Core)
add_dependencies(plugin-manager-test example-provider-plugin)
add_custom_command(TARGET plugin-manager-test POST_BUILD
@@ -73,6 +76,9 @@ if(FWS_BUILD_EXAMPLE_PLUGIN)
$<TARGET_FILE_DIR:plugin-manager-test>/plugins
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:example-provider-plugin>
$<TARGET_FILE_DIR:plugin-manager-test>/plugins/
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:flatpak-provider-plugin>
$<TARGET_FILE_DIR:plugin-manager-test>/plugins/)
add_test(NAME plugin-manager-test COMMAND plugin-manager-test)
endif()