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 !638
parents 4f24afe0 905d9384
Pipeline #240683 passed with stage
in 0 seconds
...@@ -28,23 +28,24 @@ ...@@ -28,23 +28,24 @@
int int
main(int argc, char** argv) main(int argc, char** argv)
{ {
bool removeLog = false; bool removeLog = true;
for (int i = 0; i < argc; ++i) for (int i = 0; i < argc; ++i)
{ {
if (std::string(argv[i]) == "--imstk_keep_log") if (std::string(argv[i]) == "--imstk_keep_log")
{ {
removeLog = true; removeLog = false;
} }
} }
if (removeLog) if (removeLog)
{ {
vtksys::SystemTools::RemoveADirectory("testlog"); vtksys::SystemTools::RemoveADirectory("log");
vtksys::SystemTools::MakeDirectory("testlog");
} }
vtksys::SystemTools::MakeDirectory("log");
auto& logger = imstk::Logger::getInstance(); auto& logger = imstk::Logger::getInstance();
logger.addFileSink("test", "testlog"); logger.addFileSink("test", "log");
::testing::InitGoogleTest(&argc, argv); ::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
......
Supports Markdown
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