Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 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 | |
| 15 | cc_defaults { |
| 16 | name: "libcutils_test_default", |
Mark Salyzyn | 52bd37e | 2016-11-07 09:39:30 -0800 | [diff] [blame] | 17 | srcs: ["sockets_test.cpp"], |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 18 | |
| 19 | target: { |
| 20 | android: { |
| 21 | srcs: [ |
Connor O'Brien | a963ae8 | 2016-09-12 15:52:04 -0700 | [diff] [blame] | 22 | "AshmemTest.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 23 | "MemsetTest.cpp", |
| 24 | "PropertiesTest.cpp", |
Greg Hackmann | ed0614c | 2016-08-03 10:41:54 -0700 | [diff] [blame] | 25 | "sched_policy_test.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 26 | "trace-dev_test.cpp", |
Mark Salyzyn | 678194d | 2016-11-28 10:39:21 -0800 | [diff] [blame] | 27 | "test_str_parms.cpp", |
| 28 | "android_get_control_socket_test.cpp", |
Jeff Sharkey | dff4470 | 2016-12-13 11:55:19 -0700 | [diff] [blame] | 29 | "android_get_control_file_test.cpp", |
Mark Salyzyn | 0f6a270 | 2017-05-02 08:56:15 -0700 | [diff] [blame] | 30 | "multiuser_test.cpp", |
| 31 | "fs_config.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 32 | ], |
| 33 | }, |
| 34 | |
| 35 | not_windows: { |
Mark Salyzyn | 52bd37e | 2016-11-07 09:39:30 -0800 | [diff] [blame] | 36 | srcs: [ |
| 37 | "test_str_parms.cpp", |
Mark Salyzyn | 52bd37e | 2016-11-07 09:39:30 -0800 | [diff] [blame] | 38 | ], |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 39 | }, |
| 40 | }, |
| 41 | |
| 42 | multilib: { |
| 43 | lib32: { |
| 44 | suffix: "32", |
| 45 | }, |
| 46 | lib64: { |
| 47 | suffix: "64", |
| 48 | }, |
| 49 | }, |
Greg Hackmann | a930af8 | 2017-02-22 10:50:26 -0800 | [diff] [blame] | 50 | |
| 51 | cflags: [ |
| 52 | "-Wall", |
| 53 | "-Wextra", |
| 54 | "-Werror", |
| 55 | ], |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | test_libraries = [ |
| 59 | "libcutils", |
| 60 | "liblog", |
| 61 | "libbase", |
| 62 | ] |
| 63 | |
| 64 | cc_test { |
| 65 | name: "libcutils_test", |
Dan Shi | 2c67dfb | 2017-03-31 17:12:18 -0700 | [diff] [blame] | 66 | test_suites: ["device-tests"], |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 67 | defaults: ["libcutils_test_default"], |
| 68 | host_supported: true, |
| 69 | shared_libs: test_libraries, |
| 70 | } |
| 71 | |
| 72 | cc_test { |
| 73 | name: "libcutils_test_static", |
Dan Shi | d8f533a | 2017-03-29 23:13:08 -0700 | [diff] [blame] | 74 | test_suites: ["device-tests"], |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 75 | defaults: ["libcutils_test_default"], |
| 76 | static_libs: ["libc"] + test_libraries, |
| 77 | stl: "libc++_static", |
| 78 | |
| 79 | target: { |
| 80 | android: { |
| 81 | static_executable: true, |
| 82 | }, |
| 83 | windows: { |
| 84 | host_ldlibs: ["-lws2_32"], |
| 85 | |
| 86 | enabled: true, |
| 87 | }, |
| 88 | }, |
| 89 | } |