diff --git a/init/oneshot_on_test.cpp b/init/oneshot_on_test.cpp index 487e0ea69..a9ad8715e 100644 --- a/init/oneshot_on_test.cpp +++ b/init/oneshot_on_test.cpp @@ -27,6 +27,11 @@ using namespace std::literals; #if 0 // TODO(b/152637928): this test is flaky TEST(init, oneshot_on) { + if (getuid() != 0) { + GTEST_SKIP() << "Skipping test, must be run as root."; + return; + } + // Bootanim shouldn't be running once the device has booted. ASSERT_EQ("stopped", GetProperty("init.svc.bootanim", ""));