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 = "PY2+3" 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.join('work') 21 out_dir = checkout_root.join( 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.join('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-Debian9-Clang-arm-Release-Flutter_Android_Docker', 31 'Build-Debian10-GCC-x86-Debug-Docker', 32 'Build-Debian10-GCC-x86_64-Debug-Docker', 33 'Build-Debian10-GCC-x86_64-Release-NoGPU_Docker', 34 'Build-Debian10-GCC-x86_64-Release-Shared_Docker', 35 'Build-Debian10-Clang-arm-Release-Android_API26', 36 'Build-Debian10-Clang-arm-Release-Android_ASAN', 37 'Build-Debian10-Clang-arm-Release-Chromebook_GLES', 38 'Build-Debian9-Clang-x86_64-Debug-Chromebook_GLES_Docker', 39 'Build-Debian9-Clang-x86_64-Release-Chromebook_GLES_Docker', 40 'Build-Debian10-Clang-arm-Release-Flutter_Android', 41 'Build-Debian10-Clang-arm64-Debug-Android_HWASAN', 42 'Build-Debian10-Clang-arm64-Release-Android_Wuffs', 43 'Build-Debian10-Clang-x86_64-Debug-Chromebook_GLES', 44 'Build-Debian10-Clang-x86_64-Debug-Coverage', 45 'Build-Debian10-Clang-x86_64-Debug-MSAN', 46 'Build-Debian10-Clang-x86_64-Debug-TSAN', 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_MSAN', 50 'Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN', 51 'Build-Debian10-Clang-x86_64-Debug-Tidy', 52 'Build-Debian10-Clang-x86_64-Debug-Wuffs', 53 'Build-Debian10-Clang-x86_64-Release-ANGLE', 54 'Build-Debian10-Clang-x86_64-Release-ASAN', 55 'Build-Debian10-Clang-x86_64-Release-CMake', 56 'Build-Debian10-Clang-x86_64-Release-Fast', 57 'Build-Debian10-Clang-x86_64-Release-NoDEPS', 58 'Build-Debian10-Clang-x86_64-Release-Static', 59 'Build-Debian10-Clang-x86_64-Release-SwiftShader', 60 'Build-Debian10-Clang-x86_64-Release-Vulkan', 61 'Build-Debian10-EMCC-asmjs-Debug-PathKit', 62 'Build-Debian10-EMCC-asmjs-Release-PathKit', 63 'Build-Debian10-EMCC-wasm-Debug-CanvasKit', 64 'Build-Debian10-EMCC-wasm-Debug-PathKit', 65 'Build-Debian10-EMCC-wasm-Release-CanvasKit_CPU', 66 'Build-Debian10-EMCC-wasm-Release-PathKit', 67 'Build-Mac-Clang-arm64-Debug-Android_Vulkan', 68 'Build-Mac-Clang-arm64-Debug-iOS', 69 "Build-Mac-Clang-arm64-Debug-Graphite", 70 "Build-Mac-Clang-arm64-Debug-Graphite_NoGpu", 71 "Build-Mac-Clang-arm64-Release-Graphite", 72 'Build-Mac-Xcode11.4.1-arm64-Debug-iOS', 73 'Build-Mac-Clang-x86_64-Debug-ASAN', 74 'Build-Mac-Clang-x86_64-Debug-CommandBuffer', 75 'Build-Mac-Clang-x86_64-Debug-Metal', 76 'Build-Win-Clang-arm64-Release-Android', 77 'Build-Win-Clang-x86-Debug-Exceptions', 78 'Build-Win-Clang-x86_64-Debug-ANGLE', 79 'Build-Win-Clang-x86_64-Release-Direct3D', 80 'Build-Win-Clang-x86_64-Release-Shared', 81 "Build-Win-Clang-x86_64-Release-Dawn", 82 'Build-Win-Clang-x86_64-Release-Vulkan', 83 'Housekeeper-PerCommit-CheckGeneratedFiles', 84] 85 86# Default properties used for TEST_BUILDERS. 87defaultProps = lambda buildername: dict( 88 buildername=buildername, 89 repository='https://skia.googlesource.com/skia.git', 90 revision='abc123', 91 path_config='kitchen', 92 patch_set=2, 93 swarm_out_dir='[SWARM_OUT_DIR]' 94) 95 96def GenTests(api): 97 for buildername in TEST_BUILDERS: 98 test = ( 99 api.test(buildername) + 100 api.properties(**defaultProps(buildername)) 101 ) 102 if 'Win' in buildername: 103 test += api.platform('win', 64) 104 yield test 105 106 yield ( 107 api.test('unknown-docker-image') + 108 api.properties(**defaultProps('Build-Unix-GCC-x86_64-Release-Docker')) + 109 api.expect_exception('Exception') 110 ) 111