Dan Willemsen | c017c20 | 2016-09-12 16:15:40 -0700 | [diff] [blame] | 1 | // Build the unit tests for audio_utils |
| 2 | |
| 3 | cc_test { |
| 4 | name: "primitives_tests", |
Dan Willemsen | 1922726 | 2016-09-12 18:43:04 -0700 | [diff] [blame] | 5 | host_supported: true, |
Dan Willemsen | c017c20 | 2016-09-12 16:15:40 -0700 | [diff] [blame] | 6 | |
| 7 | shared_libs: [ |
| 8 | "liblog", |
| 9 | "libcutils", |
Dan Willemsen | c017c20 | 2016-09-12 16:15:40 -0700 | [diff] [blame] | 10 | ], |
| 11 | srcs: ["primitives_tests.cpp"], |
| 12 | cflags: [ |
| 13 | "-Werror", |
| 14 | "-Wall", |
| 15 | ], |
Dan Willemsen | 1922726 | 2016-09-12 18:43:04 -0700 | [diff] [blame] | 16 | target: { |
| 17 | android: { |
| 18 | shared_libs: ["libaudioutils"], |
| 19 | }, |
| 20 | host: { |
| 21 | static_libs: ["libaudioutils"], |
| 22 | }, |
| 23 | } |
Dan Willemsen | c017c20 | 2016-09-12 16:15:40 -0700 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | cc_binary { |
Kevin Rocard | 2d98fd3 | 2017-11-09 22:12:51 -0800 | [diff] [blame] | 27 | name: "primitives_benchmark", |
| 28 | host_supported: true, |
Kevin Rocard | 4db5057 | 2017-11-15 09:09:29 -0800 | [diff] [blame^] | 29 | target: { |
| 30 | darwin: { |
| 31 | enabled: false, |
| 32 | }, |
| 33 | }, |
Kevin Rocard | 2d98fd3 | 2017-11-09 22:12:51 -0800 | [diff] [blame] | 34 | |
| 35 | srcs: ["primitives_benchmark.cpp"], |
| 36 | cflags: [ |
| 37 | "-Werror", |
| 38 | "-Wall", |
| 39 | ], |
| 40 | static_libs: [ |
| 41 | "libgoogle-benchmark", |
| 42 | "libaudioutils", |
| 43 | ], |
| 44 | } |
| 45 | |
| 46 | cc_binary { |
Dan Willemsen | c017c20 | 2016-09-12 16:15:40 -0700 | [diff] [blame] | 47 | name: "fifo_tests", |
| 48 | host_supported: true, |
| 49 | srcs: ["fifo_tests.cpp"], |
| 50 | shared_libs: ["libaudioutils"], |
| 51 | static_libs: ["libsndfile"], |
| 52 | cflags: [ |
| 53 | "-Werror", |
| 54 | "-Wall", |
| 55 | ], |
| 56 | } |
| 57 | |
Glenn Kasten | 39a75cc | 2016-09-12 09:35:05 -0700 | [diff] [blame] | 58 | cc_binary { |
| 59 | name: "fifo_multiprocess", |
| 60 | host_supported: false, |
| 61 | srcs: ["fifo_multiprocess.cpp"], |
| 62 | shared_libs: ["libaudioutils", "libcutils"], |
| 63 | static_libs: ["libsndfile"], |
| 64 | cflags: [ |
| 65 | "-Werror", |
| 66 | "-Wall", |
| 67 | ], |
| 68 | } |
| 69 | |
Dan Willemsen | c017c20 | 2016-09-12 16:15:40 -0700 | [diff] [blame] | 70 | cc_binary_host { |
Dan Willemsen | 03e86bd | 2016-09-12 21:34:12 -0700 | [diff] [blame] | 71 | name: "fifo_threads", |
| 72 | // TODO move getch.c and .h to a utility library |
| 73 | srcs: [ |
| 74 | "fifo_threads.cpp", |
| 75 | "getch.c", |
| 76 | ], |
| 77 | static_libs: [ |
| 78 | "libaudioutils", |
| 79 | "liblog", |
| 80 | ], |
| 81 | cflags: [ |
| 82 | "-Werror", |
| 83 | "-Wall", |
| 84 | ], |
| 85 | } |
| 86 | |
| 87 | cc_binary_host { |
Dan Willemsen | c017c20 | 2016-09-12 16:15:40 -0700 | [diff] [blame] | 88 | name: "limiter_tests", |
| 89 | srcs: ["limiter_tests.c"], |
| 90 | static_libs: ["libaudioutils"], |
| 91 | cflags: [ |
| 92 | "-Werror", |
| 93 | "-Wall", |
Dan Willemsen | 03e86bd | 2016-09-12 21:34:12 -0700 | [diff] [blame] | 94 | "-UNDEBUG", |
Dan Willemsen | c017c20 | 2016-09-12 16:15:40 -0700 | [diff] [blame] | 95 | ], |
| 96 | } |
Andy Hung | 459a2a3 | 2017-03-20 09:24:53 -0700 | [diff] [blame] | 97 | |
| 98 | cc_test { |
| 99 | name: "power_tests", |
| 100 | host_supported: true, |
| 101 | |
| 102 | shared_libs: [ |
| 103 | "libcutils", |
| 104 | "liblog", |
| 105 | ], |
| 106 | srcs: ["power_tests.cpp"], |
| 107 | cflags: [ |
| 108 | "-Wall", |
| 109 | "-Werror", |
| 110 | "-Wextra", |
| 111 | ], |
| 112 | target: { |
| 113 | android: { |
| 114 | shared_libs: ["libaudioutils"], |
| 115 | }, |
| 116 | host: { |
| 117 | static_libs: ["libaudioutils"], |
| 118 | }, |
| 119 | } |
| 120 | } |
Andy Hung | be289a8 | 2017-03-23 16:17:35 -0700 | [diff] [blame] | 121 | |
| 122 | cc_test { |
| 123 | name: "errorlog_tests", |
| 124 | host_supported: false, |
| 125 | |
| 126 | shared_libs: [ |
| 127 | "libcutils", |
| 128 | "liblog", |
| 129 | ], |
| 130 | srcs: ["errorlog_tests.cpp"], |
| 131 | cflags: [ |
| 132 | "-Wall", |
| 133 | "-Werror", |
| 134 | "-Wextra", |
| 135 | ], |
| 136 | target: { |
| 137 | android: { |
| 138 | shared_libs: ["libaudioutils"], |
| 139 | }, |
| 140 | host: { |
| 141 | static_libs: ["libaudioutils"], |
| 142 | }, |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | cc_test { |
| 147 | name: "powerlog_tests", |
| 148 | host_supported: false, |
| 149 | |
| 150 | shared_libs: [ |
| 151 | "libcutils", |
| 152 | "liblog", |
| 153 | ], |
| 154 | srcs: ["powerlog_tests.cpp"], |
| 155 | cflags: [ |
| 156 | "-Wall", |
| 157 | "-Werror", |
| 158 | "-Wextra", |
| 159 | ], |
| 160 | target: { |
| 161 | android: { |
| 162 | shared_libs: ["libaudioutils"], |
| 163 | }, |
| 164 | host: { |
| 165 | static_libs: ["libaudioutils"], |
| 166 | }, |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | cc_test { |
| 171 | name: "simplelog_tests", |
| 172 | host_supported: false, |
| 173 | |
| 174 | shared_libs: [ |
| 175 | "libcutils", |
| 176 | "liblog", |
| 177 | ], |
| 178 | srcs: ["simplelog_tests.cpp"], |
| 179 | cflags: [ |
| 180 | "-Wall", |
| 181 | "-Werror", |
| 182 | "-Wextra", |
| 183 | ], |
| 184 | target: { |
| 185 | android: { |
| 186 | shared_libs: ["libaudioutils"], |
| 187 | }, |
| 188 | host: { |
| 189 | static_libs: ["libaudioutils"], |
| 190 | }, |
| 191 | } |
| 192 | } |