Add host side test for secondary user rollback
Run RollbackTest#testBasic only under a secondary user.
The host-driven test adds a new user and then installs the TEST (not the
test app) for that new user.
Note: this was the missing step in the previous attempt to test
RollbackTest under a secondary user.
Test: atest SecondaryUserRollbackTest
Test: test failed when multiuser support was removed from rollback
manager
Test: adb shell pm list packages --user 11 | grep rollback while running
the test in order to make sure the test is installing packages for the right user
Bug: 133852817
Bug: 129747710
Change-Id: Id1e54769cc2a9631d1464c07bad2b685f78689bc
diff --git a/tests/RollbackTest/Android.bp b/tests/RollbackTest/Android.bp
index aec4055..5172935 100644
--- a/tests/RollbackTest/Android.bp
+++ b/tests/RollbackTest/Android.bp
@@ -105,3 +105,11 @@
test_suites: ["general-tests"],
test_config: "StagedRollbackTest.xml",
}
+
+java_test_host {
+ name: "SecondaryUserRollbackTest",
+ srcs: ["SecondaryUserRollbackTest/src/**/*.java"],
+ libs: ["tradefed"],
+ test_suites: ["general-tests"],
+ test_config: "SecondaryUserRollbackTest.xml",
+}