Commit 9bf10fd6 authored by Harald Scheirich's avatar Harald Scheirich
Browse files

Merge branch 'fix/test-main-logic' into 'master'

BUG: Incorrect logic with regards to directory creation

See merge request iMSTK/iMSTK!638
parents 4f24afe0 905d9384
......@@ -28,23 +28,24 @@
int
main(int argc, char** argv)
{
bool removeLog = false;
bool removeLog = true;
for (int i = 0; i < argc; ++i)
{
if (std::string(argv[i]) == "--imstk_keep_log")
{
removeLog = true;
removeLog = false;
}
}
if (removeLog)
{
vtksys::SystemTools::RemoveADirectory("testlog");
vtksys::SystemTools::MakeDirectory("testlog");
vtksys::SystemTools::RemoveADirectory("log");
}
vtksys::SystemTools::MakeDirectory("log");
auto& logger = imstk::Logger::getInstance();
logger.addFileSink("test", "testlog");
logger.addFileSink("test", "log");
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment