Move over to ABSL logging and flags.
Removes gperftools too since that wants gflags.
Here come the fireworks.
Change-Id: I79cb7bcf60f1047fbfa28bfffc21a0fd692e4b1c
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/util/top_test.cc b/aos/util/top_test.cc
index 7d9d2bb..9dc9c8c 100644
--- a/aos/util/top_test.cc
+++ b/aos/util/top_test.cc
@@ -13,10 +13,12 @@
#include <thread>
#include <vector>
+#include "absl/flags/flag.h"
+#include "absl/flags/reflection.h"
+#include "absl/log/check.h"
+#include "absl/log/log.h"
#include "flatbuffers/string.h"
#include "flatbuffers/vector.h"
-#include "gflags/gflags.h"
-#include "glog/logging.h"
#include "gtest/gtest.h"
#include <gmock/gmock.h>
@@ -40,7 +42,7 @@
class TopTest : public ::testing::Test {
protected:
TopTest()
- : shm_dir_(aos::testing::TestTmpDir() + "/aos"),
+ : shm_dir_(aos::testing::TestTmpDir()),
cpu_consumer_([this]() {
SetThreadName(std::string(kTestCPUConsumer));
while (!stop_flag_.load()) {
@@ -50,18 +52,18 @@
aos::testing::ArtifactPath("aos/events/pingpong_config.json")),
config_(aos::configuration::ReadConfig(config_file_)),
event_loop_(&config_.message()) {
- FLAGS_shm_base = shm_dir_;
+ aos::testing::SetShmBase(shm_dir_);
// Nuke the shm dir, to ensure we aren't being affected by any preexisting
// tests.
- aos::util::UnlinkRecursive(shm_dir_);
+ aos::util::UnlinkRecursive(shm_dir_ + "/aos");
}
~TopTest() {
stop_flag_ = true;
cpu_consumer_.join();
}
- gflags::FlagSaver flag_saver_;
+ absl::FlagSaver flag_saver_;
std::string shm_dir_;
std::thread cpu_consumer_;