Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Snippets Groups Projects
Commit dac57a3e authored by JW Wang's avatar JW Wang Committed by Android (Google) Code Review
Browse files

Merge "Do cleanup before/after running the test" into rvc-dev

parents 017df7f0 757a3bad
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,6 @@
-->
<configuration description="Runs rollback tests for multiple users">
<option name="test-suite-tag" value="MultiUserRollbackTest" />
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
<option name="run-command" value="pm uninstall com.android.cts.install.lib.testapp.A" />
</target_preparer>
<test class="com.android.tradefed.testtype.HostTest" >
<option name="class" value="com.android.tests.rollback.host.MultiUserRollbackTest" />
</test>
......
......@@ -40,15 +40,20 @@ public class MultiUserRollbackTest extends BaseHostJUnit4Test {
private static final long SWITCH_USER_COMPLETED_NUMBER_OF_POLLS = 60;
private static final long SWITCH_USER_COMPLETED_POLL_INTERVAL_IN_MILLIS = 1000;
private void cleanUp() throws Exception {
getDevice().executeShellCommand("pm rollback-app com.android.cts.install.lib.testapp.A");
getDevice().executeShellCommand("pm uninstall com.android.cts.install.lib.testapp.A");
}
@After
public void tearDown() throws Exception {
getDevice().executeShellCommand("pm uninstall com.android.cts.install.lib.testapp.A");
cleanUp();
removeSecondaryUserIfNecessary();
}
@Before
public void setup() throws Exception {
cleanUp();
mOriginalUserId = getDevice().getCurrentUser();
createAndStartSecondaryUser();
// TODO(b/149733368): Remove the '-g' workaround when the bug is fixed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment