Make logger_test work under GDB again
It wasn't cleaning up previous runs all the way and was relying on the
sandbox. This makes it hard to debug tests.
Change-Id: Id7a691b142a8a38934342bba42816205b7d3bc0a
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/events/logging/logger_test.cc b/aos/events/logging/logger_test.cc
index 5532caf..67d4897 100644
--- a/aos/events/logging/logger_test.cc
+++ b/aos/events/logging/logger_test.cc
@@ -2161,6 +2161,8 @@
// Test that renaming the base, renames the folder.
TEST_F(MultinodeLoggerTest, LoggerRenameFolder) {
+ util::UnlinkRecursive(tmp_dir_ + "/renamefolder");
+ util::UnlinkRecursive(tmp_dir_ + "/new-good");
time_converter_.AddMonotonic(
{monotonic_clock::epoch(),
monotonic_clock::epoch() + chrono::seconds(1000)});
@@ -2190,6 +2192,7 @@
time_converter_.AddMonotonic(
{monotonic_clock::epoch(),
monotonic_clock::epoch() + chrono::seconds(1000)});
+ util::UnlinkRecursive(tmp_dir_ + "/renamefile");
logfile_base1_ = tmp_dir_ + "/renamefile/multi_logfile1";
logfile_base2_ = tmp_dir_ + "/renamefile/multi_logfile2";
logfiles_ = MakeLogFiles(logfile_base1_, logfile_base2_);