Loading init/oneshot_on_test.cpp +5 −2 Original line number Original line Diff line number Diff line Loading @@ -25,8 +25,12 @@ using android::base::SetProperty; using android::base::WaitForProperty; using android::base::WaitForProperty; using namespace std::literals; using namespace std::literals; #if 0 // TODO(b/152637928): this test is flaky TEST(init, oneshot_on) { 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. // Bootanim shouldn't be running once the device has booted. ASSERT_EQ("stopped", GetProperty("init.svc.bootanim", "")); ASSERT_EQ("stopped", GetProperty("init.svc.bootanim", "")); Loading @@ -43,4 +47,3 @@ TEST(init, oneshot_on) { // Now that oneshot is enabled again, bootanim should transition into the 'stopped' state. // Now that oneshot is enabled again, bootanim should transition into the 'stopped' state. EXPECT_TRUE(WaitForProperty("init.svc.bootanim", "stopped", 10s)); EXPECT_TRUE(WaitForProperty("init.svc.bootanim", "stopped", 10s)); } } #endif Loading
init/oneshot_on_test.cpp +5 −2 Original line number Original line Diff line number Diff line Loading @@ -25,8 +25,12 @@ using android::base::SetProperty; using android::base::WaitForProperty; using android::base::WaitForProperty; using namespace std::literals; using namespace std::literals; #if 0 // TODO(b/152637928): this test is flaky TEST(init, oneshot_on) { 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. // Bootanim shouldn't be running once the device has booted. ASSERT_EQ("stopped", GetProperty("init.svc.bootanim", "")); ASSERT_EQ("stopped", GetProperty("init.svc.bootanim", "")); Loading @@ -43,4 +47,3 @@ TEST(init, oneshot_on) { // Now that oneshot is enabled again, bootanim should transition into the 'stopped' state. // Now that oneshot is enabled again, bootanim should transition into the 'stopped' state. EXPECT_TRUE(WaitForProperty("init.svc.bootanim", "stopped", 10s)); EXPECT_TRUE(WaitForProperty("init.svc.bootanim", "stopped", 10s)); } } #endif