Fix CI crash

This commit is contained in:
2026-07-16 16:21:18 +08:00
parent 9957577cb9
commit cb7e911c35
4 changed files with 25 additions and 5 deletions
+8 -1
View File
@@ -69,7 +69,14 @@ function(olive_add_test GROUP NAME SOURCE)
add_test("Olive.${GROUP}.${NAME}" ${NAME})
else()
add_test(${NAME} ${NAME})
endif()
endif()
if (WIN32)
# Windows has no RPATH: ffmpeg_bridge.dll must sit next to the executable
add_custom_command(TARGET ${NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:ffmpeg_bridge> $<TARGET_FILE_DIR:${NAME}>)
endif()
endfunction()
include(FetchContent)
+7
View File
@@ -128,3 +128,10 @@ if (MSVC)
else()
add_test(olive-gtest olive-gtest)
endif()
if (WIN32)
# Windows has no RPATH: ffmpeg_bridge.dll must sit next to the executable
add_custom_command(TARGET olive-gtest POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:ffmpeg_bridge> $<TARGET_FILE_DIR:olive-gtest>)
endif()
+5 -2
View File
@@ -207,8 +207,11 @@ protected:
void TearDown() override
{
RenderManager::instance()->GetCacher()->SetProject(nullptr);
RenderManager::DestroyInstance();
// May be null when SetUp() skipped before creating the instance.
if (RenderManager::instance()) {
RenderManager::instance()->GetCacher()->SetProject(nullptr);
RenderManager::DestroyInstance();
}
project_.reset();
}
@@ -188,8 +188,11 @@ protected:
void TearDown() override
{
RenderManager::instance()->GetCacher()->SetProject(nullptr);
RenderManager::DestroyInstance();
// May be null when SetUp() skipped before creating the instance.
if (RenderManager::instance()) {
RenderManager::instance()->GetCacher()->SetProject(nullptr);
RenderManager::DestroyInstance();
}
project_.reset();
}