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

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

Issue 2188543002: Add Vulkan runtime dll (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Fix presubmit 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
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 ios_flavor 22 from . import ios_flavor
23 from . import pdfium_flavor 23 from . import pdfium_flavor
24 from . import valgrind_flavor 24 from . import valgrind_flavor
25 from . import vulkan_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'
32 33
33 TEST_EXPECTED_SKP_VERSION = '42' 34 TEST_EXPECTED_SKP_VERSION = '42'
34 TEST_EXPECTED_SK_IMAGE_VERSION = '42' 35 TEST_EXPECTED_SK_IMAGE_VERSION = '42'
(...skipping 10 matching lines...) Expand all
45 'nanobench.exe', 46 'nanobench.exe',
46 '*.so', 47 '*.so',
47 '*.dll', 48 '*.dll',
48 '*.dylib', 49 '*.dylib',
49 'skia_launcher', 50 'skia_launcher',
50 'lib/*.so', 51 'lib/*.so',
51 'iOSShell.app', 52 'iOSShell.app',
52 'iOSShell.ipa', 53 'iOSShell.ipa',
53 'visualbench', 54 'visualbench',
54 'visualbench.exe', 55 'visualbench.exe',
56 'vulkan-1.dll',
55 ] 57 ]
56 58
57 59
58 def is_android(builder_cfg): 60 def is_android(builder_cfg):
59 """Determine whether the given builder is an Android builder.""" 61 """Determine whether the given builder is an Android builder."""
60 return ('Android' in builder_cfg.get('extra_config', '') or 62 return ('Android' in builder_cfg.get('extra_config', '') or
61 builder_cfg.get('os') == 'Android') 63 builder_cfg.get('os') == 'Android')
62 64
63 65
64 def is_cmake(builder_cfg): 66 def is_cmake(builder_cfg):
65 return 'CMake' in builder_cfg.get('extra_config', '') 67 return 'CMake' in builder_cfg.get('extra_config', '')
66 68
67 69
68 def is_ios(builder_cfg): 70 def is_ios(builder_cfg):
69 return ('iOS' in builder_cfg.get('extra_config', '') or 71 return ('iOS' in builder_cfg.get('extra_config', '') or
70 builder_cfg.get('os') == 'iOS') 72 builder_cfg.get('os') == 'iOS')
71 73
72 74
73 def is_pdfium(builder_cfg): 75 def is_pdfium(builder_cfg):
74 return 'PDFium' in builder_cfg.get('extra_config', '') 76 return 'PDFium' in builder_cfg.get('extra_config', '')
75 77
76 78
77 def is_valgrind(builder_cfg): 79 def is_valgrind(builder_cfg):
78 return 'Valgrind' in builder_cfg.get('extra_config', '') 80 return 'Valgrind' in builder_cfg.get('extra_config', '')
79 81
80 82
83 def is_vulkan(builder_cfg):
84 return 'Vulkan' in builder_cfg.get('extra_config', '')
85
81 def is_xsan(builder_cfg): 86 def is_xsan(builder_cfg):
82 return ('ASAN' in builder_cfg.get('extra_config', '') or 87 return ('ASAN' in builder_cfg.get('extra_config', '') or
83 'MSAN' in builder_cfg.get('extra_config', '') or 88 'MSAN' in builder_cfg.get('extra_config', '') or
84 'TSAN' in builder_cfg.get('extra_config', '')) 89 'TSAN' in builder_cfg.get('extra_config', ''))
85 90
86 91
87 class SkiaApi(recipe_api.RecipeApi): 92 class SkiaApi(recipe_api.RecipeApi):
88 93
89 def get_flavor(self, builder_cfg): 94 def get_flavor(self, builder_cfg):
90 """Return a flavor utils object specific to the given builder.""" 95 """Return a flavor utils object specific to the given builder."""
91 if is_android(builder_cfg): 96 if is_android(builder_cfg):
92 return android_flavor.AndroidFlavorUtils(self) 97 return android_flavor.AndroidFlavorUtils(self)
93 elif is_cmake(builder_cfg): 98 elif is_cmake(builder_cfg):
94 return cmake_flavor.CMakeFlavorUtils(self) 99 return cmake_flavor.CMakeFlavorUtils(self)
95 elif is_ios(builder_cfg): 100 elif is_ios(builder_cfg):
96 return ios_flavor.iOSFlavorUtils(self) 101 return ios_flavor.iOSFlavorUtils(self)
97 elif is_pdfium(builder_cfg): 102 elif is_pdfium(builder_cfg):
98 return pdfium_flavor.PDFiumFlavorUtils(self) 103 return pdfium_flavor.PDFiumFlavorUtils(self)
99 elif is_valgrind(builder_cfg): 104 elif is_valgrind(builder_cfg):
100 return valgrind_flavor.ValgrindFlavorUtils(self) 105 return valgrind_flavor.ValgrindFlavorUtils(self)
101 elif is_xsan(builder_cfg): 106 elif is_xsan(builder_cfg):
102 return xsan_flavor.XSanFlavorUtils(self) 107 return xsan_flavor.XSanFlavorUtils(self)
108 elif is_vulkan(builder_cfg):
109 return vulkan_flavor.VulkanFlavorUtils(self)
103 elif builder_cfg.get('configuration') == 'Coverage': 110 elif builder_cfg.get('configuration') == 'Coverage':
104 return coverage_flavor.CoverageFlavorUtils(self) 111 return coverage_flavor.CoverageFlavorUtils(self)
105 else: 112 else:
106 return default_flavor.DefaultFlavorUtils(self) 113 return default_flavor.DefaultFlavorUtils(self)
107 114
108 @property 115 @property
109 def home_dir(self): 116 def home_dir(self):
110 """Find the home directory.""" 117 """Find the home directory."""
111 home_dir = os.path.expanduser('~') 118 home_dir = os.path.expanduser('~')
112 if self._test_data.enabled: 119 if self._test_data.enabled:
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 # Don't bother to include role, which is always Test. 829 # Don't bother to include role, which is always Test.
823 # TryBots are uploaded elsewhere so they can use the same key. 830 # TryBots are uploaded elsewhere so they can use the same key.
824 blacklist = ['role', 'is_trybot'] 831 blacklist = ['role', 'is_trybot']
825 832
826 flat = [] 833 flat = []
827 for k in sorted(self.builder_cfg.keys()): 834 for k in sorted(self.builder_cfg.keys()):
828 if k not in blacklist: 835 if k not in blacklist:
829 flat.append(k) 836 flat.append(k)
830 flat.append(self.builder_cfg[k]) 837 flat.append(self.builder_cfg[k])
831 return flat 838 return flat
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698