| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 1 | // | 
|  | 2 | // Copyright (C) 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 | // Build the unit tests. | 
|  | 18 |  | 
|  | 19 | cc_test { | 
|  | 20 | name: "libutils_tests", | 
| Colin Cross | 155c983 | 2017-02-23 17:49:23 -0800 | [diff] [blame] | 21 | host_supported: true, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 22 |  | 
|  | 23 | srcs: [ | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 24 | "BitSet_test.cpp", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 25 | "LruCache_test.cpp", | 
| Colin Cross | a0931eb | 2017-02-23 16:04:45 -0800 | [diff] [blame] | 26 | "Singleton_test.cpp", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 27 | "String8_test.cpp", | 
|  | 28 | "StrongPointer_test.cpp", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 29 | "Unicode_test.cpp", | 
|  | 30 | "Vector_test.cpp", | 
|  | 31 | ], | 
|  | 32 |  | 
| Colin Cross | 155c983 | 2017-02-23 17:49:23 -0800 | [diff] [blame] | 33 | target: { | 
|  | 34 | android: { | 
|  | 35 | srcs: [ | 
|  | 36 | "BlobCache_test.cpp", | 
|  | 37 | "Looper_test.cpp", | 
|  | 38 | "RefBase_test.cpp", | 
|  | 39 | "SystemClock_test.cpp", | 
|  | 40 | ], | 
|  | 41 | shared_libs: [ | 
|  | 42 | "libz", | 
|  | 43 | "liblog", | 
|  | 44 | "libcutils", | 
|  | 45 | "libutils", | 
| Colin Cross | a0931eb | 2017-02-23 16:04:45 -0800 | [diff] [blame] | 46 | "libbase", | 
|  | 47 | "libdl", | 
| Colin Cross | 155c983 | 2017-02-23 17:49:23 -0800 | [diff] [blame] | 48 | ], | 
|  | 49 | }, | 
|  | 50 | linux: { | 
|  | 51 | srcs: [ | 
|  | 52 | "Looper_test.cpp", | 
|  | 53 | "RefBase_test.cpp", | 
|  | 54 | ], | 
|  | 55 | }, | 
|  | 56 | host: { | 
|  | 57 | static_libs: [ | 
|  | 58 | "libutils", | 
|  | 59 | "liblog", | 
| Colin Cross | a0931eb | 2017-02-23 16:04:45 -0800 | [diff] [blame] | 60 | "libbase", | 
| Colin Cross | 155c983 | 2017-02-23 17:49:23 -0800 | [diff] [blame] | 61 | ], | 
| Colin Cross | a0931eb | 2017-02-23 16:04:45 -0800 | [diff] [blame] | 62 | host_ldlibs: ["-ldl"], | 
| Colin Cross | 155c983 | 2017-02-23 17:49:23 -0800 | [diff] [blame] | 63 | }, | 
|  | 64 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 65 |  | 
| Colin Cross | a0931eb | 2017-02-23 16:04:45 -0800 | [diff] [blame] | 66 | required: [ | 
|  | 67 | "libutils_tests_singleton1", | 
|  | 68 | "libutils_tests_singleton2", | 
|  | 69 | ], | 
|  | 70 |  | 
| Colin Cross | 155c983 | 2017-02-23 17:49:23 -0800 | [diff] [blame] | 71 | cflags: [ | 
|  | 72 | "-Wall", | 
|  | 73 | "-Wextra", | 
|  | 74 | "-Werror", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 75 | ], | 
|  | 76 | } | 
| Colin Cross | a0931eb | 2017-02-23 16:04:45 -0800 | [diff] [blame] | 77 |  | 
|  | 78 | cc_test_library { | 
|  | 79 | name: "libutils_tests_singleton1", | 
|  | 80 | host_supported: true, | 
|  | 81 | relative_install_path: "libutils_tests", | 
|  | 82 | srcs: ["Singleton_test1.cpp"], | 
|  | 83 | } | 
|  | 84 |  | 
|  | 85 | cc_test_library { | 
|  | 86 | name: "libutils_tests_singleton2", | 
|  | 87 | host_supported: true, | 
|  | 88 | relative_install_path: "libutils_tests", | 
|  | 89 | srcs: ["Singleton_test2.cpp"], | 
|  | 90 | shared_libs: ["libutils_tests_singleton1"], | 
|  | 91 | } |