blob: 4ab2acb2c7944553f73cac3d3d6e424d779d1311 [file] [log] [blame]
Dan Willemsen3e963f92018-10-31 10:32:32 -07001//
2// Copyright (C) 2013-2014 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
17// -----------------------------------------------------------------------------
18// Benchmarks.
19// -----------------------------------------------------------------------------
20
21// Build benchmarks for the device. Run with:
22// adb shell liblog-benchmarks
23cc_benchmark {
24 name: "liblog-benchmarks",
25 cflags: [
26 "-Wall",
27 "-Wextra",
28 "-Werror",
29 "-fno-builtin",
30 ],
31 shared_libs: [
Dan Willemsen3e963f92018-10-31 10:32:32 -070032 "libm",
33 "libbase",
34 ],
Tom Cherrybbf2a0d2019-01-15 13:12:44 -080035 static_libs: ["liblog"],
Dan Willemsen3e963f92018-10-31 10:32:32 -070036 srcs: ["liblog_benchmark.cpp"],
37}
38
39// -----------------------------------------------------------------------------
40// Unit tests.
41// -----------------------------------------------------------------------------
42
43cc_defaults {
44 name: "liblog-tests-defaults",
45
46 cflags: [
47 "-fstack-protector-all",
48 "-g",
49 "-Wall",
50 "-Wextra",
51 "-Werror",
52 "-fno-builtin",
53 ],
54 srcs: [
55 "libc_test.cpp",
56 "liblog_test_default.cpp",
Dan Willemsen3e963f92018-10-31 10:32:32 -070057 "liblog_test_stderr.cpp",
Dan Willemsen3e963f92018-10-31 10:32:32 -070058 "log_id_test.cpp",
59 "log_radio_test.cpp",
60 "log_read_test.cpp",
61 "log_system_test.cpp",
62 "log_time_test.cpp",
63 "log_wrap_test.cpp",
64 ],
65 shared_libs: [
Dan Willemsen3e963f92018-10-31 10:32:32 -070066 "libcutils",
67 "libbase",
68 ],
Tom Cherrybbf2a0d2019-01-15 13:12:44 -080069 static_libs: ["liblog"],
Dan Willemsen3e963f92018-10-31 10:32:32 -070070}
71
72// Build tests for the device (with .so). Run with:
73// adb shell /data/nativetest/liblog-unit-tests/liblog-unit-tests
74cc_test {
75 name: "liblog-unit-tests",
76 defaults: ["liblog-tests-defaults"],
77}
78
79cc_test {
80 name: "CtsLiblogTestCases",
81 defaults: ["liblog-tests-defaults"],
82 multilib: {
83 lib32: {
84 suffix: "32",
85 },
86 lib64: {
87 suffix: "64",
88 },
89 },
90
91 cflags: ["-DNO_PSTORE"],
92 test_suites: [
93 "cts",
94 "vts",
95 ],
96}