refactor: unittest use Settings

This commit is contained in:
sithlord48 2025-03-08 12:56:05 -05:00 committed by Nick Bolton
parent 53487e757b
commit 2a53d4f187
2 changed files with 4 additions and 1 deletions

View file

@ -5,4 +5,4 @@
config_test()
set(target unittests)
add_executable(${target} ${sources} ${headers})
target_link_libraries(${target} ${test_libs})
target_link_libraries(${target} ${test_libs} common)

View file

@ -7,6 +7,7 @@
#include "arch/Arch.h"
#include "base/Log.h"
#include "common/Settings.h"
#include "shared/ExitTimeout.h"
#if SYSAPI_WIN32
@ -25,6 +26,8 @@ int main(int argc, char **argv)
// HACK: Unit tests should not use the filesystem.
std::filesystem::create_directories(testDir);
Settings::setSettingFile("tmp/test/settings.ini");
ExitTimeout exitTimeout(1, "Unit tests");
#if SYSAPI_WIN32