Files
frameworks_base/tests/RollbackTest
shafik 4831ad7039 Fail to enable rollback if enable rollback times out
Make PackageManager send a ACTION_CANCEL_ENABLE_ROLLBACK intent to
RollbackManager. RollbackManager marks the relevant rollback as invalid.
Allow enable rollback to continue as usual, before making the rollback
available, RollbackManager checks whether it's valid. If it's not, the
rollback data is deleted.

Add a test case for expired rollback enabling attempt in RollbackTest.

Test: atest RollbackTest#testEnableRollbackTimeoutFailsRollback
Test: manual -
      * Set ENABLE_ROLLBACK_TIMEOUT_MILLIS to 1 ms using DeviceConfig
      * Install a mainline module with rollback enabled
      * adb shell dumpsys rollback
      * observe that no rollback was made available
Fixes: 131679409

Change-Id: Iaa4dbff002b820aff1fc3e1b985f129cf5ebe2e6
2019-05-09 12:38:04 +01:00
..

This directory contains a test for the rollback manager service.

Directory structure
===================
RollbackTest
  - device driven test for rollbacks not involving staged rollbacks.

StagedRollbackTest
  - device driven test for staged rollbacks.

TestApp
  - source for dummy apks used in testing.

TestApex
  - source for dummy apex modules used in testing.

Running the tests
=================

You can manually run the tests as follows:

  atest RollbackTest
  atest StagedRollbackTest