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

Commit c1ef4475 authored by Adam Lesinski's avatar Adam Lesinski
Browse files

OMS: Migrate device tests to atest

Test: atest OverlayDeviceTests
Change-Id: Ie1040ee45e4ffef060a4e21257b0a61fd4f4c660
parent b67fc5fb
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
# Copyright (C) 2018 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := OverlayDeviceTests
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_TARGET_REQUIRED_MODULES := \
    OverlayDeviceTests_AppOverlayOne \
    OverlayDeviceTests_AppOverlayTwo \
    OverlayDeviceTests_FrameworkOverlay
include $(BUILD_PACKAGE)

# Include to build test-apps.
include $(call all-makefiles-under,$(LOCAL_PATH))
+4 −4
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.server.om.test">
    package="com.android.overlaytest">

    <uses-sdk android:minSdkVersion="21" />

@@ -24,6 +24,6 @@
    </application>

    <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
                     android:targetPackage="com.android.server.om.test" />

        android:targetPackage="com.android.overlaytest"
        android:label="Runtime resource overlay tests" />
</manifest>
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<configuration description="Test module config for OverlayDeviceTests">
    <option name="test-tag" value="OverlayDeviceTests" />
    <option name="test-suite-tag" value="apct" />

    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
        <option name="test-file-name" value="OverlayDeviceTests.apk" />
        <option name="test-file-name" value="OverlayDeviceTests_AppOverlayOne.apk" />
        <option name="test-file-name" value="OverlayDeviceTests_AppOverlayTwo.apk" />
        <option name="test-file-name" value="OverlayDeviceTests_FrameworkOverlay.apk" />
    </target_preparer>

    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="run-command"
                value="cmd overlay disable com.android.overlaytest.framework" />
        <option name="run-command"
                value="cmd overlay disable com.android.overlaytest.app_overlay_one" />
        <option name="run-command"
                value="cmd overlay disable com.android.overlaytest.app_overlay_two" />
        <option name="teardown-command"
                value="cmd overlay disable com.android.overlaytest.framework" />
        <option name="teardown-command"
                value="cmd overlay disable com.android.overlaytest.app_overlay_one" />
        <option name="teardown-command"
                value="cmd overlay disable com.android.overlaytest.app_overlay_two" />
    </target_preparer>

    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
        <option name="package" value="com.android.overlaytest" />
        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
    </test>
</configuration>
+0 −10
Original line number Diff line number Diff line
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := tests

LOCAL_SDK_VERSION := system_current

LOCAL_PACKAGE_NAME := com.android.overlaytest.filtered_app_overlay

include $(BUILD_PACKAGE)
+0 −9
Original line number Diff line number Diff line
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.overlaytest.filtered_app_overlay"
        android:versionCode="1"
        android:versionName="1.0">
        <overlay android:targetPackage="com.android.overlaytest"
                android:requiredSystemPropertyName="persist.oem.overlay.test"
                android:requiredSystemPropertyValue="foo"
                android:priority="3"/>
</manifest>
Loading