summaryrefslogtreecommitdiff
path: root/services/tests/servicestests/Android.bp
blob: eecdeed2cd255629e9381d00a980f92223bf6705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
//########################################################################
// Build FrameworksServicesTests package
//########################################################################

android_test {
    name: "FrameworksServicesTests",

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

        "aidl/com/android/servicestests/aidl/INetworkStateObserver.aidl",
        "aidl/com/android/servicestests/aidl/ICmdReceiverService.aidl",

        "test-apps/JobTestApp/src/**/*.java",

        "test-apps/SuspendTestApp/src/**/*.java",
    ],
    static_libs: [
        "frameworks-base-testutils",
        "services.accessibility",
        "services.appwidget",
        "services.autofill",
        "services.backup",
        "services.core",
        "services.devicepolicy",
        "services.net",
        "services.usage",
        "guava",
        "androidx.test.runner",
        "androidx.test.rules",
        "mockito-target-minus-junit4",
        "platform-test-annotations",
        "ShortcutManagerTestUtils",
        "truth-prebuilt",
        "testables",
        "testng",
        "ub-uiautomator",
        "platformprotosnano",
        "hamcrest-library",
        "servicestests-utils",
        "xml-writer-device-lib",
    ],

    aidl: {
        local_include_dirs: ["aidl"],
    },

    libs: [
        "android.hidl.manager-V1.0-java",
        "android.hardware.tv.cec-V1.0-java",
        "android.test.mock",
        "android.test.base",
        "android.test.runner",
    ],

    platform_apis: true,
    test_suites: ["device-tests"],

    certificate: "platform",

    // These are not normally accessible from apps so they must be explicitly included.
    jni_libs: [
        "libbacktrace",
        "libbase",
        "libbinder",
        "libbinderthreadstate",
        "libc++",
        "libcutils",
        "liblog",
        "liblzma",
        "libnativehelper",
        "libpsi",
        "libui",
        "libunwindstack",
        "libutils",
        "netd_aidl_interface-cpp",
    ],

    dxflags: ["--multi-dex"],

    optimize: {
        enabled: false,
    },

    data: [":JobTestApp"],
}

java_library {
    name: "servicestests-utils",
    srcs: [
        "utils/**/*.java",
    ],
    static_libs: [
        "junit",
        "mockito-target-minus-junit4",
    ],
    libs: [
        "android.test.runner",
    ],
}

filegroup {
    name: "servicestests-SuspendTestApp-files",
    srcs: [
        "src/com/android/server/pm/SuspendPackagesTest.java",
    ],
}