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

Commit 77ed438f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes Ie125d44c,If9b5d57e,I001427c7

* changes:
  Create basic test for rollback of staged install.
  Stub out code for a host driven StagedRollbackTest.
  Move RollbackTest app code to a new subdirectory.
parents c2b55eb9 c5e2e803
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ ROLLBACK_TEST_APP_BV2 := $(LOCAL_INSTALLED_MODULE)

# RollbackTest
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES := $(call all-java-files-under, RollbackTest/src)
LOCAL_PACKAGE_NAME := RollbackTest
LOCAL_MODULE_TAGS := tests
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
@@ -84,10 +84,21 @@ LOCAL_JAVA_RESOURCE_FILES := \
  $(ROLLBACK_TEST_APP_BV1) \
  $(ROLLBACK_TEST_APP_BV2) \
  $(ROLLBACK_TEST_APEX_V2)
LOCAL_MANIFEST_FILE := RollbackTest/AndroidManifest.xml
LOCAL_SDK_VERSION := system_current
LOCAL_TEST_CONFIG := RollbackTest.xml
include $(BUILD_PACKAGE)

# StagedRollbackTest
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, StagedRollbackTest/src)
LOCAL_MODULE := StagedRollbackTest
LOCAL_MODULE_TAGS := tests
LOCAL_JAVA_LIBRARIES := tradefed
LOCAL_COMPATIBILITY_SUITE := general-tests
LOCAL_TEST_CONFIG := StagedRollbackTest.xml
include $(BUILD_HOST_JAVA_LIBRARY)

# Clean up local variables
ROLLBACK_TEST_APP_AV1 :=
ROLLBACK_TEST_APP_AV2 :=
+23 −0
Original line number Diff line number Diff line
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
+4 −0
Original line number Diff line number Diff line
@@ -21,5 +21,9 @@
    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.tests.rollback" />
        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />

        <!-- Exclude the StagedRollbackTest tests, which needs to be specially
             driven from the StagedRollbackTest host test -->
        <option name="exclude-filter" value="com.android.tests.rollback.StagedRollbackTest" />
    </test>
</configuration>
Loading