1// 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", 17 srcs: ["sockets_test.cpp"], 18 19 target: { 20 android: { 21 srcs: [ 22 "AshmemTest.cpp", 23 "MemsetTest.cpp", 24 "PropertiesTest.cpp", 25 "sched_policy_test.cpp", 26 "trace-dev_test.cpp", 27 "test_str_parms.cpp", 28 "android_get_control_socket_test.cpp", 29 "android_get_control_file_test.cpp", 30 "multiuser_test.cpp" 31 ], 32 }, 33 34 not_windows: { 35 srcs: [ 36 "test_str_parms.cpp", 37 ], 38 }, 39 }, 40 41 multilib: { 42 lib32: { 43 suffix: "32", 44 }, 45 lib64: { 46 suffix: "64", 47 }, 48 }, 49 50 cflags: [ 51 "-Wall", 52 "-Wextra", 53 "-Werror", 54 ], 55} 56 57test_libraries = [ 58 "libcutils", 59 "liblog", 60 "libbase", 61] 62 63cc_test { 64 name: "libcutils_test", 65 defaults: ["libcutils_test_default"], 66 host_supported: true, 67 shared_libs: test_libraries, 68} 69 70cc_test { 71 name: "libcutils_test_static", 72 defaults: ["libcutils_test_default"], 73 static_libs: ["libc"] + test_libraries, 74 stl: "libc++_static", 75 76 target: { 77 android: { 78 static_executable: true, 79 }, 80 windows: { 81 host_ldlibs: ["-lws2_32"], 82 83 enabled: true, 84 }, 85 }, 86} 87