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:
Eric Boren 2017-04-07 08:31:22 -04:00 committed by Skia Commit-Bot
parent 5f055f0fe9
commit 23a6ec6eb3
38 changed files with 660 additions and 436 deletions

View File

@ -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") {

View File

@ -4,7 +4,6 @@
'assets.isolate',
'ios_bin.isolate',
'resources.isolate',
'swarm_recipe_bundled.isolate',
],
'variables': {
'files': [

View File

@ -0,0 +1,6 @@
{
'includes': [
'perf_skia_bundled.isolate',
'swarm_recipe_bundled_unix.isolate',
],
}

View File

@ -0,0 +1,6 @@
{
'includes': [
'perf_skia_bundled.isolate',
'swarm_recipe_bundled_win.isolate',
],
}

View File

@ -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)

View File

@ -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(

View File

@ -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)

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -121,4 +121,4 @@
"recipe_result": null,
"status_code": 0
}
]
]

View File

@ -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",

View File

@ -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",

View File

@ -1,7 +1,6 @@
{
'includes': [
'assets.isolate',
'swarm_recipe_bundled.isolate',
],
'variables': {
'files': [

View File

@ -0,0 +1,6 @@
{
'includes': [
'skpbench_skia_bundled.isolate',
'swarm_recipe_bundled_unix.isolate',
],
}

View File

@ -0,0 +1,6 @@
{
'includes': [
'skpbench_skia_bundled.isolate',
'swarm_recipe_bundled_win.isolate',
],
}

View File

@ -0,0 +1,7 @@
{
'variables': {
'command': [
'../../../recipe_bundle/recipes.bat', 'run', '--timestamps',
],
},
}

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,6 @@
'assets.isolate',
'ios_bin.isolate',
'resources.isolate',
'swarm_recipe_bundled.isolate',
],
'variables': {
'files': [

View File

@ -0,0 +1,6 @@
{
'includes': [
'test_skia_bundled.isolate',
'swarm_recipe_bundled_unix.isolate',
],
}

View File

@ -0,0 +1,6 @@
{
'includes': [
'test_skia_bundled.isolate',
'swarm_recipe_bundled_win.isolate',
],
}