• 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
28    cflags: [
29        "-Wall",
30        "-Werror",
31    ],
32    shared_libs: [
33        "libbase",
34        "liblog",
35        "libutils",
36        "libcutils",
37        "libvndksupport",
38    ],
39
40    static_libs: [
41        "android.hardware.tests.libhwbinder@1.0",
42        "libhidlbase",
43    ],
44
45    // Allow dlsym'ing self for statically linked passthrough implementations
46    ldflags: ["-rdynamic"],
47
48    // impls should never be static, these are used only for testing purposes
49    // and test portability since this test pairs with specific hal
50    // implementations
51    whole_static_libs: [
52        "android.hardware.tests.libhwbinder@1.0-impl.test",
53    ],
54
55    require_root: true,
56}
57
58cc_benchmark {
59    name: "libhwbinder_benchmark",
60    defaults: ["libhwbinder_test_defaults"],
61    srcs: ["Benchmark.cpp"],
62}
63
64// build for benchmark test based on binder.
65cc_benchmark {
66    name: "libbinder_benchmark",
67
68    srcs: ["Benchmark_binder.cpp"],
69    cflags: [
70        "-Wall",
71        "-Werror",
72    ],
73    shared_libs: [
74        "libbinder",
75        "libutils",
76    ],
77    static_libs: [
78        "android.hardware.tests.libbinder",
79    ],
80    require_root: true,
81}
82
83// build for throughput benchmark test for hwbinder.
84cc_test {
85    name: "hwbinderThroughputTest",
86    defaults: ["libhwbinder_test_defaults"],
87    srcs: ["Benchmark_throughput.cpp"],
88}
89
90// build for latency benchmark test for hwbinder.
91cc_test {
92    name: "libhwbinder_latency",
93    defaults: ["libhwbinder_test_defaults"],
94
95    srcs: [
96        "Latency.cpp",
97        "PerfTest.cpp",
98    ],
99}
100