summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/timers.cc
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2019-09-16 11:56:59 -0700
committergVisor bot <gvisor-bot@google.com>2019-09-16 11:58:27 -0700
commit56cb0042181cc4840d8c3995f0970c0c41d4212b (patch)
tree4c755f1fe2d2252a55798ef2c2ec4e908cf88c5c /test/syscalls/linux/timers.cc
parent010b0932583711ab3f6a88b1136cf8d87c2a53d2 (diff)
Migrate from gflags to absl flags
absl flags are more modern and we can easily depend on them directly. The repo now successfully builds with --incompatible_load_cc_rules_from_bzl. PiperOrigin-RevId: 269387081
Diffstat (limited to 'test/syscalls/linux/timers.cc')
-rw-r--r--test/syscalls/linux/timers.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/syscalls/linux/timers.cc b/test/syscalls/linux/timers.cc
index fd42e81e1..3db18d7ac 100644
--- a/test/syscalls/linux/timers.cc
+++ b/test/syscalls/linux/timers.cc
@@ -23,6 +23,7 @@
#include <atomic>
#include "gtest/gtest.h"
+#include "absl/flags/flag.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "test/util/cleanup.h"
@@ -33,8 +34,8 @@
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
-DEFINE_bool(timers_test_sleep, false,
- "If true, sleep forever instead of running tests.");
+ABSL_FLAG(bool, timers_test_sleep, false,
+ "If true, sleep forever instead of running tests.");
using ::testing::_;
using ::testing::AnyOf;
@@ -635,7 +636,7 @@ TEST(IntervalTimerTest, IgnoredSignalCountsAsOverrun) {
int main(int argc, char** argv) {
gvisor::testing::TestInit(&argc, &argv);
- if (FLAGS_timers_test_sleep) {
+ if (absl::GetFlag(FLAGS_timers_test_sleep)) {
while (true) {
absl::SleepFor(absl::Seconds(10));
}