blob: 3892ce012a30ec4c6cfe79ba254e3acdbab90a89 [file] [log] [blame]
Dan Willemseneee8e7f2016-06-06 22:31:58 -07001// Copyright (C) 2014 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
15cc_defaults {
16 name: "libcutils_test_default",
Mark Salyzyn52bd37e2016-11-07 09:39:30 -080017 srcs: ["sockets_test.cpp"],
Dan Willemseneee8e7f2016-06-06 22:31:58 -070018
19 target: {
20 android: {
21 srcs: [
Connor O'Briena963ae82016-09-12 15:52:04 -070022 "AshmemTest.cpp",
Jiyong Parka2159c42019-02-03 00:34:29 +090023 "fs_config.cpp",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070024 "MemsetTest.cpp",
25 "PropertiesTest.cpp",
Greg Hackmanned0614c2016-08-03 10:41:54 -070026 "sched_policy_test.cpp",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070027 "trace-dev_test.cpp",
Mark Salyzyn678194d2016-11-28 10:39:21 -080028 "test_str_parms.cpp",
29 "android_get_control_socket_test.cpp",
Jeff Sharkeydff44702016-12-13 11:55:19 -070030 "android_get_control_file_test.cpp",
Mark Salyzyn0f6a2702017-05-02 08:56:15 -070031 "multiuser_test.cpp",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070032 ],
33 },
34
35 not_windows: {
Mark Salyzyn52bd37e2016-11-07 09:39:30 -080036 srcs: [
37 "test_str_parms.cpp",
Jiyong Parka2159c42019-02-03 00:34:29 +090038 "fs_config.cpp",
Mark Salyzyn52bd37e2016-11-07 09:39:30 -080039 ],
Dan Willemseneee8e7f2016-06-06 22:31:58 -070040 },
41 },
42
43 multilib: {
44 lib32: {
45 suffix: "32",
46 },
47 lib64: {
48 suffix: "64",
49 },
50 },
Greg Hackmanna930af82017-02-22 10:50:26 -080051
52 cflags: [
53 "-Wall",
54 "-Wextra",
55 "-Werror",
56 ],
Dan Willemseneee8e7f2016-06-06 22:31:58 -070057}
58
59test_libraries = [
60 "libcutils",
61 "liblog",
62 "libbase",
Suren Baghdasaryan82b72a52018-12-21 11:41:50 -080063 "libjsoncpp",
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000064 "libprocessgroup",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070065]
66
67cc_test {
68 name: "libcutils_test",
Dan Shi2c67dfb2017-03-31 17:12:18 -070069 test_suites: ["device-tests"],
Dan Willemseneee8e7f2016-06-06 22:31:58 -070070 defaults: ["libcutils_test_default"],
71 host_supported: true,
72 shared_libs: test_libraries,
73}
74
75cc_test {
76 name: "libcutils_test_static",
Dan Shid8f533a2017-03-29 23:13:08 -070077 test_suites: ["device-tests"],
Dan Willemseneee8e7f2016-06-06 22:31:58 -070078 defaults: ["libcutils_test_default"],
79 static_libs: ["libc"] + test_libraries,
80 stl: "libc++_static",
81
82 target: {
83 android: {
84 static_executable: true,
85 },
86 windows: {
87 host_ldlibs: ["-lws2_32"],
88
89 enabled: true,
90 },
91 },
92}