OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 declare_args() { | 5 declare_args() { |
6 use_system_libsrtp = false | 6 use_system_libsrtp = false |
7 } | 7 } |
8 | 8 |
9 config("libsrtp_config") { | 9 config("libsrtp_config") { |
10 defines = [ | 10 defines = [ |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 "srtp/crypto/math/stat.c", | 137 "srtp/crypto/math/stat.c", |
138 "srtp/crypto/replay/rdb.c", | 138 "srtp/crypto/replay/rdb.c", |
139 "srtp/crypto/replay/rdbx.c", | 139 "srtp/crypto/replay/rdbx.c", |
140 "srtp/crypto/replay/ut_sim.c", | 140 "srtp/crypto/replay/ut_sim.c", |
141 "srtp/crypto/rng/ctr_prng.c", | 141 "srtp/crypto/rng/ctr_prng.c", |
142 "srtp/crypto/rng/prng.c", | 142 "srtp/crypto/rng/prng.c", |
143 "srtp/crypto/rng/rand_source.c", | 143 "srtp/crypto/rng/rand_source.c", |
144 ] | 144 ] |
145 } | 145 } |
146 | 146 |
147 executable("rdbx_driver") { | 147 # TODO(GYP): A bunch of these tests don't compile (in gyp either). They're |
148 configs -= [ "//build/config/compiler:chromium_code" ] | 148 # not very broken, so could probably be made to work if it's useful. |
149 configs += [ "//build/config/compiler:no_chromium_code" ] | 149 if (!is_win) { |
150 configs += [ ":libsrtp_config" ] | 150 executable("rdbx_driver") { |
151 deps = [ ":libsrtp" ] | 151 configs -= [ "//build/config/compiler:chromium_code" ] |
152 sources = [ | 152 configs += [ "//build/config/compiler:no_chromium_code" ] |
153 "srtp/include/getopt_s.h", | 153 configs += [ ":libsrtp_config" ] |
154 "srtp/test/getopt_s.c", | 154 deps = [ ":libsrtp" ] |
155 "srtp/test/rdbx_driver.c", | 155 sources = [ |
156 ] | 156 "srtp/include/getopt_s.h", |
157 } | 157 "srtp/test/getopt_s.c", |
| 158 "srtp/test/rdbx_driver.c", |
| 159 ] |
| 160 } |
158 | 161 |
159 executable("srtp_driver") { | 162 executable("srtp_driver") { |
160 configs -= [ "//build/config/compiler:chromium_code" ] | 163 configs -= [ "//build/config/compiler:chromium_code" ] |
161 configs += [ "//build/config/compiler:no_chromium_code" ] | 164 configs += [ "//build/config/compiler:no_chromium_code" ] |
162 configs += [ ":libsrtp_config" ] | 165 configs += [ ":libsrtp_config" ] |
163 deps = [ ":libsrtp" ] | 166 deps = [ ":libsrtp" ] |
164 sources = [ | 167 sources = [ |
165 "srtp/include/getopt_s.h", | 168 "srtp/include/getopt_s.h", |
166 "srtp/include/srtp_priv.h", | 169 "srtp/include/srtp_priv.h", |
167 "srtp/test/getopt_s.c", | 170 "srtp/test/getopt_s.c", |
168 "srtp/test/srtp_driver.c", | 171 "srtp/test/srtp_driver.c", |
169 ] | 172 ] |
170 } | 173 } |
171 | 174 |
172 executable("roc_driver") { | 175 executable("roc_driver") { |
173 configs -= [ "//build/config/compiler:chromium_code" ] | 176 configs -= [ "//build/config/compiler:chromium_code" ] |
174 configs += [ "//build/config/compiler:no_chromium_code" ] | 177 configs += [ "//build/config/compiler:no_chromium_code" ] |
175 configs += [ ":libsrtp_config" ] | 178 configs += [ ":libsrtp_config" ] |
176 deps = [ ":libsrtp" ] | 179 deps = [ ":libsrtp" ] |
177 sources = [ | 180 sources = [ |
178 "srtp/crypto/include/rdbx.h", | 181 "srtp/crypto/include/rdbx.h", |
179 "srtp/include/ut_sim.h", | 182 "srtp/include/ut_sim.h", |
180 "srtp/test/roc_driver.c", | 183 "srtp/test/roc_driver.c", |
181 ] | 184 ] |
182 } | 185 } |
183 | 186 |
184 executable("replay_driver") { | 187 executable("replay_driver") { |
185 configs -= [ "//build/config/compiler:chromium_code" ] | 188 configs -= [ "//build/config/compiler:chromium_code" ] |
186 configs += [ "//build/config/compiler:no_chromium_code" ] | 189 configs += [ "//build/config/compiler:no_chromium_code" ] |
187 configs += [ ":libsrtp_config" ] | 190 configs += [ ":libsrtp_config" ] |
188 deps = [ ":libsrtp" ] | 191 deps = [ ":libsrtp" ] |
189 sources = [ | 192 sources = [ |
190 "srtp/crypto/include/rdbx.h", | 193 "srtp/crypto/include/rdbx.h", |
191 "srtp/include/ut_sim.h", | 194 "srtp/include/ut_sim.h", |
192 "srtp/test/replay_driver.c", | 195 "srtp/test/replay_driver.c", |
193 ] | 196 ] |
194 } | 197 } |
195 | 198 |
196 executable("rtpw") { | 199 executable("rtpw") { |
197 configs -= [ "//build/config/compiler:chromium_code" ] | 200 configs -= [ "//build/config/compiler:chromium_code" ] |
198 configs += [ "//build/config/compiler:no_chromium_code" ] | 201 configs += [ "//build/config/compiler:no_chromium_code" ] |
199 configs += [ ":libsrtp_config" ] | 202 configs += [ ":libsrtp_config" ] |
200 deps = [ ":libsrtp" ] | 203 deps = [ ":libsrtp" ] |
201 sources = [ | 204 sources = [ |
202 "srtp/include/getopt_s.h", | 205 "srtp/include/getopt_s.h", |
203 "srtp/include/rtp.h", | 206 "srtp/include/rtp.h", |
204 "srtp/include/srtp.h", | 207 "srtp/include/srtp.h", |
205 "srtp/crypto/include/datatypes.h", | 208 "srtp/crypto/include/datatypes.h", |
206 "srtp/test/getopt_s.c", | 209 "srtp/test/getopt_s.c", |
207 "srtp/test/rtp.c", | 210 "srtp/test/rtp.c", |
208 "srtp/test/rtpw.c", | 211 "srtp/test/rtpw.c", |
209 ] | 212 ] |
210 if (is_android) { | 213 if (is_android) { |
211 defines = [ "HAVE_SYS_SOCKET_H" ] | 214 defines = [ "HAVE_SYS_SOCKET_H" ] |
| 215 } |
| 216 } |
| 217 |
| 218 executable("srtp_test_cipher_driver") { |
| 219 configs -= [ "//build/config/compiler:chromium_code" ] |
| 220 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 221 configs += [ ":libsrtp_config" ] |
| 222 deps = [ ":libsrtp" ] |
| 223 sources = [ |
| 224 "srtp/crypto/test/cipher_driver.c", |
| 225 ] |
| 226 } |
| 227 |
| 228 executable("srtp_test_datatypes_driver") { |
| 229 configs -= [ "//build/config/compiler:chromium_code" ] |
| 230 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 231 configs += [ ":libsrtp_config" ] |
| 232 deps = [ ":libsrtp" ] |
| 233 sources = [ |
| 234 "srtp/crypto/test/datatypes_driver.c", |
| 235 ] |
| 236 } |
| 237 |
| 238 executable("srtp_test_stat_driver") { |
| 239 configs -= [ "//build/config/compiler:chromium_code" ] |
| 240 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 241 configs += [ ":libsrtp_config" ] |
| 242 deps = [ ":libsrtp" ] |
| 243 sources = [ |
| 244 "srtp/crypto/test/stat_driver.c", |
| 245 ] |
| 246 } |
| 247 |
| 248 executable("srtp_test_sha1_driver") { |
| 249 configs -= [ "//build/config/compiler:chromium_code" ] |
| 250 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 251 configs += [ ":libsrtp_config" ] |
| 252 deps = [ ":libsrtp" ] |
| 253 sources = [ |
| 254 "srtp/crypto/test/sha1_driver.c", |
| 255 ] |
| 256 } |
| 257 |
| 258 executable("srtp_test_kernel_driver") { |
| 259 configs -= [ "//build/config/compiler:chromium_code" ] |
| 260 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 261 configs += [ ":libsrtp_config" ] |
| 262 deps = [ ":libsrtp" ] |
| 263 sources = [ |
| 264 "srtp/crypto/test/kernel_driver.c", |
| 265 ] |
| 266 } |
| 267 |
| 268 executable("srtp_test_aes_calc") { |
| 269 configs -= [ "//build/config/compiler:chromium_code" ] |
| 270 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 271 configs += [ ":libsrtp_config" ] |
| 272 deps = [ ":libsrtp" ] |
| 273 sources = [ |
| 274 "srtp/crypto/test/aes_calc.c", |
| 275 ] |
| 276 } |
| 277 |
| 278 executable("srtp_test_rand_gen") { |
| 279 configs -= [ "//build/config/compiler:chromium_code" ] |
| 280 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 281 configs += [ ":libsrtp_config" ] |
| 282 deps = [ ":libsrtp" ] |
| 283 sources = [ |
| 284 "srtp/crypto/test/rand_gen.c", |
| 285 ] |
| 286 } |
| 287 |
| 288 executable("srtp_test_env") { |
| 289 configs -= [ "//build/config/compiler:chromium_code" ] |
| 290 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 291 configs += [ ":libsrtp_config" ] |
| 292 deps = [ ":libsrtp" ] |
| 293 sources = [ |
| 294 "srtp/crypto/test/env.c", |
| 295 ] |
| 296 } |
| 297 |
| 298 group("srtp_runtest") { |
| 299 deps = [ |
| 300 ":rdbx_driver", |
| 301 ":srtp_driver", |
| 302 ":roc_driver", |
| 303 ":replay_driver", |
| 304 ":rtpw", |
| 305 ":srtp_test_cipher_driver", |
| 306 ":srtp_test_datatypes_driver", |
| 307 ":srtp_test_stat_driver", |
| 308 ":srtp_test_sha1_driver", |
| 309 ":srtp_test_kernel_driver", |
| 310 ":srtp_test_aes_calc", |
| 311 ":srtp_test_rand_gen", |
| 312 ":srtp_test_env", |
| 313 ] |
212 } | 314 } |
213 } | 315 } |
214 | |
215 executable("srtp_test_cipher_driver") { | |
216 configs -= [ "//build/config/compiler:chromium_code" ] | |
217 configs += [ "//build/config/compiler:no_chromium_code" ] | |
218 configs += [ ":libsrtp_config" ] | |
219 deps = [ ":libsrtp" ] | |
220 sources = [ | |
221 "srtp/crypto/test/cipher_driver.c", | |
222 ] | |
223 } | |
224 | |
225 executable("srtp_test_datatypes_driver") { | |
226 configs -= [ "//build/config/compiler:chromium_code" ] | |
227 configs += [ "//build/config/compiler:no_chromium_code" ] | |
228 configs += [ ":libsrtp_config" ] | |
229 deps = [ ":libsrtp" ] | |
230 sources = [ | |
231 "srtp/crypto/test/datatypes_driver.c", | |
232 ] | |
233 } | |
234 | |
235 executable("srtp_test_stat_driver") { | |
236 configs -= [ "//build/config/compiler:chromium_code" ] | |
237 configs += [ "//build/config/compiler:no_chromium_code" ] | |
238 configs += [ ":libsrtp_config" ] | |
239 deps = [ ":libsrtp" ] | |
240 sources = [ | |
241 "srtp/crypto/test/stat_driver.c", | |
242 ] | |
243 } | |
244 | |
245 executable("srtp_test_sha1_driver") { | |
246 configs -= [ "//build/config/compiler:chromium_code" ] | |
247 configs += [ "//build/config/compiler:no_chromium_code" ] | |
248 configs += [ ":libsrtp_config" ] | |
249 deps = [ ":libsrtp" ] | |
250 sources = [ | |
251 "srtp/crypto/test/sha1_driver.c", | |
252 ] | |
253 } | |
254 | |
255 executable("srtp_test_kernel_driver") { | |
256 configs -= [ "//build/config/compiler:chromium_code" ] | |
257 configs += [ "//build/config/compiler:no_chromium_code" ] | |
258 configs += [ ":libsrtp_config" ] | |
259 deps = [ ":libsrtp" ] | |
260 sources = [ | |
261 "srtp/crypto/test/kernel_driver.c", | |
262 ] | |
263 } | |
264 | |
265 executable("srtp_test_aes_calc") { | |
266 configs -= [ "//build/config/compiler:chromium_code" ] | |
267 configs += [ "//build/config/compiler:no_chromium_code" ] | |
268 configs += [ ":libsrtp_config" ] | |
269 deps = [ ":libsrtp" ] | |
270 sources = [ | |
271 "srtp/crypto/test/aes_calc.c", | |
272 ] | |
273 } | |
274 | |
275 executable("srtp_test_rand_gen") { | |
276 configs -= [ "//build/config/compiler:chromium_code" ] | |
277 configs += [ "//build/config/compiler:no_chromium_code" ] | |
278 configs += [ ":libsrtp_config" ] | |
279 deps = [ ":libsrtp" ] | |
280 sources = [ | |
281 "srtp/crypto/test/rand_gen.c", | |
282 ] | |
283 } | |
284 | |
285 executable("srtp_test_env") { | |
286 configs -= [ "//build/config/compiler:chromium_code" ] | |
287 configs += [ "//build/config/compiler:no_chromium_code" ] | |
288 configs += [ ":libsrtp_config" ] | |
289 deps = [ ":libsrtp" ] | |
290 sources = [ | |
291 "srtp/crypto/test/env.c", | |
292 ] | |
293 } | |
294 | |
295 group("srtp_runtest") { | |
296 deps = [ | |
297 ":rdbx_driver", | |
298 ":srtp_driver", | |
299 ":roc_driver", | |
300 ":replay_driver", | |
301 ":rtpw", | |
302 ":srtp_test_cipher_driver", | |
303 ":srtp_test_datatypes_driver", | |
304 ":srtp_test_stat_driver", | |
305 ":srtp_test_sha1_driver", | |
306 ":srtp_test_kernel_driver", | |
307 ":srtp_test_aes_calc", | |
308 ":srtp_test_rand_gen", | |
309 ":srtp_test_env", | |
310 ] | |
311 } | |
312 } | 316 } |
OLD | NEW |