Merge "Only run RebootTest under root" into sc-dev

This commit is contained in:
Nikita Ioffe 2021-07-01 22:25:24 +00:00 committed by Android (Google) Code Review
commit bfa4e30bf2

View file

@ -113,6 +113,11 @@ service $name /system/bin/yes
}
TEST_F(RebootTest, StopServicesSIGTERM) {
if (getuid() != 0) {
GTEST_SKIP() << "Skipping test, must be run as root.";
return;
}
AddTestService("A");
AddTestService("B");
@ -148,6 +153,11 @@ TEST_F(RebootTest, StopServicesSIGTERM) {
}
TEST_F(RebootTest, StopServicesSIGKILL) {
if (getuid() != 0) {
GTEST_SKIP() << "Skipping test, must be run as root.";
return;
}
AddTestService("A");
AddTestService("B");