File tree Expand file tree Collapse file tree 3 files changed +377
-1
lines changed Expand file tree Collapse file tree 3 files changed +377
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ You need to prefix commands with `C:\msys64\msys2_shell.cmd -defterm -here -no-s
33
44Prefix build directories with ` cmake-build- ` .
55
6- The test executable is named ` test_sunshine `
6+ The test executable is named ` test_sunshine ` and will be located inside the ` tests ` directory within
7+ the build directory.
8+
9+ The project uses gtest as a test framework.
710
811Always follow the style guidelines defined in .clang-format for c/c++ code.
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ set(CONFIG_TEST_FILES
6060 "src_assets/common/assets/web/config.html"
6161 "docs/configuration.md"
6262 "src_assets/common/assets/web/public/assets/locale/en.json"
63+ "src_assets/common/assets/web/configs/tabs/General.vue"
6364)
6465
6566foreach (file ${CONFIG_TEST_FILES} )
@@ -70,10 +71,25 @@ foreach(file ${CONFIG_TEST_FILES})
7071 )
7172endforeach ()
7273
74+ # Copy all locale files for locale consistency tests
75+ # Use a custom command to properly handle both adding and removing files
76+ set (LOCALE_SRC_DIR "${CMAKE_SOURCE_DIR} /src_assets/common/assets/web/public/assets/locale" )
77+ set (LOCALE_DST_DIR "${CMAKE_CURRENT_BINARY_DIR} /src_assets/common/assets/web/public/assets/locale" )
78+ add_custom_target (sync_locale_files ALL
79+ COMMAND ${CMAKE_COMMAND} -E rm -rf "${LOCALE_DST_DIR} "
80+ COMMAND ${CMAKE_COMMAND} -E make_directory "${LOCALE_DST_DIR} "
81+ COMMAND ${CMAKE_COMMAND} -E copy_directory "${LOCALE_SRC_DIR} " "${LOCALE_DST_DIR} "
82+ COMMENT "Synchronizing locale files for tests"
83+ VERBATIM
84+ )
85+
7386foreach (dep ${SUNSHINE_TARGET_DEPENDENCIES} )
7487 add_dependencies (${PROJECT_NAME} ${dep} ) # compile these before sunshine
7588endforeach ()
7689
90+ # Ensure locale files are synchronized before building the test executable
91+ add_dependencies (${PROJECT_NAME} sync_locale_files)
92+
7793set_target_properties (${PROJECT_NAME} PROPERTIES CXX_STANDARD 23)
7894target_link_libraries (${PROJECT_NAME}
7995 ${SUNSHINE_EXTERNAL_LIBRARIES}
You can’t perform that action at this time.
0 commit comments