blob: 141125461d9c42ef0a1462af6d7757c83e84918e [file] [log] [blame]
David Su6164dcb2019-12-18 15:16:24 -08001// Copyright (C) 2020 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// Make test APK
16// ============================================================
17
18// This list is generated from the java source files in this module
19// The list is a comma separated list of class names with * matching zero or more characters.
20// Example:
21// Input files: src/com/android/server/wifi/Test.java src/com/android/server/wifi/AnotherTest.java
22// Generated exclude list: com.android.server.wifi.Test*,com.android.server.wifi.AnotherTest*
23
24// Filter all src files to just java files
25local_java_files = ["__builtin_func:filter %.java <'LOCAL_SRC_FILES' unset>"]
26// Transform java file names into full class names.
27// This only works if the class name matches the file name and the directory structure
28// matches the package.
29local_classes = ["__builtin_func:subst / . __builtin_func:patsubst src/%.java % <'local_java_files' unset>"]
30// Convert class name list to jacoco exclude list
31// This appends a * to all classes and replace the space separators with commas.
32// These patterns will match all classes in this module and their inner classes.
33jacoco_exclude = ["__builtin_func:subst <'space' unset> <'comma' unset> __builtin_func:patsubst % %* <'local_classes' unset>"]
34
35jacoco_include = ["android.net.wifi.*"]
36
37android_test {
38 name: "FrameworksWifiApiTests",
39
40 srcs: ["**/*.java"],
41
42 jacoco: {
43 include_filter: jacoco_include,
44 exclude_filter: jacoco_exclude,
45 },
46
47 static_libs: [
48 "androidx.test.rules",
49 "core-test-rules",
50 "guava",
51 "mockito-target-minus-junit4",
52 "net-tests-utils",
53 "frameworks-base-testutils",
54 "truth-prebuilt",
55 ],
56
57 libs: [
58 "android.test.runner",
59 "android.test.base",
60 ],
61
62 platform_apis: true,
63 test_suites: [
64 "device-tests",
65 "mts",
66 ],
67}