• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2016 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15//
16
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21android_test {
22    name: "CarServiceUnitTest",
23
24    srcs: ["src/**/*.java"],
25
26    aaptflags: [
27        "--extra-packages com.android.car",
28        "--auto-add-overlay",
29    ],
30
31    platform_apis: true,
32
33    certificate: "platform",
34
35    optimize: {
36        enabled: false,
37    },
38
39    instrumentation_for: "CarService",
40
41    sdk_version: "core_platform",
42
43    libs: [
44        "android.car",
45        "android.car.builtin.impl",
46        "android.car.watchdoglib",
47        "android.test.runner",
48        "android.test.base",
49        "android.test.mock",
50        // The following three lines are needed for tests that build against framework-bluetooth's
51        // @hide APIs. Order matters for the first two: classes in framework-bluetooth are
52        // resolved before framework, meaning @hide APIs in framework-bluetooth are resolved
53        // before @SystemApi stubs in framework. If sdk_version="", then the third line would get
54        // automatically included; since it isn't, it needs to be manually added here.
55        // (Ref: "framework-bluetooth-tests-defaults" in packages/modules/Bluetooth/framework/Android.bp)
56        "framework-bluetooth.impl",
57        "framework",
58        "framework-res",
59    ],
60
61    static_libs: [
62        "android.car.testapi",
63        "android.car.test.utils",
64        "androidx.test.core",
65        "androidx.test.ext.junit",
66        "androidx.test.rules",
67        "car-service-test-static-lib",
68        "car-service-builtin-test-static-lib",
69        "car-helper-lib",
70        "com.android.car.test.lib",
71        "compatibility-device-util-axt",
72        "frameworks-base-testutils",
73        "mockito-target-extended",
74        "SettingsLib",
75        "testng",
76        "truth-prebuilt",
77        "WindowManager-Shell",  // for CarActivityServiceTaskMonitorUnitTest
78        "vehicle-hal-support-lib",
79    ],
80
81    test_suites: ["general-tests"],
82
83    // mockito-target-inline dependency
84    jni_libs: [
85        "libdexmakerjvmtiagent",
86        "libstaticjvmtiagent",
87    ],
88}
89