| 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 """ | 5 """ |
| 6 Recipe for building and running tests for Libyuv stand-alone. | 6 Recipe for building and running tests for Libyuv stand-alone. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 from recipe_engine.types import freeze | 9 from recipe_engine.types import freeze |
| 10 | 10 |
| 11 DEPS = [ | 11 DEPS = [ |
| 12 'chromium', |
| 12 'depot_tools/bot_update', | 13 'depot_tools/bot_update', |
| 13 'chromium', | |
| 14 'depot_tools/gclient', | 14 'depot_tools/gclient', |
| 15 'depot_tools/tryserver', |
| 15 'libyuv', | 16 'libyuv', |
| 16 'recipe_engine/path', | 17 'recipe_engine/path', |
| 17 'recipe_engine/platform', | 18 'recipe_engine/platform', |
| 18 'recipe_engine/properties', | 19 'recipe_engine/properties', |
| 19 'recipe_engine/step', | 20 'recipe_engine/step', |
| 20 'depot_tools/tryserver', | |
| 21 ] | 21 ] |
| 22 | 22 |
| 23 RECIPE_CONFIGS = freeze({ | |
| 24 'libyuv': { | |
| 25 'chromium_config': 'libyuv', | |
| 26 'gclient_config': 'libyuv', | |
| 27 }, | |
| 28 'libyuv_clang': { | |
| 29 'chromium_config': 'libyuv_clang', | |
| 30 'gclient_config': 'libyuv', | |
| 31 }, | |
| 32 'libyuv_gcc': { | |
| 33 'chromium_config': 'libyuv_gcc', | |
| 34 'gclient_config': 'libyuv', | |
| 35 }, | |
| 36 'libyuv_android': { | |
| 37 'chromium_config': 'libyuv_android', | |
| 38 'gclient_config': 'libyuv_android', | |
| 39 }, | |
| 40 'libyuv_android_clang': { | |
| 41 'chromium_config': 'libyuv_android_clang', | |
| 42 'gclient_config': 'libyuv_android', | |
| 43 }, | |
| 44 'libyuv_ios': { | |
| 45 'chromium_config': 'libyuv_ios', | |
| 46 'gclient_config': 'libyuv_ios', | |
| 47 }, | |
| 48 }) | |
| 49 | |
| 50 BUILDERS = freeze({ | |
| 51 'client.libyuv': { | |
| 52 'builders': { | |
| 53 'Win32 Debug (VS2010)': { | |
| 54 'recipe_config': 'libyuv', | |
| 55 'chromium_apply_config': ['msvs2010'], | |
| 56 'chromium_config_kwargs': { | |
| 57 'BUILD_CONFIG': 'Debug', | |
| 58 'TARGET_BITS': 32, | |
| 59 }, | |
| 60 'testing': {'platform': 'win'}, | |
| 61 }, | |
| 62 'Win32 Release (VS2010)': { | |
| 63 'recipe_config': 'libyuv', | |
| 64 'chromium_apply_config': ['msvs2010'], | |
| 65 'chromium_config_kwargs': { | |
| 66 'BUILD_CONFIG': 'Release', | |
| 67 'TARGET_BITS': 32, | |
| 68 }, | |
| 69 'testing': {'platform': 'win'}, | |
| 70 }, | |
| 71 'Win64 Debug (VS2010)': { | |
| 72 'recipe_config': 'libyuv', | |
| 73 'chromium_apply_config': ['msvs2010'], | |
| 74 'chromium_config_kwargs': { | |
| 75 'BUILD_CONFIG': 'Debug', | |
| 76 'TARGET_BITS': 64, | |
| 77 }, | |
| 78 'testing': {'platform': 'win'}, | |
| 79 }, | |
| 80 'Win64 Release (VS2010)': { | |
| 81 'recipe_config': 'libyuv', | |
| 82 'chromium_apply_config': ['msvs2010'], | |
| 83 'chromium_config_kwargs': { | |
| 84 'BUILD_CONFIG': 'Release', | |
| 85 'TARGET_BITS': 64, | |
| 86 }, | |
| 87 'testing': {'platform': 'win'}, | |
| 88 }, | |
| 89 'Win32 Debug (VS2012)': { | |
| 90 'recipe_config': 'libyuv', | |
| 91 'chromium_apply_config': ['msvs2012'], | |
| 92 'chromium_config_kwargs': { | |
| 93 'BUILD_CONFIG': 'Debug', | |
| 94 'TARGET_BITS': 32, | |
| 95 }, | |
| 96 'testing': {'platform': 'win'}, | |
| 97 }, | |
| 98 'Win32 Release (VS2012)': { | |
| 99 'recipe_config': 'libyuv', | |
| 100 'chromium_apply_config': ['msvs2012'], | |
| 101 'chromium_config_kwargs': { | |
| 102 'BUILD_CONFIG': 'Release', | |
| 103 'TARGET_BITS': 32, | |
| 104 }, | |
| 105 'testing': {'platform': 'win'}, | |
| 106 }, | |
| 107 'Win64 Debug (VS2012)': { | |
| 108 'recipe_config': 'libyuv', | |
| 109 'chromium_apply_config': ['msvs2012'], | |
| 110 'chromium_config_kwargs': { | |
| 111 'BUILD_CONFIG': 'Debug', | |
| 112 'TARGET_BITS': 64, | |
| 113 }, | |
| 114 'testing': {'platform': 'win'}, | |
| 115 }, | |
| 116 'Win64 Release (VS2012)': { | |
| 117 'recipe_config': 'libyuv', | |
| 118 'chromium_apply_config': ['msvs2012'], | |
| 119 'chromium_config_kwargs': { | |
| 120 'BUILD_CONFIG': 'Release', | |
| 121 'TARGET_BITS': 64, | |
| 122 }, | |
| 123 'testing': {'platform': 'win'}, | |
| 124 }, | |
| 125 'Win32 Debug (VS2013)': { | |
| 126 'recipe_config': 'libyuv', | |
| 127 'chromium_apply_config': ['msvs2013'], | |
| 128 'chromium_config_kwargs': { | |
| 129 'BUILD_CONFIG': 'Debug', | |
| 130 'TARGET_BITS': 32, | |
| 131 }, | |
| 132 'testing': {'platform': 'win'}, | |
| 133 }, | |
| 134 'Win32 Release (VS2013)': { | |
| 135 'recipe_config': 'libyuv', | |
| 136 'chromium_apply_config': ['msvs2013'], | |
| 137 'chromium_config_kwargs': { | |
| 138 'BUILD_CONFIG': 'Release', | |
| 139 'TARGET_BITS': 32, | |
| 140 }, | |
| 141 'testing': {'platform': 'win'}, | |
| 142 }, | |
| 143 'Win64 Debug (VS2013)': { | |
| 144 'recipe_config': 'libyuv', | |
| 145 'chromium_apply_config': ['msvs2013'], | |
| 146 'chromium_config_kwargs': { | |
| 147 'BUILD_CONFIG': 'Debug', | |
| 148 'TARGET_BITS': 64, | |
| 149 }, | |
| 150 'testing': {'platform': 'win'}, | |
| 151 }, | |
| 152 'Win64 Release (VS2013)': { | |
| 153 'recipe_config': 'libyuv', | |
| 154 'chromium_apply_config': ['msvs2013'], | |
| 155 'chromium_config_kwargs': { | |
| 156 'BUILD_CONFIG': 'Release', | |
| 157 'TARGET_BITS': 64, | |
| 158 }, | |
| 159 'testing': {'platform': 'win'}, | |
| 160 }, | |
| 161 'Win32 Debug (Clang)': { | |
| 162 'recipe_config': 'libyuv_clang', | |
| 163 'chromium_config_kwargs': { | |
| 164 'BUILD_CONFIG': 'Debug', | |
| 165 'TARGET_BITS': 32, | |
| 166 }, | |
| 167 'testing': {'platform': 'win'}, | |
| 168 }, | |
| 169 'Win32 Release (Clang)': { | |
| 170 'recipe_config': 'libyuv_clang', | |
| 171 'chromium_config_kwargs': { | |
| 172 'BUILD_CONFIG': 'Release', | |
| 173 'TARGET_BITS': 32, | |
| 174 }, | |
| 175 'testing': {'platform': 'win'}, | |
| 176 }, | |
| 177 'Win64 Debug (Clang)': { | |
| 178 'recipe_config': 'libyuv_clang', | |
| 179 'chromium_config_kwargs': { | |
| 180 'BUILD_CONFIG': 'Debug', | |
| 181 'TARGET_BITS': 64, | |
| 182 }, | |
| 183 'testing': {'platform': 'win'}, | |
| 184 }, | |
| 185 'Win64 Release (Clang)': { | |
| 186 'recipe_config': 'libyuv_clang', | |
| 187 'chromium_config_kwargs': { | |
| 188 'BUILD_CONFIG': 'Release', | |
| 189 'TARGET_BITS': 64, | |
| 190 }, | |
| 191 'testing': {'platform': 'win'}, | |
| 192 }, | |
| 193 'Win64 Debug (GN)': { | |
| 194 'recipe_config': 'libyuv_clang', | |
| 195 'chromium_apply_config': ['gn'], | |
| 196 'chromium_config_kwargs': { | |
| 197 'BUILD_CONFIG': 'Debug', | |
| 198 'TARGET_BITS': 64, | |
| 199 }, | |
| 200 'testing': {'platform': 'win'}, | |
| 201 }, | |
| 202 'Win64 Release (GN)': { | |
| 203 'recipe_config': 'libyuv_clang', | |
| 204 'chromium_apply_config': ['gn'], | |
| 205 'chromium_config_kwargs': { | |
| 206 'BUILD_CONFIG': 'Release', | |
| 207 'TARGET_BITS': 64, | |
| 208 }, | |
| 209 'testing': {'platform': 'win'}, | |
| 210 }, | |
| 211 'Mac64 Debug': { | |
| 212 'recipe_config': 'libyuv', | |
| 213 'chromium_config_kwargs': { | |
| 214 'BUILD_CONFIG': 'Debug', | |
| 215 'TARGET_BITS': 64, | |
| 216 }, | |
| 217 'testing': {'platform': 'mac'}, | |
| 218 }, | |
| 219 'Mac64 Release': { | |
| 220 'recipe_config': 'libyuv', | |
| 221 'chromium_config_kwargs': { | |
| 222 'BUILD_CONFIG': 'Release', | |
| 223 'TARGET_BITS': 64, | |
| 224 }, | |
| 225 'testing': {'platform': 'mac'}, | |
| 226 }, | |
| 227 'Mac64 Debug (GN)': { | |
| 228 'recipe_config': 'libyuv', | |
| 229 'chromium_apply_config': ['gn'], | |
| 230 'chromium_config_kwargs': { | |
| 231 'BUILD_CONFIG': 'Debug', | |
| 232 'TARGET_BITS': 64, | |
| 233 }, | |
| 234 'testing': {'platform': 'mac'}, | |
| 235 }, | |
| 236 'Mac64 Release (GN)': { | |
| 237 'recipe_config': 'libyuv', | |
| 238 'chromium_apply_config': ['gn'], | |
| 239 'chromium_config_kwargs': { | |
| 240 'BUILD_CONFIG': 'Release', | |
| 241 'TARGET_BITS': 64, | |
| 242 }, | |
| 243 'testing': {'platform': 'mac'}, | |
| 244 }, | |
| 245 'Mac Asan': { | |
| 246 'recipe_config': 'libyuv_clang', | |
| 247 'chromium_apply_config': ['asan'], | |
| 248 'chromium_config_kwargs': { | |
| 249 'BUILD_CONFIG': 'Release', | |
| 250 'TARGET_BITS': 64, | |
| 251 }, | |
| 252 'testing': {'platform': 'mac'}, | |
| 253 }, | |
| 254 'iOS Debug': { | |
| 255 'recipe_config': 'libyuv_ios', | |
| 256 'chromium_config_kwargs': { | |
| 257 'BUILD_CONFIG': 'Debug', | |
| 258 'TARGET_BITS': 32, | |
| 259 'TARGET_ARCH': 'arm', | |
| 260 'TARGET_PLATFORM': 'ios', | |
| 261 }, | |
| 262 'testing': {'platform': 'mac'}, | |
| 263 }, | |
| 264 'iOS Release': { | |
| 265 'recipe_config': 'libyuv_ios', | |
| 266 'chromium_config_kwargs': { | |
| 267 'BUILD_CONFIG': 'Release', | |
| 268 'TARGET_BITS': 32, | |
| 269 'TARGET_ARCH': 'arm', | |
| 270 'TARGET_PLATFORM': 'ios', | |
| 271 }, | |
| 272 'testing': {'platform': 'mac'}, | |
| 273 }, | |
| 274 'iOS ARM64 Debug': { | |
| 275 'recipe_config': 'libyuv_ios', | |
| 276 'chromium_config_kwargs': { | |
| 277 'BUILD_CONFIG': 'Debug', | |
| 278 'TARGET_BITS': 64, | |
| 279 'TARGET_ARCH': 'arm', | |
| 280 'TARGET_PLATFORM': 'ios', | |
| 281 }, | |
| 282 'testing': {'platform': 'mac'}, | |
| 283 }, | |
| 284 'iOS ARM64 Release': { | |
| 285 'recipe_config': 'libyuv_ios', | |
| 286 'chromium_config_kwargs': { | |
| 287 'BUILD_CONFIG': 'Release', | |
| 288 'TARGET_BITS': 64, | |
| 289 'TARGET_ARCH': 'arm', | |
| 290 'TARGET_PLATFORM': 'ios', | |
| 291 }, | |
| 292 'testing': {'platform': 'mac'}, | |
| 293 }, | |
| 294 'Linux32 Debug': { | |
| 295 'recipe_config': 'libyuv', | |
| 296 'chromium_config_kwargs': { | |
| 297 'BUILD_CONFIG': 'Debug', | |
| 298 'TARGET_BITS': 32, | |
| 299 }, | |
| 300 'testing': {'platform': 'linux'}, | |
| 301 }, | |
| 302 'Linux32 Release': { | |
| 303 'recipe_config': 'libyuv', | |
| 304 'chromium_config_kwargs': { | |
| 305 'BUILD_CONFIG': 'Release', | |
| 306 'TARGET_BITS': 32, | |
| 307 }, | |
| 308 'testing': {'platform': 'linux'}, | |
| 309 }, | |
| 310 'Linux64 Debug': { | |
| 311 'recipe_config': 'libyuv', | |
| 312 'chromium_config_kwargs': { | |
| 313 'BUILD_CONFIG': 'Debug', | |
| 314 'TARGET_BITS': 64, | |
| 315 }, | |
| 316 'testing': {'platform': 'linux'}, | |
| 317 }, | |
| 318 'Linux64 Release': { | |
| 319 'recipe_config': 'libyuv', | |
| 320 'chromium_config_kwargs': { | |
| 321 'BUILD_CONFIG': 'Release', | |
| 322 'TARGET_BITS': 64, | |
| 323 }, | |
| 324 'testing': {'platform': 'linux'}, | |
| 325 }, | |
| 326 'Linux64 Debug (GN)': { | |
| 327 'recipe_config': 'libyuv', | |
| 328 'chromium_apply_config': ['gn'], | |
| 329 'chromium_config_kwargs': { | |
| 330 'BUILD_CONFIG': 'Debug', | |
| 331 'TARGET_BITS': 64, | |
| 332 }, | |
| 333 'testing': {'platform': 'linux'}, | |
| 334 }, | |
| 335 'Linux64 Release (GN)': { | |
| 336 'recipe_config': 'libyuv', | |
| 337 'chromium_apply_config': ['gn'], | |
| 338 'chromium_config_kwargs': { | |
| 339 'BUILD_CONFIG': 'Release', | |
| 340 'TARGET_BITS': 64, | |
| 341 }, | |
| 342 'testing': {'platform': 'linux'}, | |
| 343 }, | |
| 344 'Linux GCC': { | |
| 345 'recipe_config': 'libyuv_gcc', | |
| 346 'chromium_config_kwargs': { | |
| 347 'BUILD_CONFIG': 'Release', | |
| 348 'TARGET_BITS': 64, | |
| 349 }, | |
| 350 'testing': {'platform': 'linux'}, | |
| 351 }, | |
| 352 'Linux Asan': { | |
| 353 'recipe_config': 'libyuv_clang', | |
| 354 'chromium_apply_config': ['asan', 'lsan'], | |
| 355 'chromium_config_kwargs': { | |
| 356 'BUILD_CONFIG': 'Release', | |
| 357 'TARGET_BITS': 64, | |
| 358 }, | |
| 359 'testing': {'platform': 'linux'}, | |
| 360 }, | |
| 361 'Linux Memcheck': { | |
| 362 'recipe_config': 'libyuv', | |
| 363 'chromium_apply_config': ['memcheck'], | |
| 364 'gclient_apply_config': ['libyuv_valgrind'], | |
| 365 'chromium_config_kwargs': { | |
| 366 'BUILD_CONFIG': 'Release', | |
| 367 'TARGET_BITS': 64, | |
| 368 }, | |
| 369 'testing': {'platform': 'linux'}, | |
| 370 }, | |
| 371 'Linux MSan': { | |
| 372 'recipe_config': 'libyuv_clang', | |
| 373 'chromium_apply_config': ['msan', 'msan_full_origin_tracking', | |
| 374 'prebuilt_instrumented_libraries'], | |
| 375 'chromium_config_kwargs': { | |
| 376 'BUILD_CONFIG': 'Release', | |
| 377 'TARGET_BITS': 64, | |
| 378 }, | |
| 379 'testing': {'platform': 'linux'}, | |
| 380 }, | |
| 381 'Linux Tsan v2': { | |
| 382 'recipe_config': 'libyuv_clang', | |
| 383 'chromium_apply_config': ['tsan2'], | |
| 384 'chromium_config_kwargs': { | |
| 385 'BUILD_CONFIG': 'Release', | |
| 386 'TARGET_BITS': 64, | |
| 387 }, | |
| 388 'testing': {'platform': 'linux'}, | |
| 389 }, | |
| 390 'Linux UBSan': { | |
| 391 'recipe_config': 'libyuv_clang', | |
| 392 'chromium_apply_config': ['ubsan'], | |
| 393 'chromium_config_kwargs': { | |
| 394 'BUILD_CONFIG': 'Release', | |
| 395 'TARGET_BITS': 64, | |
| 396 }, | |
| 397 'testing': {'platform': 'linux'}, | |
| 398 }, | |
| 399 'Linux UBSan vptr': { | |
| 400 'recipe_config': 'libyuv_clang', | |
| 401 'chromium_apply_config': ['ubsan_vptr'], | |
| 402 'chromium_config_kwargs': { | |
| 403 'BUILD_CONFIG': 'Release', | |
| 404 'TARGET_BITS': 64, | |
| 405 }, | |
| 406 'testing': {'platform': 'linux'}, | |
| 407 }, | |
| 408 'Android Debug': { | |
| 409 'recipe_config': 'libyuv_android', | |
| 410 'chromium_config_kwargs': { | |
| 411 'BUILD_CONFIG': 'Debug', | |
| 412 'TARGET_PLATFORM': 'android', | |
| 413 'TARGET_ARCH': 'arm', | |
| 414 'TARGET_BITS': 32, | |
| 415 }, | |
| 416 'testing': {'platform': 'linux'}, | |
| 417 }, | |
| 418 'Android Release': { | |
| 419 'recipe_config': 'libyuv_android', | |
| 420 'chromium_config_kwargs': { | |
| 421 'BUILD_CONFIG': 'Release', | |
| 422 'TARGET_PLATFORM': 'android', | |
| 423 'TARGET_ARCH': 'arm', | |
| 424 'TARGET_BITS': 32, | |
| 425 }, | |
| 426 'testing': {'platform': 'linux'}, | |
| 427 }, | |
| 428 'Android ARM64 Debug': { | |
| 429 'recipe_config': 'libyuv_android', | |
| 430 'chromium_config_kwargs': { | |
| 431 'BUILD_CONFIG': 'Debug', | |
| 432 'TARGET_PLATFORM': 'android', | |
| 433 'TARGET_ARCH': 'arm', | |
| 434 'TARGET_BITS': 64, | |
| 435 }, | |
| 436 'testing': {'platform': 'linux'}, | |
| 437 }, | |
| 438 'Android Clang Debug': { | |
| 439 'recipe_config': 'libyuv_android_clang', | |
| 440 'chromium_config_kwargs': { | |
| 441 'BUILD_CONFIG': 'Debug', | |
| 442 'TARGET_PLATFORM': 'android', | |
| 443 'TARGET_ARCH': 'arm', | |
| 444 'TARGET_BITS': 32, | |
| 445 }, | |
| 446 'testing': {'platform': 'linux'}, | |
| 447 }, | |
| 448 'Android32 x86 Debug': { | |
| 449 'recipe_config': 'libyuv_android', | |
| 450 'chromium_config_kwargs': { | |
| 451 'BUILD_CONFIG': 'Debug', | |
| 452 'TARGET_PLATFORM': 'android', | |
| 453 'TARGET_ARCH': 'intel', | |
| 454 'TARGET_BITS': 32, | |
| 455 }, | |
| 456 'bot_type': 'builder', | |
| 457 'testing': {'platform': 'linux'}, | |
| 458 }, | |
| 459 'Android32 MIPS Debug': { | |
| 460 'recipe_config': 'libyuv_android_clang', | |
| 461 'chromium_config_kwargs': { | |
| 462 'BUILD_CONFIG': 'Debug', | |
| 463 'TARGET_PLATFORM': 'android', | |
| 464 'TARGET_ARCH': 'mipsel', | |
| 465 'TARGET_BITS': 32, | |
| 466 }, | |
| 467 'bot_type': 'builder', | |
| 468 'testing': {'platform': 'linux'}, | |
| 469 }, | |
| 470 'Android64 x64 Debug': { | |
| 471 'recipe_config': 'libyuv_android', | |
| 472 'chromium_config_kwargs': { | |
| 473 'BUILD_CONFIG': 'Debug', | |
| 474 'TARGET_PLATFORM': 'android', | |
| 475 'TARGET_ARCH': 'intel', | |
| 476 'TARGET_BITS': 64, | |
| 477 }, | |
| 478 'bot_type': 'builder', | |
| 479 'testing': {'platform': 'linux'}, | |
| 480 }, | |
| 481 'Android Debug (GN)': { | |
| 482 'recipe_config': 'libyuv_android', | |
| 483 'chromium_apply_config': ['gn'], | |
| 484 'chromium_config_kwargs': { | |
| 485 'BUILD_CONFIG': 'Debug', | |
| 486 'TARGET_PLATFORM': 'android', | |
| 487 'TARGET_ARCH': 'arm', | |
| 488 'TARGET_BITS': 32, | |
| 489 }, | |
| 490 'testing': {'platform': 'linux'}, | |
| 491 }, | |
| 492 'Android Release (GN)': { | |
| 493 'recipe_config': 'libyuv_android', | |
| 494 'chromium_apply_config': ['gn'], | |
| 495 'chromium_config_kwargs': { | |
| 496 'BUILD_CONFIG': 'Release', | |
| 497 'TARGET_PLATFORM': 'android', | |
| 498 'TARGET_ARCH': 'arm', | |
| 499 'TARGET_BITS': 32, | |
| 500 }, | |
| 501 'testing': {'platform': 'linux'}, | |
| 502 }, | |
| 503 }, | |
| 504 }, | |
| 505 'tryserver.libyuv': { | |
| 506 'builders': { | |
| 507 'win': { | |
| 508 'recipe_config': 'libyuv', | |
| 509 'chromium_config_kwargs': { | |
| 510 'BUILD_CONFIG': 'Debug', | |
| 511 'TARGET_BITS': 32, | |
| 512 }, | |
| 513 'testing': {'platform': 'win'}, | |
| 514 }, | |
| 515 'win_rel': { | |
| 516 'recipe_config': 'libyuv', | |
| 517 'chromium_config_kwargs': { | |
| 518 'BUILD_CONFIG': 'Release', | |
| 519 'TARGET_BITS': 32, | |
| 520 }, | |
| 521 'testing': {'platform': 'win'}, | |
| 522 }, | |
| 523 'win_x64_rel': { | |
| 524 'recipe_config': 'libyuv', | |
| 525 'chromium_config_kwargs': { | |
| 526 'BUILD_CONFIG': 'Release', | |
| 527 'TARGET_BITS': 64, | |
| 528 }, | |
| 529 'testing': {'platform': 'win'}, | |
| 530 }, | |
| 531 'win_clang': { | |
| 532 'recipe_config': 'libyuv_clang', | |
| 533 'chromium_config_kwargs': { | |
| 534 'BUILD_CONFIG': 'Debug', | |
| 535 'TARGET_BITS': 32, | |
| 536 }, | |
| 537 'testing': {'platform': 'win'}, | |
| 538 }, | |
| 539 'win_clang_rel': { | |
| 540 'recipe_config': 'libyuv_clang', | |
| 541 'chromium_config_kwargs': { | |
| 542 'BUILD_CONFIG': 'Release', | |
| 543 'TARGET_BITS': 32, | |
| 544 }, | |
| 545 'testing': {'platform': 'win'}, | |
| 546 }, | |
| 547 'win_x64_clang_rel': { | |
| 548 'recipe_config': 'libyuv_clang', | |
| 549 'chromium_config_kwargs': { | |
| 550 'BUILD_CONFIG': 'Release', | |
| 551 'TARGET_BITS': 64, | |
| 552 }, | |
| 553 'testing': {'platform': 'win'}, | |
| 554 }, | |
| 555 'win_x64_gn': { | |
| 556 'recipe_config': 'libyuv_clang', | |
| 557 'chromium_apply_config': ['gn'], | |
| 558 'chromium_config_kwargs': { | |
| 559 'BUILD_CONFIG': 'Debug', | |
| 560 'TARGET_BITS': 64, | |
| 561 }, | |
| 562 'testing': {'platform': 'win'}, | |
| 563 }, | |
| 564 'win_x64_gn_rel': { | |
| 565 'recipe_config': 'libyuv_clang', | |
| 566 'chromium_apply_config': ['gn'], | |
| 567 'chromium_config_kwargs': { | |
| 568 'BUILD_CONFIG': 'Release', | |
| 569 'TARGET_BITS': 64, | |
| 570 }, | |
| 571 'testing': {'platform': 'win'}, | |
| 572 }, | |
| 573 'mac': { | |
| 574 'recipe_config': 'libyuv', | |
| 575 'chromium_config_kwargs': { | |
| 576 'BUILD_CONFIG': 'Debug', | |
| 577 'TARGET_BITS': 64, | |
| 578 }, | |
| 579 'testing': {'platform': 'mac'}, | |
| 580 }, | |
| 581 'mac_rel': { | |
| 582 'recipe_config': 'libyuv', | |
| 583 'chromium_config_kwargs': { | |
| 584 'BUILD_CONFIG': 'Release', | |
| 585 'TARGET_BITS': 64, | |
| 586 }, | |
| 587 'testing': {'platform': 'mac'}, | |
| 588 }, | |
| 589 'mac_gn': { | |
| 590 'recipe_config': 'libyuv', | |
| 591 'chromium_apply_config': ['gn'], | |
| 592 'chromium_config_kwargs': { | |
| 593 'BUILD_CONFIG': 'Debug', | |
| 594 'TARGET_BITS': 64, | |
| 595 }, | |
| 596 'testing': {'platform': 'mac'}, | |
| 597 }, | |
| 598 'mac_gn_rel': { | |
| 599 'recipe_config': 'libyuv', | |
| 600 'chromium_apply_config': ['gn'], | |
| 601 'chromium_config_kwargs': { | |
| 602 'BUILD_CONFIG': 'Release', | |
| 603 'TARGET_BITS': 64, | |
| 604 }, | |
| 605 'testing': {'platform': 'mac'}, | |
| 606 }, | |
| 607 'mac_asan': { | |
| 608 'recipe_config': 'libyuv_clang', | |
| 609 'chromium_apply_config': ['asan'], | |
| 610 'chromium_config_kwargs': { | |
| 611 'BUILD_CONFIG': 'Release', | |
| 612 'TARGET_BITS': 64, | |
| 613 }, | |
| 614 'testing': {'platform': 'mac'}, | |
| 615 }, | |
| 616 'ios': { | |
| 617 'recipe_config': 'libyuv_ios', | |
| 618 'chromium_config_kwargs': { | |
| 619 'BUILD_CONFIG': 'Debug', | |
| 620 'TARGET_BITS': 32, | |
| 621 'TARGET_ARCH': 'arm', | |
| 622 'TARGET_PLATFORM': 'ios', | |
| 623 }, | |
| 624 'testing': {'platform': 'mac'}, | |
| 625 }, | |
| 626 'ios_rel': { | |
| 627 'recipe_config': 'libyuv_ios', | |
| 628 'chromium_config_kwargs': { | |
| 629 'BUILD_CONFIG': 'Release', | |
| 630 'TARGET_BITS': 32, | |
| 631 'TARGET_ARCH': 'arm', | |
| 632 'TARGET_PLATFORM': 'ios', | |
| 633 }, | |
| 634 'testing': {'platform': 'mac'}, | |
| 635 }, | |
| 636 'ios_arm64': { | |
| 637 'recipe_config': 'libyuv_ios', | |
| 638 'chromium_config_kwargs': { | |
| 639 'BUILD_CONFIG': 'Debug', | |
| 640 'TARGET_BITS': 64, | |
| 641 'TARGET_ARCH': 'arm', | |
| 642 'TARGET_PLATFORM': 'ios', | |
| 643 }, | |
| 644 'testing': {'platform': 'mac'}, | |
| 645 }, | |
| 646 'ios_arm64_rel': { | |
| 647 'recipe_config': 'libyuv_ios', | |
| 648 'chromium_config_kwargs': { | |
| 649 'BUILD_CONFIG': 'Release', | |
| 650 'TARGET_BITS': 64, | |
| 651 'TARGET_ARCH': 'arm', | |
| 652 'TARGET_PLATFORM': 'ios', | |
| 653 }, | |
| 654 'testing': {'platform': 'mac'}, | |
| 655 }, | |
| 656 'linux': { | |
| 657 'recipe_config': 'libyuv', | |
| 658 'chromium_config_kwargs': { | |
| 659 'BUILD_CONFIG': 'Debug', | |
| 660 'TARGET_BITS': 64, | |
| 661 }, | |
| 662 'testing': {'platform': 'linux'}, | |
| 663 }, | |
| 664 'linux_rel': { | |
| 665 'recipe_config': 'libyuv', | |
| 666 'chromium_config_kwargs': { | |
| 667 'BUILD_CONFIG': 'Release', | |
| 668 'TARGET_BITS': 64, | |
| 669 }, | |
| 670 'testing': {'platform': 'linux'}, | |
| 671 }, | |
| 672 'linux_gn': { | |
| 673 'recipe_config': 'libyuv', | |
| 674 'chromium_apply_config': ['gn'], | |
| 675 'chromium_config_kwargs': { | |
| 676 'BUILD_CONFIG': 'Debug', | |
| 677 'TARGET_BITS': 64, | |
| 678 }, | |
| 679 'testing': {'platform': 'linux'}, | |
| 680 }, | |
| 681 'linux_gn_rel': { | |
| 682 'recipe_config': 'libyuv', | |
| 683 'chromium_apply_config': ['gn'], | |
| 684 'chromium_config_kwargs': { | |
| 685 'BUILD_CONFIG': 'Release', | |
| 686 'TARGET_BITS': 64, | |
| 687 }, | |
| 688 'testing': {'platform': 'linux'}, | |
| 689 }, | |
| 690 'linux_gcc': { | |
| 691 'recipe_config': 'libyuv_gcc', | |
| 692 'chromium_config_kwargs': { | |
| 693 'BUILD_CONFIG': 'Release', | |
| 694 'TARGET_BITS': 64, | |
| 695 }, | |
| 696 'testing': {'platform': 'linux'}, | |
| 697 }, | |
| 698 'linux_asan': { | |
| 699 'recipe_config': 'libyuv_clang', | |
| 700 'chromium_apply_config': ['asan', 'lsan'], | |
| 701 'chromium_config_kwargs': { | |
| 702 'BUILD_CONFIG': 'Release', | |
| 703 'TARGET_BITS': 64, | |
| 704 }, | |
| 705 'testing': {'platform': 'linux'}, | |
| 706 }, | |
| 707 'linux_memcheck': { | |
| 708 'recipe_config': 'libyuv', | |
| 709 'chromium_apply_config': ['memcheck'], | |
| 710 'gclient_apply_config': ['libyuv_valgrind'], | |
| 711 'chromium_config_kwargs': { | |
| 712 'BUILD_CONFIG': 'Release', | |
| 713 'TARGET_BITS': 64, | |
| 714 }, | |
| 715 'testing': {'platform': 'linux'}, | |
| 716 }, | |
| 717 'linux_msan': { | |
| 718 'recipe_config': 'libyuv_clang', | |
| 719 'chromium_apply_config': ['msan', 'msan_full_origin_tracking', | |
| 720 'prebuilt_instrumented_libraries'], | |
| 721 'chromium_config_kwargs': { | |
| 722 'BUILD_CONFIG': 'Release', | |
| 723 'TARGET_BITS': 64, | |
| 724 }, | |
| 725 'testing': {'platform': 'linux'}, | |
| 726 }, | |
| 727 'linux_tsan2': { | |
| 728 'recipe_config': 'libyuv_clang', | |
| 729 'chromium_apply_config': ['tsan2'], | |
| 730 'chromium_config_kwargs': { | |
| 731 'BUILD_CONFIG': 'Release', | |
| 732 'TARGET_BITS': 64, | |
| 733 }, | |
| 734 'testing': {'platform': 'linux'}, | |
| 735 }, | |
| 736 'linux_ubsan': { | |
| 737 'recipe_config': 'libyuv_clang', | |
| 738 'chromium_apply_config': ['ubsan'], | |
| 739 'chromium_config_kwargs': { | |
| 740 'BUILD_CONFIG': 'Release', | |
| 741 'TARGET_BITS': 64, | |
| 742 }, | |
| 743 'testing': {'platform': 'linux'}, | |
| 744 }, | |
| 745 'linux_ubsan_vptr': { | |
| 746 'recipe_config': 'libyuv_clang', | |
| 747 'chromium_apply_config': ['ubsan_vptr'], | |
| 748 'chromium_config_kwargs': { | |
| 749 'BUILD_CONFIG': 'Release', | |
| 750 'TARGET_BITS': 64, | |
| 751 }, | |
| 752 'testing': {'platform': 'linux'}, | |
| 753 }, | |
| 754 'android': { | |
| 755 'recipe_config': 'libyuv_android', | |
| 756 'chromium_config_kwargs': { | |
| 757 'BUILD_CONFIG': 'Debug', | |
| 758 'TARGET_PLATFORM': 'android', | |
| 759 'TARGET_ARCH': 'arm', | |
| 760 'TARGET_BITS': 32, | |
| 761 }, | |
| 762 'testing': {'platform': 'linux'}, | |
| 763 }, | |
| 764 'android_rel': { | |
| 765 'recipe_config': 'libyuv_android', | |
| 766 'chromium_config_kwargs': { | |
| 767 'BUILD_CONFIG': 'Release', | |
| 768 'TARGET_PLATFORM': 'android', | |
| 769 'TARGET_ARCH': 'arm', | |
| 770 'TARGET_BITS': 32, | |
| 771 }, | |
| 772 'testing': {'platform': 'linux'}, | |
| 773 }, | |
| 774 'android_clang': { | |
| 775 'recipe_config': 'libyuv_android_clang', | |
| 776 'chromium_config_kwargs': { | |
| 777 'BUILD_CONFIG': 'Debug', | |
| 778 'TARGET_PLATFORM': 'android', | |
| 779 'TARGET_ARCH': 'arm', | |
| 780 'TARGET_BITS': 32, | |
| 781 }, | |
| 782 'testing': {'platform': 'linux'}, | |
| 783 }, | |
| 784 'android_arm64': { | |
| 785 'recipe_config': 'libyuv_android', | |
| 786 'chromium_config_kwargs': { | |
| 787 'BUILD_CONFIG': 'Debug', | |
| 788 'TARGET_PLATFORM': 'android', | |
| 789 'TARGET_ARCH': 'arm', | |
| 790 'TARGET_BITS': 64, | |
| 791 }, | |
| 792 'testing': {'platform': 'linux'}, | |
| 793 }, | |
| 794 'android_x86': { | |
| 795 'recipe_config': 'libyuv_android', | |
| 796 'chromium_config_kwargs': { | |
| 797 'BUILD_CONFIG': 'Debug', | |
| 798 'TARGET_PLATFORM': 'android', | |
| 799 'TARGET_ARCH': 'intel', | |
| 800 'TARGET_BITS': 32, | |
| 801 }, | |
| 802 'testing': {'platform': 'linux'}, | |
| 803 }, | |
| 804 'android_x64': { | |
| 805 'recipe_config': 'libyuv_android', | |
| 806 'chromium_config_kwargs': { | |
| 807 'BUILD_CONFIG': 'Debug', | |
| 808 'TARGET_PLATFORM': 'android', | |
| 809 'TARGET_ARCH': 'intel', | |
| 810 'TARGET_BITS': 64, | |
| 811 }, | |
| 812 'testing': {'platform': 'linux'}, | |
| 813 }, | |
| 814 'android_mips': { | |
| 815 'recipe_config': 'libyuv_android_clang', | |
| 816 'chromium_config_kwargs': { | |
| 817 'BUILD_CONFIG': 'Debug', | |
| 818 'TARGET_PLATFORM': 'android', | |
| 819 'TARGET_ARCH': 'mipsel', | |
| 820 'TARGET_BITS': 32, | |
| 821 }, | |
| 822 'testing': {'platform': 'linux'}, | |
| 823 }, | |
| 824 'android_gn': { | |
| 825 'recipe_config': 'libyuv_android', | |
| 826 'chromium_apply_config': ['gn'], | |
| 827 'chromium_config_kwargs': { | |
| 828 'BUILD_CONFIG': 'Debug', | |
| 829 'TARGET_PLATFORM': 'android', | |
| 830 'TARGET_ARCH': 'arm', | |
| 831 'TARGET_BITS': 32, | |
| 832 }, | |
| 833 'testing': {'platform': 'linux'}, | |
| 834 }, | |
| 835 'android_gn_rel': { | |
| 836 'recipe_config': 'libyuv_android', | |
| 837 'chromium_apply_config': ['gn'], | |
| 838 'chromium_config_kwargs': { | |
| 839 'BUILD_CONFIG': 'Release', | |
| 840 'TARGET_PLATFORM': 'android', | |
| 841 'TARGET_ARCH': 'arm', | |
| 842 'TARGET_BITS': 32, | |
| 843 }, | |
| 844 'testing': {'platform': 'linux'}, | |
| 845 }, | |
| 846 }, | |
| 847 }, | |
| 848 }) | |
| 849 | |
| 850 def RunSteps(api): | 23 def RunSteps(api): |
| 851 mastername = api.properties.get('mastername') | 24 libyuv = api.libyuv |
| 852 buildername = api.properties.get('buildername') | 25 libyuv.apply_bot_config(libyuv.BUILDERS, libyuv.RECIPE_CONFIGS) |
| 853 master_dict = BUILDERS.get(mastername, {}) | |
| 854 bot_config = master_dict.get('builders', {}).get(buildername) | |
| 855 assert bot_config, ('Unrecognized builder name "%r" for master "%r".' % | |
| 856 (buildername, mastername)) | |
| 857 recipe_config_name = bot_config['recipe_config'] | |
| 858 recipe_config = RECIPE_CONFIGS.get(recipe_config_name) | |
| 859 assert recipe_config, ('Cannot find recipe_config "%s" for builder "%r".' % | |
| 860 (recipe_config_name, buildername)) | |
| 861 | |
| 862 api.chromium.set_config(recipe_config['chromium_config'], | |
| 863 **bot_config.get('chromium_config_kwargs', {})) | |
| 864 api.gclient.set_config(recipe_config['gclient_config']) | |
| 865 for c in bot_config.get('gclient_apply_config', []): | |
| 866 api.gclient.apply_config(c) | |
| 867 for c in bot_config.get('chromium_apply_config', []): | |
| 868 api.chromium.apply_config(c) | |
| 869 | |
| 870 if api.tryserver.is_tryserver: | |
| 871 api.chromium.apply_config('trybot_flavor') | |
| 872 | 26 |
| 873 api.bot_update.ensure_checkout(force=True) | 27 api.bot_update.ensure_checkout(force=True) |
| 874 api.chromium.ensure_goma() | 28 api.chromium.ensure_goma() |
| 875 api.chromium.runhooks() | 29 api.chromium.runhooks() |
| 876 | 30 |
| 877 if api.chromium.c.project_generator.tool == 'gn': | 31 if libyuv.should_build: |
| 878 api.chromium.run_gn(use_goma=True) | 32 if api.chromium.c.project_generator.tool == 'gn': |
| 879 api.chromium.compile(targets=['all']) | 33 api.chromium.run_gn(use_goma=True) |
| 880 else: | 34 api.chromium.compile(targets=['all']) |
| 881 api.chromium.compile() | 35 else: |
| 882 if api.chromium.c.TARGET_PLATFORM in ('win', 'mac', 'linux'): | 36 api.chromium.compile() |
| 883 api.chromium.runtest('libyuv_unittest') | 37 |
| 38 if libyuv.should_test: |
| 39 api.chromium.runtest('libyuv_unittest') |
| 884 | 40 |
| 885 | 41 |
| 886 def _sanitize_nonalpha(text): | 42 def _sanitize_nonalpha(text): |
| 887 return ''.join(c if c.isalnum() else '_' for c in text.lower()) | 43 return ''.join(c if c.isalnum() else '_' for c in text.lower()) |
| 888 | 44 |
| 889 | 45 |
| 890 def GenTests(api): | 46 def GenTests(api): |
| 47 builders = api.libyuv.BUILDERS |
| 48 |
| 891 def generate_builder(mastername, buildername, revision, suffix=None): | 49 def generate_builder(mastername, buildername, revision, suffix=None): |
| 892 suffix = suffix or '' | 50 suffix = suffix or '' |
| 893 bot_config = BUILDERS[mastername]['builders'][buildername] | 51 bot_config = builders[mastername]['builders'][buildername] |
| 894 | 52 |
| 895 chromium_kwargs = bot_config.get('chromium_config_kwargs', {}) | 53 chromium_kwargs = bot_config.get('chromium_config_kwargs', {}) |
| 896 test = ( | 54 test = ( |
| 897 api.test('%s_%s%s' % (_sanitize_nonalpha(mastername), | 55 api.test('%s_%s%s' % (_sanitize_nonalpha(mastername), |
| 898 _sanitize_nonalpha(buildername), suffix)) + | 56 _sanitize_nonalpha(buildername), suffix)) + |
| 899 api.properties(mastername=mastername, | 57 api.properties(mastername=mastername, |
| 900 buildername=buildername, | 58 buildername=buildername, |
| 901 slavename='slavename', | 59 slavename='slavename', |
| 902 BUILD_CONFIG=chromium_kwargs['BUILD_CONFIG']) + | 60 BUILD_CONFIG=chromium_kwargs['BUILD_CONFIG']) + |
| 903 api.platform(bot_config['testing']['platform'], | 61 api.platform(bot_config['testing']['platform'], |
| 904 chromium_kwargs.get('TARGET_BITS', 64)) | 62 chromium_kwargs.get('TARGET_BITS', 64)) |
| 905 ) | 63 ) |
| 906 | 64 |
| 907 if revision: | 65 if revision: |
| 908 test += api.properties(revision=revision) | 66 test += api.properties(revision=revision) |
| 909 | 67 |
| 910 if mastername.startswith('tryserver'): | 68 if mastername.startswith('tryserver'): |
| 911 test += api.properties(patch_url='try_job_svn_patch') | 69 test += api.properties(patch_url='try_job_svn_patch') |
| 912 return test | 70 return test |
| 913 | 71 |
| 914 for mastername, master_config in BUILDERS.iteritems(): | 72 for mastername, master_config in builders.iteritems(): |
| 915 for buildername in master_config['builders'].keys(): | 73 for buildername in master_config['builders'].keys(): |
| 916 yield generate_builder(mastername, buildername, revision='12345') | 74 yield generate_builder(mastername, buildername, revision='12345') |
| 917 | 75 |
| 918 # Forced builds (not specifying any revision) and test failures. | 76 # Forced builds (not specifying any revision) and test failures. |
| 919 mastername = 'client.libyuv' | 77 mastername = 'client.libyuv' |
| 920 yield generate_builder(mastername, 'Linux64 Debug', revision=None, | 78 yield generate_builder(mastername, 'Linux64 Debug', revision=None, |
| 921 suffix='_forced') | 79 suffix='_forced') |
| 922 yield generate_builder(mastername, 'Android Debug', revision=None, | 80 yield generate_builder(mastername, 'Android Debug', revision=None, |
| 923 suffix='_forced') | 81 suffix='_forced') |
| 924 | 82 |
| 925 yield generate_builder('tryserver.libyuv', 'linux', revision=None, | 83 yield generate_builder('tryserver.libyuv', 'linux', revision=None, |
| 926 suffix='_forced') | 84 suffix='_forced') |
| OLD | NEW |