refactor(cmake): streamline GUI test suite configuration
- Updated CMakeLists.txt to always include GUI test sources when tests are built, removing the conditional check for YAZE_ENABLE_UI_TESTS. - Added a headless test entry for the entire GUI suite, ensuring consistent execution without a GUI. Benefits: - Simplified configuration for GUI tests, enhancing clarity and usability. - Improved test execution flexibility by allowing headless operation.
This commit is contained in:
@@ -115,26 +115,26 @@ if(YAZE_BUILD_TESTS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# --- Experimental & GUI Test Suites ---
|
# --- Experimental & GUI Test Suites ---
|
||||||
if(YAZE_ENABLE_UI_TESTS)
|
# GUI tests always available when tests are built (uses ImGui Test Engine)
|
||||||
set(GUI_TEST_SOURCES
|
set(GUI_TEST_SOURCES
|
||||||
test_utils.cc
|
test_utils.cc
|
||||||
e2e/framework_smoke_test.cc
|
e2e/framework_smoke_test.cc
|
||||||
e2e/dungeon_editor_smoke_test.cc
|
e2e/dungeon_editor_smoke_test.cc
|
||||||
e2e/canvas_selection_test.cc
|
e2e/canvas_selection_test.cc
|
||||||
integration/ai/ai_gui_controller_test.cc
|
integration/ai/ai_gui_controller_test.cc
|
||||||
)
|
)
|
||||||
yaze_add_test_suite(yaze_test_gui "gui;experimental" ON ${GUI_TEST_SOURCES})
|
yaze_add_test_suite(yaze_test_gui "gui;experimental" ON ${GUI_TEST_SOURCES})
|
||||||
|
|
||||||
# Add a single test entry to run the entire GUI suite headlessly
|
# Add a single test entry to run the entire GUI suite headlessly
|
||||||
add_test(
|
add_test(
|
||||||
NAME headless_gui_suite
|
NAME headless_gui_suite
|
||||||
COMMAND $<TARGET_FILE:yaze_test_gui> -nogui
|
COMMAND $<TARGET_FILE:yaze_test_gui> -nogui
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
set_tests_properties(headless_gui_suite PROPERTIES LABELS "headless_gui;experimental")
|
set_tests_properties(headless_gui_suite PROPERTIES LABELS "headless_gui;experimental")
|
||||||
endif()
|
|
||||||
|
|
||||||
set(EXPERIMENTAL_TEST_SOURCES
|
set(EXPERIMENTAL_TEST_SOURCES
|
||||||
|
test_utils.cc
|
||||||
integration/ai/test_ai_tile_placement.cc
|
integration/ai/test_ai_tile_placement.cc
|
||||||
integration/ai/test_gemini_vision.cc
|
integration/ai/test_gemini_vision.cc
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user