1# Copyright 2017 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5PYTHON_VERSION_COMPATIBILITY = 'PY3' 6 7DEPS = [ 8 'build', 9 'recipe_engine/path', 10 'recipe_engine/platform', 11 'recipe_engine/properties', 12 'recipe_engine/raw_io', 13 'run', 14 'vars', 15] 16 17 18def RunSteps(api): 19 api.vars.setup() 20 checkout_root = api.vars.cache_dir.joinpath('work') 21 out_dir = checkout_root.joinpath( 22 'skia', 'out', api.vars.builder_name, api.vars.configuration) 23 api.build(checkout_root=checkout_root, out_dir=out_dir) 24 dst = api.vars.swarming_out_dir.joinpath('out', api.vars.configuration) 25 api.build.copy_build_products(out_dir=out_dir, dst=dst) 26 api.run.check_failure() 27 28 29TEST_BUILDERS = [ 30 'Build-Debian10-Clang-arm-Release-Android_API26', 31 'Build-Debian10-Clang-arm-Release-Android_ASAN', 32 'Build-Debian10-Clang-arm-OptimizeForSize-Android_NoPatch', 33 'Build-Debian10-Clang-arm-Release-Chromebook_GLES', 34 'Build-Debian10-Clang-arm64-Debug-Android_FrameworkWorkarounds', 35 'Build-Debian10-Clang-arm64-Debug-Android_Graphite_Native_Vulkan', 36 'Build-Debian10-Clang-arm64-Debug-Android_HWASAN', 37 'Build-Debian10-Clang-arm64-Release-Android_Graphite_Dawn_GLES', 38 'Build-Debian10-Clang-arm64-Release-Android_Graphite_Dawn_Vulkan', 39 'Build-Debian10-Clang-arm64-Release-Android_Wuffs', 40 'Build-Debian10-Clang-x86_64-Debug-ASAN_Graphite_Native_Vulkan', 41 'Build-Debian10-Clang-x86_64-Debug-AVIF', 42 'Build-Debian10-Clang-x86_64-Debug-Chromebook_GLES', 43 'Build-Debian10-Clang-x86_64-Debug-Coverage', 44 'Build-Debian10-Clang-x86_64-Debug-Fontations', 45 'Build-Debian10-Clang-x86_64-Debug-FreeType', 46 'Build-Debian10-Clang-x86_64-Debug-MSAN', 47 'Build-Debian10-Clang-x86_64-Debug-SK_CPU_LIMIT_SSE41', 48 'Build-Debian10-Clang-x86_64-Debug-SafeStack', 49 'Build-Debian10-Clang-x86_64-Debug-SwiftShader_Graphite', 50 'Build-Debian10-Clang-x86_64-Debug-SwiftShader_MSAN', 51 'Build-Debian10-Clang-x86_64-Debug-TSAN', 52 'Build-Debian10-Clang-x86_64-Debug-Tidy', 53 'Build-Debian10-Clang-x86_64-Debug-Vulkan_TSAN', 54 'Build-Debian10-Clang-x86_64-Debug-Wuffs', 55 'Build-Debian10-Clang-x86_64-OptimizeForSize', 56 'Build-Debian10-Clang-x86_64-Release-ANGLE', 57 'Build-Debian10-Clang-x86_64-Release-ASAN', 58 'Build-Debian10-Clang-x86_64-Release-AVIF', 59 'Build-Debian10-Clang-x86_64-Release-CMake', 60 'Build-Debian10-Clang-x86_64-Release-Fast', 61 'Build-Debian10-Clang-x86_64-Release-NoDEPS', 62 'Build-Debian10-Clang-x86_64-Release-RustPNG', 63 'Build-Debian10-Clang-x86_64-Release-Static', 64 'Build-Debian10-Clang-x86_64-Release-SwiftShader', 65 'Build-Debian10-Clang-x86_64-Release-Vulkan', 66 'Build-Debian10-EMCC-asmjs-Debug-PathKit', 67 'Build-Debian10-EMCC-asmjs-Release-PathKit', 68 'Build-Debian10-EMCC-wasm-Debug-CanvasKit', 69 'Build-Debian10-EMCC-wasm-Debug-PathKit', 70 'Build-Debian10-EMCC-wasm-Release-CanvasKit_CPU', 71 'Build-Debian10-EMCC-wasm-Release-CanvasKit_WebGPU', 72 'Build-Debian10-EMCC-wasm-Release-PathKit', 73 'Build-Debian11-GCC-x86-Debug-Docker', 74 'Build-Debian11-GCC-x86_64-Debug-Docker', 75 'Build-Debian11-GCC-x86_64-Release-NoGPU_Docker', 76 'Build-Debian11-GCC-x86_64-Release-Shared_Docker', 77 'Build-Mac-Clang-arm64-Debug-Android_Vulkan', 78 'Build-Mac-Clang-arm64-Debug-iOS', 79 'Build-Mac-Clang-arm64-Debug-Graphite_Dawn_Metal', 80 'Build-Mac-Clang-arm64-Debug-Graphite_Dawn_Metal_NoGpu', 81 'Build-Mac-Clang-arm64-Debug-Graphite_Dawn_Metal_NoPrecompile', 82 'Build-Mac-Clang-arm64-Debug-Graphite_Native_Metal', 83 'Build-Mac-Clang-arm64-Debug-Graphite_Native_Metal_NoGpu', 84 'Build-Mac-Clang-arm64-Debug-Graphite_Native_Metal_NoPrecompile', 85 'Build-Mac-Clang-arm64-Release-Graphite_Native_Metal', 86 'Build-Mac-Clang-arm64-Release-Graphite_Native_Dawn_Metal', 87 'Build-Mac-Clang-x86_64-Release-Graphite_Native_Metal_Vello', 88 'Build-Mac-Clang-arm64-Debug-iOS_iOS12', 89 'Build-Mac-Clang-x86_64-Debug-ASAN', 90 'Build-Mac-Clang-x86_64-Debug-Metal', 91 'Build-Win-Clang-arm64-Release-Android', 92 'Build-Win-Clang-x86-Debug-Exceptions', 93 'Build-Win-Clang-x86_64-Debug-ANGLE', 94 'Build-Win-Clang-x86_64-Release-Graphite_Native_Vulkan', 95 'Build-Win-Clang-x86_64-Release-Direct3D', 96 'Build-Win-Clang-x86_64-Release-Shared', 97 'Build-Win-Clang-x86_64-Release-Vulkan', 98 'Build-Win-MSVC-x86_64-Release-Graphite_Dawn_D3D11', 99 'Build-Win-MSVC-x86_64-Release-Graphite_Dawn_D3D12', 100 'Build-Debian10-Clang-x86_64-Release-SK_USE_PADDED_BLUR_UPSCALE', 101] 102 103# Default properties used for TEST_BUILDERS. 104defaultProps = lambda buildername: dict( 105 buildername=buildername, 106 repository='https://skia.googlesource.com/skia.git', 107 revision='abc123', 108 path_config='kitchen', 109 patch_set=2, 110 swarm_out_dir='[SWARM_OUT_DIR]' 111) 112 113def GenTests(api): 114 for buildername in TEST_BUILDERS: 115 test = ( 116 api.test(buildername) + 117 api.properties(**defaultProps(buildername)) 118 ) 119 if 'Win' in buildername: 120 test += api.platform('win', 64) 121 yield test 122 123 yield ( 124 api.test('unknown-docker-image') + 125 api.properties(**defaultProps('Build-Unix-GCC-x86_64-Release-Docker')) + 126 api.expect_exception('Exception') 127 ) 128