init: require root for oneshot_on test
Bug: 152630580
Bug: 152637928
Bug: 152662041
Bug: 152662652
Test: this test is skipped when run as non-root
Merged-In: I7118025cc20081a200000bf484a08c9ed0b0d3ec
Change-Id: I7118025cc20081a200000bf484a08c9ed0b0d3ec
(cherry picked from commit 14f4afd2f2
)
This commit is contained in:
parent
9c83185c1e
commit
5b1c316a1f
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,11 @@ using android::base::WaitForProperty;
|
|||
using namespace std::literals;
|
||||
|
||||
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", ""));
|
||||
|
||||
|
|
Loading…
Reference in a new issue