• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2017 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    // http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // the below license kinds from "system_libhwbinder_license":
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["system_libhwbinder_license"],
23}
24
25cc_defaults {
26    name: "libhwbinder_test_defaults",
27    defaults: ["hwbinder_benchmark_pgo",],
28
29    cflags: [
30        "-Wall",
31        "-Werror",
32    ],
33    shared_libs: [
34        "libbase",
35        "liblog",
36        "libutils",
37        "libcutils",
38        "libvndksupport",
39    ],
40
41    static_libs: [
42        "android.hardware.tests.libhwbinder@1.0",
43        "libhidlbase_pgo",
44    ],
45
46    // Allow dlsym'ing self for statically linked passthrough implementations
47    ldflags: ["-rdynamic"],
48
49    // impls should never be static, these are used only for testing purposes
50    // and test portability since this test pairs with specific hal
51    // implementations
52    whole_static_libs: [
53        "android.hardware.tests.libhwbinder@1.0-impl.test",
54    ],
55
56    require_root: true,
57}
58
59cc_benchmark {
60    name: "libhwbinder_benchmark",
61    defaults: ["libhwbinder_test_defaults"],
62    srcs: ["Benchmark.cpp"],
63}
64
65// build for benchmark test based on binder.
66cc_benchmark {
67    name: "libbinder_benchmark",
68
69    srcs: ["Benchmark_binder.cpp"],
70    cflags: [
71        "-Wall",
72        "-Werror",
73    ],
74    shared_libs: [
75        "libbinder",
76        "libutils",
77    ],
78    static_libs: [
79        "android.hardware.tests.libbinder",
80    ],
81    require_root: true,
82}
83
84// build for throughput benchmark test for hwbinder.
85cc_test {
86    name: "hwbinderThroughputTest",
87    defaults: ["libhwbinder_test_defaults"],
88    srcs: ["Benchmark_throughput.cpp"],
89}
90
91// build for latency benchmark test for hwbinder.
92cc_test {
93    name: "libhwbinder_latency",
94    defaults: ["libhwbinder_test_defaults"],
95
96    srcs: [
97        "Latency.cpp",
98        "PerfTest.cpp",
99    ],
100}
101