From 6ef406542c77671f199c0978c8dfc5f267613ff7 Mon Sep 17 00:00:00 2001 From: Henrique Reis Neves <39978017+NevesHenry@users.noreply.github.com> Date: Tue, 6 Oct 2026 14:56:48 -0300 Subject: [PATCH] tests: make kyty_tests build and run every test without LTO (#1110) avplayer_file_tests compiles libs/avPlayer.cpp into the test, and its PRINT_NAME() calls Loader::Timer::GetTimeMs(). Add loader/timer.cpp to the target, like the other tests that compile HLE library sources. CI links the test with LTO, which drops the unused reference, so the failure only shows in non-LTO builds such as the README's no-Qt instructions. Clang with libstdc++ rejects optional::emplace() with no arguments in ShaderRecompilerComputeTests.cpp. Assign the descriptor the same way the neighbouring test does. trophy_system is registered with ctest but kyty_tests did not build its executable, so ctest reported it as Not Run. Co-authored-by: Claude Opus 5.5 (1M context) --- CMakeLists.txt | 6 +++++- tests/ShaderRecompilerComputeTests.cpp | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3fc47da..54d16556 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -419,7 +419,10 @@ add_executable(trophy_system_tests EXCLUDE_FROM_ALL target_link_libraries(trophy_system_tests common) target_include_directories(trophy_system_tests PRIVATE ${inc_headers}) -add_executable(avplayer_file_tests EXCLUDE_FROM_ALL "${KYTY_TESTS_DIR}/AvPlayerFileTests.cpp") +add_executable(avplayer_file_tests EXCLUDE_FROM_ALL + "${KYTY_TESTS_DIR}/AvPlayerFileTests.cpp" + "${KYTY_SOURCE_DIR}/loader/timer.cpp" +) target_link_libraries(avplayer_file_tests common FFmpeg::ffmpeg ZArchive::zarchive) target_include_directories(avplayer_file_tests PRIVATE ${inc_headers}) @@ -689,6 +692,7 @@ if(BUILD_TESTING) memory_tracker_tests page_manager_tests archive_file_tests + trophy_system_tests avplayer_file_tests bit_array_tests lru_cache_tests diff --git a/tests/ShaderRecompilerComputeTests.cpp b/tests/ShaderRecompilerComputeTests.cpp index e6b6d86c..34e56f13 100644 --- a/tests/ShaderRecompilerComputeTests.cpp +++ b/tests/ShaderRecompilerComputeTests.cpp @@ -33541,7 +33541,8 @@ void CheckIndirectBufferStore(VulkanHarness &vulkan) { candidate.indirect_search_iterations = 0; candidate.indirect_resources.clear(); program.descriptor_sources.resize(1); - program.descriptor_sources[0].indirect_descriptor.emplace().table_stride = 16; + program.descriptor_sources[0].indirect_descriptor = + DescriptorSource::IndirectDescriptor{.table_stride = 16}; ShaderComputeInputInfo compute; compute.wave_size = 32; compute.host_subgroup_size = vulkan.SubgroupSize();