| 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 the Skia RecreateSKPs Bot.""" | 6 """Recipe for the Skia RecreateSKPs Bot.""" |
| 7 | 7 |
| 8 | 8 |
| 9 DEPS = [ | 9 DEPS = [ |
| 10 'build/file', | 10 'build/file', |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 if os.path.isfile(backup_file): | 85 if os.path.isfile(backup_file): |
| 86 os.rename(backup_file, token_file) | 86 os.rename(backup_file, token_file) |
| 87 """ % (DEPOT_TOOLS_AUTH_TOKEN_FILE, | 87 """ % (DEPOT_TOOLS_AUTH_TOKEN_FILE, |
| 88 DEPOT_TOOLS_AUTH_TOKEN_FILE_BACKUP), | 88 DEPOT_TOOLS_AUTH_TOKEN_FILE_BACKUP), |
| 89 ) | 89 ) |
| 90 | 90 |
| 91 | 91 |
| 92 def RunSteps(api): | 92 def RunSteps(api): |
| 93 # Check out Chrome. | 93 # Check out Chrome. |
| 94 api.skia.setup() | 94 api.skia.setup() |
| 95 api.gclient.runhooks( | |
| 96 env={'CPPFLAGS': '-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1'}) | |
| 97 | 95 |
| 98 src_dir = api.skia.checkout_root.join('src') | 96 src_dir = api.skia.checkout_root.join('src') |
| 97 out_dir = src_dir.join('out', 'Release') |
| 99 | 98 |
| 100 # Call build/gyp_chromium | 99 # Call GN. |
| 101 api.step('gyp_chromium', | 100 platform = 'linux64' # This bot only runs on linux; don't bother checking. |
| 102 ['build/gyp_chromium'], | 101 gn = src_dir.join('buildtools', platform, 'gn') |
| 102 api.step('GN', |
| 103 [gn, 'gen', out_dir], |
| 103 env={'CPPFLAGS': '-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1', | 104 env={'CPPFLAGS': '-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1', |
| 104 'GYP_GENERATORS': 'ninja'}, | 105 'GYP_GENERATORS': 'ninja'}, |
| 105 cwd=src_dir) | 106 cwd=src_dir) |
| 106 # Build Chrome. | 107 # Build Chrome. |
| 107 api.step('Build Chrome', | 108 api.step('Build Chrome', |
| 108 ['ninja', '-C', 'out/Release', 'chrome'], | 109 ['ninja', '-C', out_dir, 'chrome'], |
| 109 cwd=src_dir) | 110 cwd=src_dir) |
| 110 | 111 |
| 111 # Download boto file (needed by recreate_skps.py) to tmp dir. | 112 # Download boto file (needed by recreate_skps.py) to tmp dir. |
| 112 boto_file = api.path['slave_build'].join('tmp', '.boto') | 113 boto_file = api.path['slave_build'].join('tmp', '.boto') |
| 113 api.python.inline( | 114 api.python.inline( |
| 114 'download boto file', | 115 'download boto file', |
| 115 """ | 116 """ |
| 116 import os | 117 import os |
| 117 import urllib2 | 118 import urllib2 |
| 118 | 119 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 api.properties(buildername=builder, | 183 api.properties(buildername=builder, |
| 183 mastername=mastername, | 184 mastername=mastername, |
| 184 slavename=slavename, | 185 slavename=slavename, |
| 185 revision='abc123', | 186 revision='abc123', |
| 186 buildnumber=2, | 187 buildnumber=2, |
| 187 path_config='kitchen', | 188 path_config='kitchen', |
| 188 swarm_out_dir='[SWARM_OUT_DIR]') + | 189 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 189 api.path.exists(api.path['slave_build'].join('skp_output')) | 190 api.path.exists(api.path['slave_build'].join('skp_output')) |
| 190 ) | 191 ) |
| 191 yield test | 192 yield test |
| OLD | NEW |