test(config): add test for consistent config (#4215)

This commit is contained in:
ReenigneArcher 2025-08-31 09:57:03 -04:00 committed by GitHub
commit 14fc19ddbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 722 additions and 27 deletions

View file

@ -52,6 +52,24 @@ add_executable(${PROJECT_NAME}
${TEST_SOURCES}
${SUNSHINE_SOURCES})
# Copy files needed for config consistency tests to build directory
# This ensures both CLI and CLion can access the same files relative to the test executable
# Using configure_file ensures files are copied when they change between builds
set(CONFIG_TEST_FILES
"src/config.cpp"
"src_assets/common/assets/web/config.html"
"docs/configuration.md"
"src_assets/common/assets/web/public/assets/locale/en.json"
)
foreach(file ${CONFIG_TEST_FILES})
configure_file(
"${CMAKE_SOURCE_DIR}/${file}"
"${CMAKE_CURRENT_BINARY_DIR}/${file}"
COPYONLY
)
endforeach()
foreach(dep ${SUNSHINE_TARGET_DEPENDENCIES})
add_dependencies(${PROJECT_NAME} ${dep}) # compile these before sunshine
endforeach()