refactor: unittest use Settings
This commit is contained in:
parent
53487e757b
commit
2a53d4f187
2 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue