Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: infra/bots/recipe_modules/skia/api.py

Issue 2189713003: recipes: Add a GN flavor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | infra/bots/recipe_modules/skia/fake_specs.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # pylint: disable=W0201 6 # pylint: disable=W0201
7 7
8 8
9 import json 9 import json
10 import os 10 import os
11 import re 11 import re
12 import sys 12 import sys
13 13
14 from recipe_engine import recipe_api 14 from recipe_engine import recipe_api
15 from recipe_engine import config_types 15 from recipe_engine import config_types
16 16
17 from . import android_flavor 17 from . import android_flavor
18 from . import cmake_flavor 18 from . import cmake_flavor
19 from . import coverage_flavor 19 from . import coverage_flavor
20 from . import default_flavor 20 from . import default_flavor
21 from . import fake_specs 21 from . import fake_specs
22 from . import gn_flavor
22 from . import ios_flavor 23 from . import ios_flavor
23 from . import pdfium_flavor 24 from . import pdfium_flavor
24 from . import valgrind_flavor 25 from . import valgrind_flavor
25 from . import xsan_flavor 26 from . import xsan_flavor
26 27
27 28
28 BOTO_CHROMIUM_SKIA_GM = 'chromium-skia-gm.boto' 29 BOTO_CHROMIUM_SKIA_GM = 'chromium-skia-gm.boto'
29 30
30 GS_SUBDIR_TMPL_SK_IMAGE = 'skimage/v%s' 31 GS_SUBDIR_TMPL_SK_IMAGE = 'skimage/v%s'
31 GS_SUBDIR_TMPL_SKP = 'playback_%s/skps' 32 GS_SUBDIR_TMPL_SKP = 'playback_%s/skps'
(...skipping 27 matching lines...) Expand all
59 def is_android(builder_cfg): 60 def is_android(builder_cfg):
60 """Determine whether the given builder is an Android builder.""" 61 """Determine whether the given builder is an Android builder."""
61 return ('Android' in builder_cfg.get('extra_config', '') or 62 return ('Android' in builder_cfg.get('extra_config', '') or
62 builder_cfg.get('os') == 'Android') 63 builder_cfg.get('os') == 'Android')
63 64
64 65
65 def is_cmake(builder_cfg): 66 def is_cmake(builder_cfg):
66 return 'CMake' in builder_cfg.get('extra_config', '') 67 return 'CMake' in builder_cfg.get('extra_config', '')
67 68
68 69
70 def is_gn(builder_cfg):
71 return 'GN' == builder_cfg.get('extra_config', '')
72
73
69 def is_ios(builder_cfg): 74 def is_ios(builder_cfg):
70 return ('iOS' in builder_cfg.get('extra_config', '') or 75 return ('iOS' in builder_cfg.get('extra_config', '') or
71 builder_cfg.get('os') == 'iOS') 76 builder_cfg.get('os') == 'iOS')
72 77
73 78
74 def is_pdfium(builder_cfg): 79 def is_pdfium(builder_cfg):
75 return 'PDFium' in builder_cfg.get('extra_config', '') 80 return 'PDFium' in builder_cfg.get('extra_config', '')
76 81
77 82
78 def is_valgrind(builder_cfg): 83 def is_valgrind(builder_cfg):
79 return 'Valgrind' in builder_cfg.get('extra_config', '') 84 return 'Valgrind' in builder_cfg.get('extra_config', '')
80 85
81 86
82 def is_xsan(builder_cfg): 87 def is_xsan(builder_cfg):
83 return ('ASAN' in builder_cfg.get('extra_config', '') or 88 return ('ASAN' in builder_cfg.get('extra_config', '') or
84 'MSAN' in builder_cfg.get('extra_config', '') or 89 'MSAN' in builder_cfg.get('extra_config', '') or
85 'TSAN' in builder_cfg.get('extra_config', '')) 90 'TSAN' in builder_cfg.get('extra_config', ''))
86 91
87 92
88 class SkiaApi(recipe_api.RecipeApi): 93 class SkiaApi(recipe_api.RecipeApi):
89 94
90 def get_flavor(self, builder_cfg): 95 def get_flavor(self, builder_cfg):
91 """Return a flavor utils object specific to the given builder.""" 96 """Return a flavor utils object specific to the given builder."""
92 if is_android(builder_cfg): 97 if is_android(builder_cfg):
93 return android_flavor.AndroidFlavorUtils(self) 98 return android_flavor.AndroidFlavorUtils(self)
94 elif is_cmake(builder_cfg): 99 elif is_cmake(builder_cfg):
95 return cmake_flavor.CMakeFlavorUtils(self) 100 return cmake_flavor.CMakeFlavorUtils(self)
101 elif is_gn(builder_cfg):
102 return gn_flavor.GNFlavorUtils(self)
96 elif is_ios(builder_cfg): 103 elif is_ios(builder_cfg):
97 return ios_flavor.iOSFlavorUtils(self) 104 return ios_flavor.iOSFlavorUtils(self)
98 elif is_pdfium(builder_cfg): 105 elif is_pdfium(builder_cfg):
99 return pdfium_flavor.PDFiumFlavorUtils(self) 106 return pdfium_flavor.PDFiumFlavorUtils(self)
100 elif is_valgrind(builder_cfg): 107 elif is_valgrind(builder_cfg):
101 return valgrind_flavor.ValgrindFlavorUtils(self) 108 return valgrind_flavor.ValgrindFlavorUtils(self)
102 elif is_xsan(builder_cfg): 109 elif is_xsan(builder_cfg):
103 return xsan_flavor.XSanFlavorUtils(self) 110 return xsan_flavor.XSanFlavorUtils(self)
104 elif builder_cfg.get('configuration') == 'Coverage': 111 elif builder_cfg.get('configuration') == 'Coverage':
105 return coverage_flavor.CoverageFlavorUtils(self) 112 return coverage_flavor.CoverageFlavorUtils(self)
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 # Don't bother to include role, which is always Test. 830 # Don't bother to include role, which is always Test.
824 # TryBots are uploaded elsewhere so they can use the same key. 831 # TryBots are uploaded elsewhere so they can use the same key.
825 blacklist = ['role', 'is_trybot'] 832 blacklist = ['role', 'is_trybot']
826 833
827 flat = [] 834 flat = []
828 for k in sorted(self.builder_cfg.keys()): 835 for k in sorted(self.builder_cfg.keys()):
829 if k not in blacklist: 836 if k not in blacklist:
830 flat.append(k) 837 flat.append(k)
831 flat.append(self.builder_cfg[k]) 838 flat.append(self.builder_cfg[k])
832 return flat 839 return flat
OLDNEW
« no previous file with comments | « no previous file | infra/bots/recipe_modules/skia/fake_specs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698