Reland: Use bundled recipes for all test/perf tasks
It won't save as much time for faster machines, but it should still shave a few seconds, and it'll be nice to be consistent. Bug: skia: Change-Id: I0b2aa010579b527c66325cb5b691bfb549b31316 Reviewed-on: https://skia-review.googlesource.com/11418 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Eric Boren <borenet@google.com>
This commit is contained in:
parent
5f055f0fe9
commit
23a6ec6eb3
@ -244,6 +244,13 @@ func bundleRecipes(b *specs.TasksCfgBuilder) string {
|
||||
return BUNDLE_RECIPES_NAME
|
||||
}
|
||||
|
||||
// useBundledRecipes returns true iff the given bot should use bundled recipes
|
||||
// instead of syncing recipe DEPS itself.
|
||||
func useBundledRecipes(parts map[string]string) bool {
|
||||
// Use bundled recipes for all test/perf tasks.
|
||||
return true
|
||||
}
|
||||
|
||||
// compile generates a compile task. Returns the name of the last task in the
|
||||
// generated chain of tasks, which the Job should add as a dependency.
|
||||
func compile(b *specs.TasksCfgBuilder, name string, parts map[string]string) string {
|
||||
@ -477,9 +484,13 @@ func test(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
|
||||
MaxAttempts: 1,
|
||||
Priority: 0.8,
|
||||
}
|
||||
if parts["os"] == "Android" {
|
||||
if useBundledRecipes(parts) {
|
||||
s.Dependencies = append(s.Dependencies, BUNDLE_RECIPES_NAME)
|
||||
s.Isolate = "test_skia_bundled.isolate"
|
||||
if strings.Contains(parts["os"], "Win") {
|
||||
s.Isolate = "test_skia_bundled_win.isolate"
|
||||
} else {
|
||||
s.Isolate = "test_skia_bundled_unix.isolate"
|
||||
}
|
||||
}
|
||||
if strings.Contains(parts["extra_config"], "Valgrind") {
|
||||
s.ExecutionTimeout = 9 * time.Hour
|
||||
@ -527,11 +538,19 @@ func perf(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
|
||||
if strings.Contains(parts["extra_config"], "Skpbench") {
|
||||
recipe = "swarm_skpbench"
|
||||
isolate = "skpbench_skia.isolate"
|
||||
if parts["os"] == "Android" {
|
||||
isolate = "skpbench_skia_bundled.isolate"
|
||||
if useBundledRecipes(parts) {
|
||||
if strings.Contains(parts["os"], "Win") {
|
||||
isolate = "skpbench_skia_bundled_win.isolate"
|
||||
} else {
|
||||
isolate = "skpbench_skia_bundled_unix.isolate"
|
||||
}
|
||||
}
|
||||
} else if useBundledRecipes(parts) {
|
||||
if strings.Contains(parts["os"], "Win") {
|
||||
isolate = "perf_skia_bundled_win.isolate"
|
||||
} else {
|
||||
isolate = "perf_skia_bundled_unix.isolate"
|
||||
}
|
||||
} else if parts["os"] == "Android" {
|
||||
isolate = "perf_skia_bundled.isolate"
|
||||
}
|
||||
s := &specs.TaskSpec{
|
||||
CipdPackages: pkgs,
|
||||
@ -558,7 +577,7 @@ func perf(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
|
||||
MaxAttempts: 1,
|
||||
Priority: 0.8,
|
||||
}
|
||||
if parts["os"] == "Android" {
|
||||
if useBundledRecipes(parts) {
|
||||
s.Dependencies = append(s.Dependencies, BUNDLE_RECIPES_NAME)
|
||||
}
|
||||
if strings.Contains(parts["extra_config"], "Valgrind") {
|
||||
|
@ -4,7 +4,6 @@
|
||||
'assets.isolate',
|
||||
'ios_bin.isolate',
|
||||
'resources.isolate',
|
||||
'swarm_recipe_bundled.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
|
6
infra/bots/perf_skia_bundled_unix.isolate
Normal file
6
infra/bots/perf_skia_bundled_unix.isolate
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
'includes': [
|
||||
'perf_skia_bundled.isolate',
|
||||
'swarm_recipe_bundled_unix.isolate',
|
||||
],
|
||||
}
|
6
infra/bots/perf_skia_bundled_win.isolate
Normal file
6
infra/bots/perf_skia_bundled_win.isolate
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
'includes': [
|
||||
'perf_skia_bundled.isolate',
|
||||
'swarm_recipe_bundled_win.isolate',
|
||||
],
|
||||
}
|
@ -58,21 +58,21 @@ class SkiaFlavorApi(recipe_api.RecipeApi):
|
||||
def get_flavor(self, builder_cfg):
|
||||
"""Return a flavor utils object specific to the given builder."""
|
||||
if is_flutter(builder_cfg):
|
||||
return flutter_flavor.FlutterFlavorUtils(self.m)
|
||||
return flutter_flavor.FlutterFlavorUtils(self)
|
||||
if is_chromecast(builder_cfg):
|
||||
return gn_chromecast_flavor.GNChromecastFlavorUtils(self.m)
|
||||
return gn_chromecast_flavor.GNChromecastFlavorUtils(self)
|
||||
if is_chromebook(builder_cfg):
|
||||
return gn_chromebook_flavor.GNChromebookFlavorUtils(self.m)
|
||||
return gn_chromebook_flavor.GNChromebookFlavorUtils(self)
|
||||
if is_android(builder_cfg):
|
||||
return gn_android_flavor.GNAndroidFlavorUtils(self.m)
|
||||
return gn_android_flavor.GNAndroidFlavorUtils(self)
|
||||
elif is_ios(builder_cfg):
|
||||
return ios_flavor.iOSFlavorUtils(self.m)
|
||||
return ios_flavor.iOSFlavorUtils(self)
|
||||
elif is_pdfium(builder_cfg):
|
||||
return pdfium_flavor.PDFiumFlavorUtils(self.m)
|
||||
return pdfium_flavor.PDFiumFlavorUtils(self)
|
||||
elif is_valgrind(builder_cfg):
|
||||
return valgrind_flavor.ValgrindFlavorUtils(self.m)
|
||||
return valgrind_flavor.ValgrindFlavorUtils(self)
|
||||
else:
|
||||
return gn_flavor.GNFlavorUtils(self.m)
|
||||
return gn_flavor.GNFlavorUtils(self)
|
||||
|
||||
def setup(self):
|
||||
self._f = self.get_flavor(self.m.vars.builder_cfg)
|
||||
|
@ -75,8 +75,15 @@ class DefaultFlavorUtils(object):
|
||||
copying files between the host and Android device, as well as the
|
||||
'step' function, so that commands may be run through ADB.
|
||||
"""
|
||||
def __init__(self, m):
|
||||
self.m = m
|
||||
def __init__(self, module):
|
||||
# Store a pointer to the parent recipe module (SkiaFlavorApi) so that
|
||||
# FlavorUtils objects can do recipe module-like things, like run steps or
|
||||
# access module-level resources.
|
||||
self.module = module
|
||||
|
||||
# self.m is just a shortcut so that FlavorUtils objects can use the same
|
||||
# syntax as regular recipe modules to run steps, eg: self.m.step(...)
|
||||
self.m = module.m
|
||||
self._chrome_path = None
|
||||
self._win_toolchain_dir = self.m.vars.slave_dir.join(WIN_TOOLCHAIN_DIR)
|
||||
win_toolchain_asset_path = self.m.vars.infrabots_dir.join(
|
||||
|
@ -170,8 +170,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
args = [self.m.vars.slave_dir] + [str(x) for x in cmd]
|
||||
with self.m.step.context({'cwd': self.m.vars.skia_dir, 'env': env}):
|
||||
self._py('symbolized %s' % name,
|
||||
self.m.vars.infrabots_dir.join('recipe_modules', 'core',
|
||||
'resources', 'symbolize_stack_trace.py'),
|
||||
self.module.resource('symbolize_stack_trace.py'),
|
||||
args=args,
|
||||
infra_step=False)
|
||||
|
||||
|
@ -106,7 +106,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Release/nanobench",
|
||||
|
@ -106,7 +106,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Release/nanobench",
|
||||
|
@ -69,7 +69,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"[START_DIR]/out/Debug/nanobench",
|
||||
"--undefok",
|
||||
|
@ -106,7 +106,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"[START_DIR]/out/Release/nanobench",
|
||||
"--undefok",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
|
@ -69,7 +69,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
"--undefok",
|
||||
|
@ -69,7 +69,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
"--undefok",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Release/dm",
|
||||
|
@ -69,7 +69,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"[START_DIR]/out/Release/dm",
|
||||
"--undefok",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
"--undefok",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"[START_DIR]/out/Release/dm",
|
||||
"--undefok",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
"--undefok",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
"--undefok",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
|
@ -206,7 +206,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
|
@ -121,4 +121,4 @@
|
||||
"recipe_result": null,
|
||||
"status_code": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -106,7 +106,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Release/nanobench",
|
||||
|
@ -178,7 +178,7 @@
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"[START_DIR]/skia/infra/bots/recipe_modules/core/resources/symbolize_stack_trace.py",
|
||||
"RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
|
||||
"[START_DIR]",
|
||||
"catchsegv",
|
||||
"[START_DIR]/out/Debug/dm",
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
'includes': [
|
||||
'assets.isolate',
|
||||
'swarm_recipe_bundled.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
|
6
infra/bots/skpbench_skia_bundled_unix.isolate
Normal file
6
infra/bots/skpbench_skia_bundled_unix.isolate
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
'includes': [
|
||||
'skpbench_skia_bundled.isolate',
|
||||
'swarm_recipe_bundled_unix.isolate',
|
||||
],
|
||||
}
|
6
infra/bots/skpbench_skia_bundled_win.isolate
Normal file
6
infra/bots/skpbench_skia_bundled_win.isolate
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
'includes': [
|
||||
'skpbench_skia_bundled.isolate',
|
||||
'swarm_recipe_bundled_win.isolate',
|
||||
],
|
||||
}
|
7
infra/bots/swarm_recipe_bundled_win.isolate
Normal file
7
infra/bots/swarm_recipe_bundled_win.isolate
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
'variables': {
|
||||
'command': [
|
||||
'../../../recipe_bundle/recipes.bat', 'run', '--timestamps',
|
||||
],
|
||||
},
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,6 @@
|
||||
'assets.isolate',
|
||||
'ios_bin.isolate',
|
||||
'resources.isolate',
|
||||
'swarm_recipe_bundled.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
|
6
infra/bots/test_skia_bundled_unix.isolate
Normal file
6
infra/bots/test_skia_bundled_unix.isolate
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
'includes': [
|
||||
'test_skia_bundled.isolate',
|
||||
'swarm_recipe_bundled_unix.isolate',
|
||||
],
|
||||
}
|
6
infra/bots/test_skia_bundled_win.isolate
Normal file
6
infra/bots/test_skia_bundled_win.isolate
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
'includes': [
|
||||
'test_skia_bundled.isolate',
|
||||
'swarm_recipe_bundled_win.isolate',
|
||||
],
|
||||
}
|
Loading…
Reference in New Issue
Block a user