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

Commit 4de3211f authored by Zach Johnson's avatar Zach Johnson
Browse files

Migrate bluetooth unit tests Android.mk file to bp

Bug: 142747680
Test: m
Change-Id: I5096786e21317e3d2238ae46b3f2071bcf339da8
parent da144256
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
android_test {
    name: "BluetoothInstrumentationTests",

    // We only want this apk build for tests.
    certificate: "platform",

    libs: [
        "javax.obex",
        "android.test.runner",
        "telephony-common",
        "libprotobuf-java-micro",
        "android.test.base",
        "android.test.mock",
    ],

    static_libs: [
        "androidx.test.rules",
        "mockito-target",
        "androidx.test.espresso.intents",
        "gson-prebuilt-jar",
        "androidx.room_room-migration",
        "androidx.room_room-runtime",
        "androidx.room_room-testing",
    ],

    asset_dirs: ["src/com/android/bluetooth/btservice/storage/schemas"],

    // Include all test java files.
    srcs: ["src/**/*.java"],

    platform_apis: true,

    test_suites: ["device-tests"],

    instrumentation_for: "Bluetooth",

}

android/app/tests/unit/Android.mk

deleted100644 → 0
+0 −49
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

# We only want this apk build for tests.
LOCAL_MODULE_TAGS := tests
LOCAL_CERTIFICATE := platform

LOCAL_JAVA_LIBRARIES := \
    javax.obex \
    android.test.runner \
    telephony-common \
    libprotobuf-java-micro \
    android.test.base \
    android.test.mock

LOCAL_STATIC_JAVA_LIBRARIES :=  \
    androidx.test.rules \
    mockito-target \
    androidx.test.espresso.intents \
    gson-prebuilt-jar \
    bt-androidx-room-migration-nodeps \
    bt-androidx-room-runtime-nodeps \
    bt-androidx-room-testing-nodeps

LOCAL_ASSET_DIR += \
    $(LOCAL_PATH)/src/com/android/bluetooth/btservice/storage/schemas

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := BluetoothInstrumentationTests
LOCAL_PRIVATE_PLATFORM_APIS := true

LOCAL_COMPATIBILITY_SUITE := device-tests

LOCAL_INSTRUMENTATION_FOR := Bluetooth

include $(BUILD_PACKAGE)

include $(CLEAR_VARS)

ROOM_LIBS_PATH := ../../lib/room

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
    bt-androidx-room-migration-nodeps:$(ROOM_LIBS_PATH)/room-migration-2.0.0-beta01.jar \
    bt-androidx-room-runtime-nodeps:$(ROOM_LIBS_PATH)/room-runtime-2.0.0-alpha1.aar \
    bt-androidx-room-testing-nodeps:$(ROOM_LIBS_PATH)/room-testing-2.0.0-alpha1.aar

include $(BUILD_MULTI_PREBUILT)