blob: 50755ce82fdca60d30bac9c878fc8f2b8b56b867 [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",
Tom Cherry05de1ba2019-02-12 11:26:23 -080034 "libcutils",
Dan Willemsen3e963f92018-10-31 10:32:32 -070035 ],
Tom Cherrybbf2a0d2019-01-15 13:12:44 -080036 static_libs: ["liblog"],
Dan Willemsen3e963f92018-10-31 10:32:32 -070037 srcs: ["liblog_benchmark.cpp"],
38}
39
40// -----------------------------------------------------------------------------
41// Unit tests.
42// -----------------------------------------------------------------------------
43
44cc_defaults {
45 name: "liblog-tests-defaults",
46
47 cflags: [
48 "-fstack-protector-all",
49 "-g",
50 "-Wall",
51 "-Wextra",
52 "-Werror",
53 "-fno-builtin",
54 ],
55 srcs: [
56 "libc_test.cpp",
57 "liblog_test_default.cpp",
Dan Willemsen3e963f92018-10-31 10:32:32 -070058 "liblog_test_stderr.cpp",
Dan Willemsen3e963f92018-10-31 10:32:32 -070059 "log_id_test.cpp",
60 "log_radio_test.cpp",
61 "log_read_test.cpp",
62 "log_system_test.cpp",
63 "log_time_test.cpp",
64 "log_wrap_test.cpp",
65 ],
66 shared_libs: [
Dan Willemsen3e963f92018-10-31 10:32:32 -070067 "libcutils",
68 "libbase",
69 ],
Tom Cherrybbf2a0d2019-01-15 13:12:44 -080070 static_libs: ["liblog"],
Dan Willemsen3e963f92018-10-31 10:32:32 -070071}
72
73// Build tests for the device (with .so). Run with:
74// adb shell /data/nativetest/liblog-unit-tests/liblog-unit-tests
75cc_test {
76 name: "liblog-unit-tests",
77 defaults: ["liblog-tests-defaults"],
78}
79
80cc_test {
81 name: "CtsLiblogTestCases",
82 defaults: ["liblog-tests-defaults"],
83 multilib: {
84 lib32: {
85 suffix: "32",
86 },
87 lib64: {
88 suffix: "64",
89 },
90 },
91
92 cflags: ["-DNO_PSTORE"],
93 test_suites: [
94 "cts",
95 "vts",
96 ],
97}