diff options
author | wsmlby <wsmlby@google.com> | 2014-08-27 17:08:30 -0700 |
---|---|---|
committer | wsmlby <wsmlby@google.com> | 2014-08-27 17:08:30 -0700 |
commit | efa059a2fc7ad38cfba3ba1a22a1662b1d07cb43 (patch) | |
tree | 525da3ec42630bfecd93bc4284c89c111471183d | |
parent | 9266e343696eba11b0ed2cff96336c7e9fc97ed9 (diff) | |
download | tradefederation-efa059a2fc7ad38cfba3ba1a22a1662b1d07cb43.tar.gz |
Add one more stage(no password) to EncryptionFunctionalityTest
Change-Id: If04fd1021d5d86099013482b940355d6c2713f62
-rw-r--r-- | prod-tests/src/com/android/encryption/tests/EncryptionFunctionalityTest.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/prod-tests/src/com/android/encryption/tests/EncryptionFunctionalityTest.java b/prod-tests/src/com/android/encryption/tests/EncryptionFunctionalityTest.java index a494bab7d..2016982ef 100644 --- a/prod-tests/src/com/android/encryption/tests/EncryptionFunctionalityTest.java +++ b/prod-tests/src/com/android/encryption/tests/EncryptionFunctionalityTest.java @@ -30,11 +30,13 @@ import java.util.Map; /** * Runs the encryption func tests. * <p> - * 1 Encrypts the device inplace. - * 2 Checks the password and boot into the system - * 3 Changes the password - * 4 Checks if can still access sdcard(Should not) - * 5 Checks the password and boot into the system + * The steps and the stage number: + * 1 Encrypts the device inplace. 0->1->2 + * 2 Checks the password and boot into the system 2->3->4 + * 3 Changes the password 4->5 + * 4 Checks if can still access sdcard(Should not) 5 + * 5 Checks the password and boot into the system 5->6 + * 6 Change the password to DEFAULT(no password),make sure it boots into the system directly 6->7 * The time of every stage is measured. * </p> */ @@ -46,7 +48,7 @@ public class EncryptionFunctionalityTest implements IDeviceTest, IRemoteTest { final String[] STAGE_NAME = { "encryption", "online", "bootcomplete", "decryption", - "bootcomplete", "pwchanged", "bootcomplete"}; + "bootcomplete", "pwchanged", "bootcomplete", "nopassword"}; Map<String, String> metrics = new HashMap<String, String>(); int stage = 0; long stageEndTime, stageStartTime; @@ -90,6 +92,9 @@ public class EncryptionFunctionalityTest implements IDeviceTest, IRemoteTest { mTestDevice.executeShellCommand("vdc cryptfs restart"); mTestDevice.waitForDeviceAvailable(); stageEnd(false); // stage 6 + mTestDevice.executeShellCommand("vdc cryptfs changepw default"); + mTestDevice.reboot(); + stageEnd(false); // stage 7 } } catch (DeviceNotAvailableException e) { listener.testRunFailed(String.format("Device not avaible after %s before %s.", |