Loading tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java +8 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.tests.rollback.host; import static org.junit.Assert.assertTrue; import com.android.ddmlib.Log.LogLevel; import com.android.tradefed.device.DeviceNotAvailableException; import com.android.tradefed.log.LogUtil.CLog; import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test; Loading Loading @@ -95,7 +96,7 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { + "watchdog_request_timeout_millis 300000"); // Simulate re-installation of new NetworkStack with rollbacks enabled getDevice().executeShellCommand("pm install -r --staged --enable-rollback " + "/system/priv-app/NetworkStack/NetworkStack.apk"); + getNetworkStackPath()); // Sleep to allow writes to disk before reboot Thread.sleep(5000); Loading Loading @@ -141,7 +142,7 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { + "watchdog_request_timeout_millis 300000"); // Simulate re-installation of new NetworkStack with rollbacks enabled getDevice().executeShellCommand("pm install -r --staged --enable-rollback " + "/system/priv-app/NetworkStack/NetworkStack.apk"); + getNetworkStackPath()); // Sleep to allow writes to disk before reboot Thread.sleep(5000); Loading @@ -165,4 +166,9 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { // Verify rollback was not executed after health check deadline runPhase("assertNoNetworkStackRollbackCommitted"); } private String getNetworkStackPath() throws DeviceNotAvailableException { // Find the NetworkStack path (can be NetworkStack.apk or NetworkStackNext.apk) return getDevice().executeShellCommand("ls /system/priv-app/NetworkStack*/*.apk"); } } Loading
tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java +8 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.tests.rollback.host; import static org.junit.Assert.assertTrue; import com.android.ddmlib.Log.LogLevel; import com.android.tradefed.device.DeviceNotAvailableException; import com.android.tradefed.log.LogUtil.CLog; import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test; Loading Loading @@ -95,7 +96,7 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { + "watchdog_request_timeout_millis 300000"); // Simulate re-installation of new NetworkStack with rollbacks enabled getDevice().executeShellCommand("pm install -r --staged --enable-rollback " + "/system/priv-app/NetworkStack/NetworkStack.apk"); + getNetworkStackPath()); // Sleep to allow writes to disk before reboot Thread.sleep(5000); Loading Loading @@ -141,7 +142,7 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { + "watchdog_request_timeout_millis 300000"); // Simulate re-installation of new NetworkStack with rollbacks enabled getDevice().executeShellCommand("pm install -r --staged --enable-rollback " + "/system/priv-app/NetworkStack/NetworkStack.apk"); + getNetworkStackPath()); // Sleep to allow writes to disk before reboot Thread.sleep(5000); Loading @@ -165,4 +166,9 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { // Verify rollback was not executed after health check deadline runPhase("assertNoNetworkStackRollbackCommitted"); } private String getNetworkStackPath() throws DeviceNotAvailableException { // Find the NetworkStack path (can be NetworkStack.apk or NetworkStackNext.apk) return getDevice().executeShellCommand("ls /system/priv-app/NetworkStack*/*.apk"); } }