diff options
author | Eric Boren <borenet@google.com> | 2017-02-02 09:02:37 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-02 14:31:45 +0000 |
commit | 7e97dc0aa1ff5b03593e689fe1cfdcc3550c169e (patch) | |
tree | f29cb093e1fdd069cfc119dfc5b1e24097401bfd /infra | |
parent | 8233fc82b00763d37a7b0db7890b15c7d58939d4 (diff) |
Copy modules back in from skia-recipes repo
BUG=skia:6070
Change-Id: I86b3f039c27bd8287516c1db8bd1cae62888171b
Reviewed-on: https://skia-review.googlesource.com/7890
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra')
167 files changed, 39574 insertions, 34 deletions
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go index 275f505960..f631dbf769 100644 --- a/infra/bots/gen_tasks.go +++ b/infra/bots/gen_tasks.go @@ -627,7 +627,7 @@ func main() { loadJson(cfgFile, path.Join(infraBots, "cfg.json"), &CONFIG) // Create the JobNameSchema. - schema, err := NewJobNameSchema(path.Join(b.CheckoutRoot(), "infra", "bots", ".recipe_deps", "skia-recipes", "recipe_modules", "builder_name_schema", "builder_name_schema.json")) + schema, err := NewJobNameSchema(path.Join(b.CheckoutRoot(), "infra", "bots", "recipe_modules", "builder_name_schema", "builder_name_schema.json")) if err != nil { glog.Fatal(err) } diff --git a/infra/bots/recipe_modules/README.md b/infra/bots/recipe_modules/README.md new file mode 100644 index 0000000000..05ad2cc76b --- /dev/null +++ b/infra/bots/recipe_modules/README.md @@ -0,0 +1,11 @@ +Skia Recipe Modules +=================== + +This directory contains recipe modules designed to be used by recipes. They +are all Skia-specific and some are interrelated: + + * vars - Common variables used by Skia recipes. + * run - Utilities for running commands. Depends on vars. + * flavor - Run meta-commands for various platforms. Depends on vars and run. + * skia - Main module for Skia recipes. Depends on vars, run, and flavor. + * swarming - Utilities for running Swarming tasks. diff --git a/infra/bots/recipe_modules/builder_name_schema/__init__.py b/infra/bots/recipe_modules/builder_name_schema/__init__.py new file mode 100644 index 0000000000..a3c9297009 --- /dev/null +++ b/infra/bots/recipe_modules/builder_name_schema/__init__.py @@ -0,0 +1,6 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ +] diff --git a/infra/bots/recipe_modules/builder_name_schema/api.py b/infra/bots/recipe_modules/builder_name_schema/api.py new file mode 100644 index 0000000000..edfd683140 --- /dev/null +++ b/infra/bots/recipe_modules/builder_name_schema/api.py @@ -0,0 +1,39 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# pylint: disable=W0201 + + +from recipe_engine import recipe_api + +from . import builder_name_schema + + +class BuilderNameSchemaApi(recipe_api.RecipeApi): + def __init__(self, *args, **kwargs): + super(BuilderNameSchemaApi, self).__init__(*args, **kwargs) + + # See builder_name_schema.py for documentation. + self.BUILDER_NAME_SCHEMA = builder_name_schema.BUILDER_NAME_SCHEMA + self.BUILDER_NAME_SEP = builder_name_schema.BUILDER_NAME_SEP + + self.BUILDER_ROLE_CANARY = builder_name_schema.BUILDER_ROLE_CANARY + self.BUILDER_ROLE_BUILD = builder_name_schema.BUILDER_ROLE_BUILD + self.BUILDER_ROLE_HOUSEKEEPER = builder_name_schema.BUILDER_ROLE_HOUSEKEEPER + self.BUILDER_ROLE_INFRA = builder_name_schema.BUILDER_ROLE_INFRA + self.BUILDER_ROLE_PERF = builder_name_schema.BUILDER_ROLE_PERF + self.BUILDER_ROLE_TEST = builder_name_schema.BUILDER_ROLE_TEST + self.BUILDER_ROLES = builder_name_schema.BUILDER_ROLES + + self.TRYBOT_NAME_SUFFIX = builder_name_schema.TRYBOT_NAME_SUFFIX + + def MakeBuilderName(self, *args, **kwargs): # pragma: no cover + return builder_name_schema.MakeBuilderName(*args, **kwargs) + + def IsTrybot(self, *args, **kwargs): # pragma: no cover + return builder_name_schema.IsTrybot(*args, **kwargs) + + def DictForBuilderName(self, *args, **kwargs): + return builder_name_schema.DictForBuilderName(*args, **kwargs) diff --git a/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json b/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json new file mode 100644 index 0000000000..6a8c92175b --- /dev/null +++ b/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json @@ -0,0 +1,43 @@ +{ + "builder_name_schema": { + "Test": [ + "os", + "compiler", + "model", + "cpu_or_gpu", + "cpu_or_gpu_value", + "arch", + "configuration" + ], + "Housekeeper": [ + "frequency" + ], + "Infra": [ + "frequency" + ], + "Build": [ + "os", + "compiler", + "target_arch", + "configuration" + ], + "Perf": [ + "os", + "compiler", + "model", + "cpu_or_gpu", + "cpu_or_gpu_value", + "arch", + "configuration" + ], + "Canary": [ + "project", + "os", + "compiler", + "target_arch", + "configuration" + ] + }, + "builder_name_sep": "-", + "trybot_name_suffix": "Trybot" +} diff --git a/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.py b/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.py new file mode 100644 index 0000000000..8319789154 --- /dev/null +++ b/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.py @@ -0,0 +1,168 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +""" Utilities for dealing with builder names. This module obtains its attributes +dynamically from builder_name_schema.json. """ + + +import json +import os + + +# All of these global variables are filled in by _LoadSchema(). + +# The full schema. +BUILDER_NAME_SCHEMA = None + +# Character which separates parts of a builder name. +BUILDER_NAME_SEP = None + +# Builder roles. +BUILDER_ROLE_CANARY = 'Canary' +BUILDER_ROLE_BUILD = 'Build' +BUILDER_ROLE_HOUSEKEEPER = 'Housekeeper' +BUILDER_ROLE_INFRA = 'Infra' +BUILDER_ROLE_PERF = 'Perf' +BUILDER_ROLE_TEST = 'Test' +BUILDER_ROLES = (BUILDER_ROLE_CANARY, + BUILDER_ROLE_BUILD, + BUILDER_ROLE_HOUSEKEEPER, + BUILDER_ROLE_INFRA, + BUILDER_ROLE_PERF, + BUILDER_ROLE_TEST) + +# Suffix which distinguishes trybots from normal bots. +TRYBOT_NAME_SUFFIX = None + + +def _LoadSchema(): + """ Load the builder naming schema from the JSON file. """ + + def _UnicodeToStr(obj): + """ Convert all unicode strings in obj to Python strings. """ + if isinstance(obj, unicode): + return str(obj) + elif isinstance(obj, dict): + return dict(map(_UnicodeToStr, obj.iteritems())) + elif isinstance(obj, list): + return list(map(_UnicodeToStr, obj)) + elif isinstance(obj, tuple): + return tuple(map(_UnicodeToStr, obj)) + else: + return obj # pragma: no cover + + builder_name_json_filename = os.path.join( + os.path.dirname(__file__), 'builder_name_schema.json') + builder_name_schema_json = json.load(open(builder_name_json_filename)) + + global BUILDER_NAME_SCHEMA + BUILDER_NAME_SCHEMA = _UnicodeToStr( + builder_name_schema_json['builder_name_schema']) + + global BUILDER_NAME_SEP + BUILDER_NAME_SEP = _UnicodeToStr( + builder_name_schema_json['builder_name_sep']) + + global TRYBOT_NAME_SUFFIX + TRYBOT_NAME_SUFFIX = _UnicodeToStr( + builder_name_schema_json['trybot_name_suffix']) + + # Since the builder roles are dictionary keys, just assert that the global + # variables above account for all of them. + assert len(BUILDER_ROLES) == len(BUILDER_NAME_SCHEMA) + for role in BUILDER_ROLES: + assert role in BUILDER_NAME_SCHEMA + + +_LoadSchema() + + +def MakeBuilderName(role, extra_config=None, is_trybot=False, + **kwargs): # pragma: no cover + schema = BUILDER_NAME_SCHEMA.get(role) + if not schema: # pragma: no cover + raise ValueError('%s is not a recognized role.' % role) + for k, v in kwargs.iteritems(): + if BUILDER_NAME_SEP in v: # pragma: no cover + raise ValueError('%s not allowed in %s.' % (BUILDER_NAME_SEP, v)) + if not k in schema: # pragma: no cover + raise ValueError('Schema does not contain "%s": %s' %(k, schema)) + if extra_config and BUILDER_NAME_SEP in extra_config: # pragma: no cover + raise ValueError('%s not allowed in %s.' % (BUILDER_NAME_SEP, + extra_config)) + name_parts = [role] + name_parts.extend([kwargs[attribute] for attribute in schema]) + if extra_config: + name_parts.append(extra_config) + if is_trybot: + name_parts.append(TRYBOT_NAME_SUFFIX) + return BUILDER_NAME_SEP.join(name_parts) + + +def IsTrybot(builder_name): # pragma: no cover + """ Returns true if builder_name refers to a trybot (as opposed to a + waterfall bot). """ + return builder_name.endswith(TRYBOT_NAME_SUFFIX) + + +def GetWaterfallBot(builder_name): # pragma: no cover + """Returns the name of the waterfall bot for this builder. If it is not a + trybot, builder_name is returned unchanged. If it is a trybot the name is + returned without the trybot suffix.""" + if not IsTrybot(builder_name): + return builder_name + return _WithoutSuffix(builder_name, BUILDER_NAME_SEP + TRYBOT_NAME_SUFFIX) + + +def TrybotName(builder_name): # pragma: no cover + """Returns the name of the trybot clone of this builder. + + If the given builder is a trybot, the name is returned unchanged. If not, the + TRYBOT_NAME_SUFFIX is appended. + """ + if builder_name.endswith(TRYBOT_NAME_SUFFIX): + return builder_name + return builder_name + BUILDER_NAME_SEP + TRYBOT_NAME_SUFFIX + + +def _WithoutSuffix(string, suffix): # pragma: no cover + """ Returns a copy of string 'string', but with suffix 'suffix' removed. + Raises ValueError if string does not end with suffix. """ + if not string.endswith(suffix): + raise ValueError('_WithoutSuffix: string %s does not end with suffix %s' % ( + string, suffix)) + return string[:-len(suffix)] + + +def DictForBuilderName(builder_name): + """Makes a dictionary containing details about the builder from its name.""" + split_name = builder_name.split(BUILDER_NAME_SEP) + + def pop_front(): + try: + return split_name.pop(0) + except: # pragma: no cover + raise ValueError('Invalid builder name: %s' % builder_name) + + result = {'is_trybot': False} + + if split_name[-1] == TRYBOT_NAME_SUFFIX: + result['is_trybot'] = True + split_name.pop() + + if split_name[0] in BUILDER_NAME_SCHEMA.keys(): + key_list = BUILDER_NAME_SCHEMA[split_name[0]] + result['role'] = pop_front() + for key in key_list: + result[key] = pop_front() + if split_name: + result['extra_config'] = pop_front() + if split_name: # pragma: no cover + raise ValueError('Invalid builder name: %s' % builder_name) + else: # pragma: no cover + raise ValueError('Invalid builder name: %s' % builder_name) + return result + + diff --git a/infra/bots/recipe_modules/compile/__init__.py b/infra/bots/recipe_modules/compile/__init__.py new file mode 100644 index 0000000000..219eff548d --- /dev/null +++ b/infra/bots/recipe_modules/compile/__init__.py @@ -0,0 +1,15 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'core', + 'recipe_engine/json', + 'recipe_engine/path', + 'recipe_engine/platform', + 'recipe_engine/properties', + 'recipe_engine/python', + 'flavor', + 'run', + 'vars', +] diff --git a/infra/bots/recipe_modules/compile/api.py b/infra/bots/recipe_modules/compile/api.py new file mode 100644 index 0000000000..5f332c55b5 --- /dev/null +++ b/infra/bots/recipe_modules/compile/api.py @@ -0,0 +1,81 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Recipe module for Skia Swarming compile. + + +from recipe_engine import recipe_api + + +def build_targets_from_builder_dict(builder_dict): + """Return a list of targets to build, depending on the builder type.""" + if builder_dict.get('extra_config') == 'iOS': + return ['iOSShell'] + return ['most'] + + +def get_extra_env_vars(builder_dict): + env = {} + if builder_dict.get('compiler') == 'Clang': + env['CC'] = '/usr/bin/clang' + env['CXX'] = '/usr/bin/clang++' + + # SKNX_NO_SIMD, SK_USE_DISCARDABLE_SCALEDIMAGECACHE, etc. + extra_config = builder_dict.get('extra_config', '') + if extra_config.startswith('SK') and extra_config.isupper(): + env['CPPFLAGS'] = '-D' + extra_config + + return env + + +def get_gyp_defines(builder_dict): + gyp_defs = {} + + if (builder_dict.get('os') == 'iOS' or + builder_dict.get('extra_config') == 'iOS'): + gyp_defs['skia_arch_type'] = 'arm' + gyp_defs['skia_clang_build'] = '1' + gyp_defs['skia_os'] = 'ios' + gyp_defs['skia_warnings_as_errors'] = 1 + + return gyp_defs + + +class CompileApi(recipe_api.RecipeApi): + def run(self): + self.m.core.setup() + + env = get_extra_env_vars(self.m.vars.builder_cfg) + gyp_defs = get_gyp_defines(self.m.vars.builder_cfg) + gyp_defs_list = ['%s=%s' % (k, v) for k, v in gyp_defs.iteritems()] + gyp_defs_list.sort() + env['GYP_DEFINES'] = ' '.join(gyp_defs_list) + + build_targets = build_targets_from_builder_dict(self.m.vars.builder_cfg) + + try: + for target in build_targets: + self.m.flavor.compile(target, env=env) + self.m.run.copy_build_products( + self.m.flavor.out_dir, + self.m.vars.swarming_out_dir.join( + 'out', self.m.vars.configuration)) + self.m.flavor.copy_extra_build_products(self.m.vars.swarming_out_dir) + finally: + if 'Win' in self.m.vars.builder_cfg.get('os', ''): + self.m.python.inline( + name='cleanup', + program='''import psutil +for p in psutil.process_iter(): + try: + if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'): + p.kill() + except psutil._error.AccessDenied: + pass +''', + infra_step=True) + + self.m.flavor.cleanup_steps() + self.m.run.check_failure() diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-Arm7-Release-iOS.json b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-Arm7-Release-iOS.json new file mode 100644 index 0000000000..9a85fed563 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-Arm7-Release-iOS.json @@ -0,0 +1,173 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-Arm7-Release-iOS" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/platform_tools/ios/bin/ios_ninja" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "BUILDTYPE": "Release", + "CC": "/usr/bin/clang", + "CHROME_HEADLESS": "1", + "CXX": "/usr/bin/clang++", + "GYP_DEFINES": "skia_arch_type=arm skia_clang_build=1 skia_os=ios skia_warnings_as_errors=1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-Arm7-Release-iOS" + }, + "name": "build iOSShell" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-Arm7-Release-iOS/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/xcodebuild/Release-iphoneos", + "[CUSTOM_[SWARM_OUT_DIR]]/xcodebuild/Release-iphoneos" + ], + "name": "copy build products (2)", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-arm64-Debug-GN_iOS.json b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-arm64-Debug-GN_iOS.json new file mode 100644 index 0000000000..fd5e769897 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-arm64-Debug-GN_iOS.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-arm64-Debug-GN_iOS" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-arm64-Debug-GN_iOS/Debug", + "--args=cc=\"clang\" cxx=\"clang++\" extra_cflags=[\"-O1\"] target_cpu=\"arm64\" target_os=\"ios\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-arm64-Debug-GN_iOS/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-arm64-Debug-GN_iOS/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-mipsel-Debug-GN_Android.json b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-mipsel-Debug-GN_Android.json new file mode 100644 index 0000000000..a382378fd4 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-mipsel-Debug-GN_Android.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-mipsel-Debug-GN_Android" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-mipsel-Debug-GN_Android/Debug", + "--args=extra_cflags=[\"-O1\"] ndk=\"[START_DIR]/android_ndk_darwin\" target_cpu=\"mipsel\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-mipsel-Debug-GN_Android/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-mipsel-Debug-GN_Android/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json new file mode 100644 index 0000000000..8665fab84d --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json @@ -0,0 +1,194 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}, {'deps_file': '.DEPS.git', 'managed': False, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--revision", + "src@origin/lkgr", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"origin/lkgr\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py", + "runhooks" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "GYP_CHROMIUM_NO_ACTION": "0", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gclient runhooks" + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/tools/build_command_buffer.py", + "--chrome-dir", + "[CUSTOM_/_B_WORK]", + "--output-dir", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug", + "--no-sync", + "--make-output-dir" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer" + }, + "name": "build command_buffer" + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug", + "--args=cc=\"clang\" cxx=\"clang++\" extra_cflags=[\"-O1\"] target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-x86_64-Release-GN.json b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-x86_64-Release-GN.json new file mode 100644 index 0000000000..a964d6b663 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Mac-Clang-x86_64-Release-GN.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN/Release", + "--args=cc=\"clang\" cxx=\"clang++\" is_debug=false target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN/Release" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot.json new file mode 100644 index 0000000000..ad26c9bc1b --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot.json @@ -0,0 +1,163 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--issue", + "500", + "--patchset", + "1", + "--rietveld_server", + "https://codereview.chromium.org", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot/Debug", + "--args=extra_cflags=[\"-O1\"] ndk=\"[START_DIR]/android_ndk_linux\" target_cpu=\"arm64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs.json new file mode 100644 index 0000000000..445c120507 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs/Debug", + "--args=extra_cflags=[\"-O1\"] ndk=\"[START_DIR]/android_ndk_linux\" skia_enable_android_framework_defines=true target_cpu=\"arm64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android.json new file mode 100644 index 0000000000..15b90b81b5 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android/Release", + "--args=is_debug=false ndk=\"[START_DIR]/android_ndk_linux\" target_cpu=\"arm64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android/Release" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan.json new file mode 100644 index 0000000000..783fa63b82 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan/Release", + "--args=is_debug=false ndk=\"[START_DIR]/android_ndk_linux\" ndk_api=24 skia_enable_vulkan_debug_layers=false target_cpu=\"arm64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan/Release" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-x86_64-Debug-ASAN.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-x86_64-Debug-ASAN.json new file mode 100644 index 0000000000..307e734569 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-x86_64-Debug-ASAN.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-ASAN" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-ASAN/Debug", + "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-O1\"] extra_ldflags=[\"-fuse-ld=lld\"] sanitize=\"ASAN\" target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-ASAN/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-ASAN/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json new file mode 100644 index 0000000000..ab5dc2ce4e --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-GN" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-GN/Debug", + "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-O1\"] extra_ldflags=[\"-fuse-ld=lld\"] target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-GN/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-GN/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-x86_64-Release-Vulkan.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-x86_64-Release-Vulkan.json new file mode 100644 index 0000000000..9421a3c9ba --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-Clang-x86_64-Release-Vulkan.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Release-Vulkan" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Release-Vulkan/Release", + "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_ldflags=[\"-fuse-ld=lld\"] is_debug=false skia_vulkan_sdk=\"[START_DIR]/linux_vulkan_sdk\" target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Release-Vulkan/Release" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Release-Vulkan/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86-Debug.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86-Debug.json new file mode 100644 index 0000000000..60f79fa796 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86-Debug.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug/Debug", + "--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"] target_cpu=\"x86\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-GN.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-GN.json new file mode 100644 index 0000000000..ec62d9299c --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-GN.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-GN" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-GN/Debug", + "--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"] target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-GN/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-GN/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-MSAN.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-MSAN.json new file mode 100644 index 0000000000..676f364a1c --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-MSAN.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug", + "--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"] extra_ldflags=[\"-L[START_DIR]/clang_linux/msan\"] sanitize=\"MSAN\" skia_use_fontconfig=false target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-NoGPU.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-NoGPU.json new file mode 100644 index 0000000000..7b3a3eb0df --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-NoGPU.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-NoGPU" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-NoGPU/Debug", + "--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"] skia_enable_gpu=false target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-NoGPU/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-NoGPU/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json new file mode 100644 index 0000000000..dc944ed114 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE/Debug", + "--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\", \"-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\"] target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE/Debug" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE/Debug", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-ANGLE.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-ANGLE.json new file mode 100644 index 0000000000..24f7752841 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-ANGLE.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-ANGLE" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-ANGLE/Release", + "--args=cc=\"gcc\" cxx=\"g++\" is_debug=false skia_use_angle=true target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-ANGLE/Release" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-ANGLE/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-Fast.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-Fast.json new file mode 100644 index 0000000000..b685ff9cf6 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-Fast.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Fast" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Fast/Release", + "--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-march=native\", \"-fomit-frame-pointer\", \"-O3\", \"-ffp-contract=off\"] is_debug=false target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Fast/Release" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Fast/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-Mesa.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-Mesa.json new file mode 100644 index 0000000000..98bdad3c04 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-Mesa.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Mesa" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Mesa/Release", + "--args=cc=\"gcc\" cxx=\"g++\" is_debug=false skia_use_mesa=true target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Mesa/Release" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Mesa/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-PDFium.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-PDFium.json new file mode 100644 index 0000000000..4a7f8252e9 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-PDFium.json @@ -0,0 +1,198 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'pdfium', 'url': 'https://pdfium.googlesource.com/pdfium.git'}]", + "--patch_root", + "pdfium/third_party/skia", + "--revision_mapping_file", + "{\"pdfium\": \"got_pdfium_revision\", \"pdfium/third_party/skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "pdfium@origin/master", + "--revision", + "pdfium/third_party/skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium\": \"origin/master\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium/third_party/skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/pdfium.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"d69d97171c17fdb12a52f78847e2ee2f0594eff1\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium/third_party/skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/pdfium/third_party/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"85501db4bcbeb8f295309fdcda1a743388f0f104\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"pdfium/third_party/skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_pdfium_revision\": \"d69d97171c17fdb12a52f78847e2ee2f0594eff1\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_pdfium_revision_cp\": \"refs/heads/master@{#52055}\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"85501db4bcbeb8f295309fdcda1a743388f0f104\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#120212}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"pdfium\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_pdfium_revision_cp@\"refs/heads/master@{#52055}\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"85501db4bcbeb8f295309fdcda1a743388f0f104\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#120212}\"@@@", + "@@@SET_BUILD_PROPERTY@got_pdfium_revision@\"d69d97171c17fdb12a52f78847e2ee2f0594eff1\"@@@" + ] + }, + { + "cmd": [ + "gclient", + "runhook", + "gn_linux64" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "GYP_DEFINES": "", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "runhook" + }, + { + "cmd": [ + "python", + "build/linux/sysroot_scripts/install-sysroot.py", + "--arch=amd64" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "sysroot" + }, + { + "cmd": [ + "gn", + "gen", + "out/skia", + "--args=pdf_is_standalone=true clang_use_chrome_plugins=false is_component_build=false is_debug=false pdf_use_skia=true" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "CHROMIUM_BUILDTOOLS_PATH": "[CUSTOM_/_B_WORK]/pdfium/buildtools", + "GYP_DEFINES": "", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "gn_gen" + }, + { + "cmd": [ + "ninja", + "-C", + "out/skia", + "-j100" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "CHROMIUM_BUILDTOOLS_PATH": "[CUSTOM_/_B_WORK]/pdfium/buildtools", + "GYP_DEFINES": "", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "build_pdfium" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths.json new file mode 100644 index 0000000000..fd798987a5 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths.json @@ -0,0 +1,198 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'pdfium', 'url': 'https://pdfium.googlesource.com/pdfium.git'}]", + "--patch_root", + "pdfium/third_party/skia", + "--revision_mapping_file", + "{\"pdfium\": \"got_pdfium_revision\", \"pdfium/third_party/skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "pdfium@origin/master", + "--revision", + "pdfium/third_party/skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium\": \"origin/master\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium/third_party/skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/pdfium.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"d69d97171c17fdb12a52f78847e2ee2f0594eff1\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium/third_party/skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/pdfium/third_party/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"85501db4bcbeb8f295309fdcda1a743388f0f104\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"pdfium/third_party/skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_pdfium_revision\": \"d69d97171c17fdb12a52f78847e2ee2f0594eff1\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_pdfium_revision_cp\": \"refs/heads/master@{#52055}\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"85501db4bcbeb8f295309fdcda1a743388f0f104\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#120212}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"pdfium\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_pdfium_revision_cp@\"refs/heads/master@{#52055}\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"85501db4bcbeb8f295309fdcda1a743388f0f104\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#120212}\"@@@", + "@@@SET_BUILD_PROPERTY@got_pdfium_revision@\"d69d97171c17fdb12a52f78847e2ee2f0594eff1\"@@@" + ] + }, + { + "cmd": [ + "gclient", + "runhook", + "gn_linux64" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "GYP_DEFINES": "", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths" + }, + "name": "runhook" + }, + { + "cmd": [ + "python", + "build/linux/sysroot_scripts/install-sysroot.py", + "--arch=amd64" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths" + }, + "name": "sysroot" + }, + { + "cmd": [ + "gn", + "gen", + "out/skia", + "--args=pdf_is_standalone=true clang_use_chrome_plugins=false is_component_build=false is_debug=false pdf_use_skia_paths=true" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "CHROMIUM_BUILDTOOLS_PATH": "[CUSTOM_/_B_WORK]/pdfium/buildtools", + "GYP_DEFINES": "", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths" + }, + "name": "gn_gen" + }, + { + "cmd": [ + "ninja", + "-C", + "out/skia", + "-j100" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "CHROMIUM_BUILDTOOLS_PATH": "[CUSTOM_/_B_WORK]/pdfium/buildtools", + "GYP_DEFINES": "", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths" + }, + "name": "build_pdfium" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-Valgrind.json b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-Valgrind.json new file mode 100644 index 0000000000..5518f1fdcb --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Ubuntu-GCC-x86_64-Release-Valgrind.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Valgrind" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Valgrind/Release", + "--args=cc=\"gcc\" cxx=\"g++\" is_debug=false target_cpu=\"x86_64\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Valgrind/Release" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Valgrind/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Win-Clang-arm64-Release-GN_Android.json b/infra/bots/recipe_modules/compile/example.expected/Build-Win-Clang-arm64-Release-GN_Android.json new file mode 100644 index 0000000000..1a234e4082 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Win-Clang-arm64-Release-GN_Android.json @@ -0,0 +1,175 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-Clang-arm64-Release-GN_Android" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-Clang-arm64-Release-GN_Android\\Release", + "--args=is_debug=false ndk=\"[START_DIR]\\n\" target_cpu=\"arm64\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-Clang-arm64-Release-GN_Android\\Release" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-Clang-arm64-Release-GN_Android\\Release", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Debug-ANGLE.json b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Debug-ANGLE.json new file mode 100644 index 0000000000..23b7ce282d --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Debug-ANGLE.json @@ -0,0 +1,175 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-ANGLE" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-ANGLE\\Debug", + "--args=skia_use_angle=true target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-ANGLE\\Debug" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-ANGLE\\Debug", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Debug-Exceptions.json b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Debug-Exceptions.json new file mode 100644 index 0000000000..ded414c02a --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Debug-Exceptions.json @@ -0,0 +1,175 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-Exceptions" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-Exceptions\\Debug", + "--args=extra_cflags=[\"/EHsc\"] target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-Exceptions\\Debug" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-Exceptions\\Debug", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Debug.json b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Debug.json new file mode 100644 index 0000000000..f22264983b --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Debug.json @@ -0,0 +1,175 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug", + "--args=target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Release-GDI.json b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Release-GDI.json new file mode 100644 index 0000000000..efefeda886 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Release-GDI.json @@ -0,0 +1,175 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GDI" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GDI\\Release", + "--args=is_debug=false skia_use_gdi=true target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GDI\\Release" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GDI\\Release", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Release-GN.json b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Release-GN.json new file mode 100644 index 0000000000..7f19f9162e --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86-Release-GN.json @@ -0,0 +1,175 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GN" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GN\\Release", + "--args=is_debug=false target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GN\\Release" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GN\\Release", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86_64-Release-Vulkan.json b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86_64-Release-Vulkan.json new file mode 100644 index 0000000000..b344b17e7b --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/Build-Win-MSVC-x86_64-Release-Vulkan.json @@ -0,0 +1,212 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Release_x64", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86_64-Release-Vulkan" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86_64-Release-Vulkan\\Release_x64", + "--args=is_debug=false skia_vulkan_sdk=\"[START_DIR]\\win_vulkan_sdk\" target_cpu=\"x86_64\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86_64-Release-Vulkan\\Release_x64" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86_64-Release-Vulkan\\Release_x64", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Release_x64" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[START_DIR]\\win_vulkan_sdk", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Release_x64" + ], + "name": "copy build products (2)", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/alternate_repo.json b/infra/bots/recipe_modules/compile/example.expected/alternate_repo.json new file mode 100644 index 0000000000..e29eb782b7 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/alternate_repo.json @@ -0,0 +1,212 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'other_repo', 'url': 'https://skia.googlesource.com/other_repo.git'}]", + "--patch_root", + "other_repo", + "--revision_mapping_file", + "{\"other_repo\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "other_repo@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Release_x64", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-MSVC-x86_64-Release-Vulkan" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"other_repo\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"other_repo\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/other_repo.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"84be67d5f1146c5b7f6d4494c36c52903754abf4\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"other_repo\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"84be67d5f1146c5b7f6d4494c36c52903754abf4\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#170933}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"other_repo\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"84be67d5f1146c5b7f6d4494c36c52903754abf4\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#170933}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]/skia/bin/gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-MSVC-x86_64-Release-Vulkan/Release_x64", + "--args=is_debug=false skia_vulkan_sdk=\"[START_DIR]/win_vulkan_sdk\" target_cpu=\"x86_64\" windk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-MSVC-x86_64-Release-Vulkan/Release_x64" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]/skia", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-MSVC-x86_64-Release-Vulkan/Release_x64", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release_x64" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[START_DIR]/win_vulkan_sdk", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release_x64" + ], + "name": "copy build products (2)", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/big_issue_number.json b/infra/bots/recipe_modules/compile/example.expected/big_issue_number.json new file mode 100644 index 0000000000..96c1a692c7 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/big_issue_number.json @@ -0,0 +1,181 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--issue", + "2147533002", + "--patchset", + "1", + "--rietveld_server", + "https://codereview.chromium.org", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug", + "--args=target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/buildbotless_trybot_gerrit.json b/infra/bots/recipe_modules/compile/example.expected/buildbotless_trybot_gerrit.json new file mode 100644 index 0000000000..d865d970e2 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/buildbotless_trybot_gerrit.json @@ -0,0 +1,201 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--gerrit_repo", + "https://skia.googlesource.com/skia.git", + "--gerrit_ref", + "refs/changes/89/456789/12", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]\\tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug", + "--args=target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/buildbotless_trybot_rietveld.json b/infra/bots/recipe_modules/compile/example.expected/buildbotless_trybot_rietveld.json new file mode 100644 index 0000000000..d4c15e7f10 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/buildbotless_trybot_rietveld.json @@ -0,0 +1,203 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--issue", + "500", + "--patchset", + "1", + "--rietveld_server", + "https://codereview.chromium.org", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]\\tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug", + "--args=target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/pdfium_trybot.json b/infra/bots/recipe_modules/compile/example.expected/pdfium_trybot.json new file mode 100644 index 0000000000..5a33bc59f6 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/pdfium_trybot.json @@ -0,0 +1,202 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'pdfium', 'url': 'https://pdfium.googlesource.com/pdfium.git'}]", + "--patch_root", + "pdfium/third_party/skia", + "--revision_mapping_file", + "{\"pdfium\": \"got_pdfium_revision\", \"pdfium/third_party/skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--gerrit_repo", + "https://skia.googlesource.com/skia.git", + "--gerrit_ref", + "refs/changes/89/456789/12", + "--output_json", + "/path/to/tmp/json", + "--revision", + "pdfium@origin/master", + "--revision", + "pdfium/third_party/skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium\": \"origin/master\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium/third_party/skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/pdfium.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"d69d97171c17fdb12a52f78847e2ee2f0594eff1\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"pdfium/third_party/skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/pdfium/third_party/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"85501db4bcbeb8f295309fdcda1a743388f0f104\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"pdfium/third_party/skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_pdfium_revision\": \"d69d97171c17fdb12a52f78847e2ee2f0594eff1\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_pdfium_revision_cp\": \"refs/heads/master@{#52055}\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"85501db4bcbeb8f295309fdcda1a743388f0f104\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#120212}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"pdfium\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_pdfium_revision_cp@\"refs/heads/master@{#52055}\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"85501db4bcbeb8f295309fdcda1a743388f0f104\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#120212}\"@@@", + "@@@SET_BUILD_PROPERTY@got_pdfium_revision@\"d69d97171c17fdb12a52f78847e2ee2f0594eff1\"@@@" + ] + }, + { + "cmd": [ + "gclient", + "runhook", + "gn_linux64" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "GYP_DEFINES": "", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "runhook" + }, + { + "cmd": [ + "python", + "build/linux/sysroot_scripts/install-sysroot.py", + "--arch=amd64" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "sysroot" + }, + { + "cmd": [ + "gn", + "gen", + "out/skia", + "--args=pdf_is_standalone=true clang_use_chrome_plugins=false is_component_build=false is_debug=false pdf_use_skia=true" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "CHROMIUM_BUILDTOOLS_PATH": "[CUSTOM_/_B_WORK]/pdfium/buildtools", + "GYP_DEFINES": "", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "gn_gen" + }, + { + "cmd": [ + "ninja", + "-C", + "out/skia", + "-j100" + ], + "cwd": "[CUSTOM_/_B_WORK]/pdfium", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "CHROMIUM_BUILDTOOLS_PATH": "[CUSTOM_/_B_WORK]/pdfium/buildtools", + "GYP_DEFINES": "", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium" + }, + "name": "build_pdfium" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_/_B_WORK]/pdfium/third_party/skia/out/Build-Ubuntu-GCC-x86_64-Release-PDFium/Release", + "[CUSTOM_[SWARM_OUT_DIR]]/out/Release" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.expected/recipe_with_gerrit_patch.json b/infra/bots/recipe_modules/compile/example.expected/recipe_with_gerrit_patch.json new file mode 100644 index 0000000000..5ad00142c8 --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.expected/recipe_with_gerrit_patch.json @@ -0,0 +1,201 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_C:\\_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_C:\\_B_CACHE]", + "--gerrit_repo", + "https://skia.googlesource.com/skia.git", + "--gerrit_ref", + "refs/changes/89/456789/12", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-Trybot" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]\\tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe", + "gen", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-Trybot\\Debug", + "--args=target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\"" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja.exe", + "-C", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-Trybot\\Debug" + ], + "cwd": "[CUSTOM_C:\\_B_WORK]\\skia", + "env": { + "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n", + "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-Trybot\\Debug", + "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Debug" + ], + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" + ], + "name": "cleanup", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import psutil@@@", + "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", + "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", + "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", + "@@@STEP_LOG_LINE@python.inline@ pass@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/compile/example.py b/infra/bots/recipe_modules/compile/example.py new file mode 100644 index 0000000000..c8595c4c4d --- /dev/null +++ b/infra/bots/recipe_modules/compile/example.py @@ -0,0 +1,214 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Example recipe w/ coverage. + + +DEPS = [ + 'compile', + 'recipe_engine/path', + 'recipe_engine/platform', + 'recipe_engine/properties', +] + + +TEST_BUILDERS = { + 'client.skia.compile': { + 'skiabot-linux-swarm-000': [ + 'Build-Mac-Clang-Arm7-Release-iOS', + 'Build-Mac-Clang-arm64-Debug-GN_iOS', + 'Build-Mac-Clang-mipsel-Debug-GN_Android', + 'Build-Mac-Clang-x86_64-Debug-CommandBuffer', + 'Build-Mac-Clang-x86_64-Release-GN', + 'Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot', + 'Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs', + 'Build-Ubuntu-Clang-arm64-Release-GN_Android', + 'Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan', + 'Build-Ubuntu-Clang-x86_64-Debug-ASAN', + 'Build-Ubuntu-Clang-x86_64-Debug-GN', + 'Build-Ubuntu-Clang-x86_64-Release-Vulkan', + 'Build-Ubuntu-GCC-x86-Debug', + 'Build-Ubuntu-GCC-x86_64-Debug-GN', + 'Build-Ubuntu-GCC-x86_64-Debug-MSAN', + 'Build-Ubuntu-GCC-x86_64-Debug-NoGPU', + 'Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE', + 'Build-Ubuntu-GCC-x86_64-Release-ANGLE', + 'Build-Ubuntu-GCC-x86_64-Release-Fast', + 'Build-Ubuntu-GCC-x86_64-Release-Mesa', + 'Build-Ubuntu-GCC-x86_64-Release-PDFium', + 'Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths', + 'Build-Ubuntu-GCC-x86_64-Release-Valgrind', + 'Build-Win-Clang-arm64-Release-GN_Android', + 'Build-Win-MSVC-x86-Debug', + 'Build-Win-MSVC-x86-Debug-ANGLE', + 'Build-Win-MSVC-x86-Debug-Exceptions', + 'Build-Win-MSVC-x86-Release-GDI', + 'Build-Win-MSVC-x86-Release-GN', + 'Build-Win-MSVC-x86_64-Release-Vulkan', + ], + }, +} + + +def RunSteps(api): + api.compile.run() + + +def GenTests(api): + for mastername, slaves in TEST_BUILDERS.iteritems(): + for slavename, builders_by_slave in slaves.iteritems(): + for builder in builders_by_slave: + test = ( + api.test(builder) + + api.properties(buildername=builder, + mastername=mastername, + slavename=slavename, + buildnumber=5, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.path.exists( + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + ) + if 'Win' in builder: + test += api.platform('win', 64) + elif 'Mac' in builder: + test += api.platform('mac', 64) + else: + test += api.platform('linux', 64) + if 'Trybot' in builder: + test += api.properties(issue=500, + patchset=1, + rietveld='https://codereview.chromium.org') + + yield test + + mastername = 'client.skia.compile' + slavename = 'skiabot-win-compile-000' + buildername = 'Build-Win-MSVC-x86-Debug' + yield ( + api.test('big_issue_number') + + api.properties(buildername=buildername, + mastername=mastername, + slavename=slavename, + buildnumber=5, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + rietveld='https://codereview.chromium.org', + patchset=1, + issue=2147533002L) + + api.path.exists( + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + + api.platform('win', 64) + ) + + yield ( + api.test('recipe_with_gerrit_patch') + + api.properties( + buildername=buildername + '-Trybot', + mastername=mastername, + slavename=slavename, + buildnumber=5, + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + patch_storage='gerrit') + + api.properties.tryserver( + buildername=buildername + '-Trybot', + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + + api.platform('win', 64) + ) + + yield ( + api.test('buildbotless_trybot_rietveld') + + api.properties( + buildername=buildername, + mastername=mastername, + slavename=slavename, + buildnumber=5, + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + nobuildbot='True', + issue=500, + patchset=1, + patch_storage='rietveld', + rietveld='https://codereview.chromium.org') + + api.platform('win', 64) + ) + + yield ( + api.test('buildbotless_trybot_gerrit') + + api.properties( + repository='https://skia.googlesource.com/skia.git', + buildername=buildername, + mastername=mastername, + slavename=slavename, + buildnumber=5, + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + revision='abc123', + nobuildbot='True', + patch_issue=500, + patch_set=1, + patch_storage='gerrit') + + api.properties.tryserver( + buildername=buildername, + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + + api.platform('win', 64) + ) + + buildername = 'Build-Win-MSVC-x86_64-Release-Vulkan' + yield ( + api.test('alternate_repo') + + api.properties(buildername=buildername, + mastername=mastername, + slavename=slavename, + buildnumber=5, + repository='https://skia.googlesource.com/other_repo.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.path.exists( + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + ) + + buildername = 'Build-Ubuntu-GCC-x86_64-Release-PDFium' + yield ( + api.test('pdfium_trybot') + + api.properties( + repository='https://skia.googlesource.com/skia.git', + buildername=buildername, + mastername=mastername, + slavename=slavename, + buildnumber=5, + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + revision='abc123', + nobuildbot='True', + patch_issue=500, + patch_set=1, + patch_storage='gerrit') + + api.properties.tryserver( + buildername=buildername, + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + + api.path.exists( + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + ) diff --git a/infra/bots/recipe_modules/core/__init__.py b/infra/bots/recipe_modules/core/__init__.py new file mode 100644 index 0000000000..8fe6053715 --- /dev/null +++ b/infra/bots/recipe_modules/core/__init__.py @@ -0,0 +1,18 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/file', + 'depot_tools/bot_update', + 'depot_tools/gclient', + 'depot_tools/tryserver', + 'flavor', + 'recipe_engine/path', + 'recipe_engine/platform', + 'recipe_engine/properties', + 'recipe_engine/python', + 'recipe_engine/step', + 'run', + 'vars', +] diff --git a/infra/bots/recipe_modules/core/api.py b/infra/bots/recipe_modules/core/api.py new file mode 100644 index 0000000000..bab0fef0e5 --- /dev/null +++ b/infra/bots/recipe_modules/core/api.py @@ -0,0 +1,150 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# pylint: disable=W0201 + + +import json +import os +import re +import sys + +from recipe_engine import recipe_api +from recipe_engine import config_types + + +class SkiaApi(recipe_api.RecipeApi): + + def setup(self): + """Prepare the bot to run.""" + # Setup dependencies. + self.m.vars.setup() + + # Check out the Skia code. + self.checkout_steps() + + if not self.m.path.exists(self.m.vars.tmp_dir): + self.m.run.run_once(self.m.file.makedirs, + 'tmp_dir', + self.m.vars.tmp_dir, + infra_step=True) + + self.m.flavor.setup() + + def update_repo(self, parent_dir, repo): + """Update an existing repo. This is safe to call without gen_steps.""" + repo_path = parent_dir.join(repo.name) + if self.m.path.exists(repo_path): # pragma: nocover + if self.m.platform.is_win: + git = 'git.bat' + else: + git = 'git' + self.m.step('git remote set-url', + cmd=[git, 'remote', 'set-url', 'origin', repo.url], + cwd=repo_path, + infra_step=True) + self.m.step('git fetch', + cmd=[git, 'fetch'], + cwd=repo_path, + infra_step=True) + self.m.step('git reset', + cmd=[git, 'reset', '--hard', repo.revision], + cwd=repo_path, + infra_step=True) + self.m.step('git clean', + cmd=[git, 'clean', '-d', '-f'], + cwd=repo_path, + infra_step=True) + + def checkout_steps(self): + """Run the steps to obtain a checkout of Skia.""" + cfg_kwargs = {} + if not self.m.vars.persistent_checkout: + # We should've obtained the Skia checkout through isolates, so we don't + # need to perform the checkout ourselves. + return + + # Use a persistent gclient cache for Swarming. + cfg_kwargs['CACHE_DIR'] = self.m.vars.gclient_cache + + # Create the checkout path if necessary. + if not self.m.path.exists(self.m.vars.checkout_root): + self.m.file.makedirs('checkout_path', + self.m.vars.checkout_root, + infra_step=True) + + # Initial cleanup. + gclient_cfg = self.m.gclient.make_config(**cfg_kwargs) + main_repo = self.m.properties['repository'] + if self.m.vars.need_pdfium_checkout: + main_repo = 'https://pdfium.googlesource.com/pdfium.git' + main_name = self.m.path.basename(main_repo) + if main_name.endswith('.git'): + main_name = main_name[:-len('.git')] + main = gclient_cfg.solutions.add() + main.name = main_name + main.managed = False + main.url = main_repo + main.revision = self.m.properties.get('revision') or 'origin/master' + m = gclient_cfg.got_revision_mapping + m[main_name] = 'got_revision' + patch_root = main_name + + if self.m.vars.need_pdfium_checkout: + # Skia is a DEP of PDFium; the 'revision' property is a Skia revision, and + # any patch should be applied to Skia, not PDFium. + main.revision = 'origin/master' + main.managed = True + m[main_name] = 'got_%s_revision' % main_name + + skia_dep_path = 'pdfium/third_party/skia' + gclient_cfg.patch_projects['skia'] = (skia_dep_path, 'HEAD') + gclient_cfg.revisions[skia_dep_path] = self.m.properties['revision'] + m[skia_dep_path] = 'got_revision' + patch_root = skia_dep_path + + self.update_repo(self.m.vars.checkout_root, main) + + # TODO(rmistry): Remove the below block after there is a solution for + # crbug.com/616443 + entries_file = self.m.vars.checkout_root.join('.gclient_entries') + if self.m.path.exists(entries_file): + self.m.file.remove('remove %s' % entries_file, + entries_file, + infra_step=True) # pragma: no cover + + if self.m.vars.need_chromium_checkout: + chromium = gclient_cfg.solutions.add() + chromium.name = 'src' + chromium.managed = False + chromium.url = 'https://chromium.googlesource.com/chromium/src.git' + chromium.revision = 'origin/lkgr' + self.update_repo(self.m.vars.checkout_root, chromium) + + # Run bot_update. + checkout_kwargs = {} + checkout_kwargs['env'] = self.m.vars.default_env + + # Hack the patch ref if necessary. + if self.m.properties.get('patch_storage', '') == 'gerrit': + if self.m.bot_update._issue and self.m.bot_update._patchset: + self.m.bot_update._gerrit_ref = 'refs/changes/%s/%d/%d' % ( + str(self.m.bot_update._issue)[-2:], + self.m.bot_update._issue, + self.m.bot_update._patchset, + ) + + self.m.gclient.c = gclient_cfg + update_step = self.m.bot_update.ensure_checkout( + cwd=self.m.vars.checkout_root, + patch_root=patch_root, + **checkout_kwargs) + + self.m.vars.got_revision = ( + update_step.presentation.properties['got_revision']) + + if self.m.vars.need_chromium_checkout: + self.m.gclient.runhooks(cwd=self.m.vars.checkout_root, + env=self.m.vars.gclient_env) diff --git a/infra/bots/recipe_modules/core/resources/binary_size_utils.py b/infra/bots/recipe_modules/core/resources/binary_size_utils.py new file mode 100644 index 0000000000..c09a65dccd --- /dev/null +++ b/infra/bots/recipe_modules/core/resources/binary_size_utils.py @@ -0,0 +1,67 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Common utilities for tools that deal with binary size information. + +Copied from chromium/src/build/android/pylib/symbols/binary_size_tools.py. +""" + +import logging +import re + + +def ParseNm(nm_lines): + """Parse nm output, returning data for all relevant (to binary size) + symbols and ignoring the rest. + + Args: + nm_lines: an iterable over lines of nm output. + + Yields: + (symbol name, symbol type, symbol size, source file path). + + Path may be None if nm couldn't figure out the source file. + """ + + # Match lines with size, symbol, optional location, optional discriminator + sym_re = re.compile(r'^[0-9a-f]{8,} ' # address (8+ hex digits) + '([0-9a-f]{8,}) ' # size (8+ hex digits) + '(.) ' # symbol type, one character + '([^\t]+)' # symbol name, separated from next by tab + '(?:\t(.*):[\d\?]+)?.*$') # location + # Match lines with addr but no size. + addr_re = re.compile(r'^[0-9a-f]{8,} (.) ([^\t]+)(?:\t.*)?$') + # Match lines that don't have an address at all -- typically external symbols. + noaddr_re = re.compile(r'^ {8,} (.) (.*)$') + # Match lines with no symbol name, only addr and type + addr_only_re = re.compile(r'^[0-9a-f]{8,} (.)$') + + for line in nm_lines: + line = line.rstrip() + match = sym_re.match(line) + if match: + size, sym_type, sym = match.groups()[0:3] + size = int(size, 16) + if sym_type in ('B', 'b'): + continue # skip all BSS for now. + path = match.group(4) + yield sym, sym_type, size, path + continue + match = addr_re.match(line) + if match: + # sym_type, sym = match.groups()[0:2] + continue # No size == we don't care. + match = noaddr_re.match(line) + if match: + sym_type, sym = match.groups() + if sym_type in ('U', 'w'): + continue # external or weak symbol + match = addr_only_re.match(line) + if match: + continue # Nothing to do. + + + # If we reach this part of the loop, there was something in the + # line that we didn't expect or recognize. + logging.warning('nm output parser failed to parse: %s', repr(line)) diff --git a/infra/bots/recipe_modules/core/resources/elf_symbolizer.py b/infra/bots/recipe_modules/core/resources/elf_symbolizer.py new file mode 100644 index 0000000000..de9c141219 --- /dev/null +++ b/infra/bots/recipe_modules/core/resources/elf_symbolizer.py @@ -0,0 +1,477 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""The ElfSymbolizer class for symbolizing Executable and Linkable Files. + +Adapted for Skia's use from +chromium/src/build/android/pylib/symbols/elf_symbolizer.py. + +Main changes: +-- Added prefix_to_remove param to remove path prefix from tree data. +""" + +import collections +import datetime +import logging +import multiprocessing +import os +import posixpath +import Queue +import re +import subprocess +import sys +import threading + + +# addr2line builds a possibly infinite memory cache that can exhaust +# the computer's memory if allowed to grow for too long. This constant +# controls how many lookups we do before restarting the process. 4000 +# gives near peak performance without extreme memory usage. +ADDR2LINE_RECYCLE_LIMIT = 4000 + + +class ELFSymbolizer(object): + """An uber-fast (multiprocessing, pipelined and asynchronous) ELF symbolizer. + + This class is a frontend for addr2line (part of GNU binutils), designed to + symbolize batches of large numbers of symbols for a given ELF file. It + supports sharding symbolization against many addr2line instances and + pipelining of multiple requests per each instance (in order to hide addr2line + internals and OS pipe latencies). + + The interface exhibited by this class is a very simple asynchronous interface, + which is based on the following three methods: + - SymbolizeAsync(): used to request (enqueue) resolution of a given address. + - The |callback| method: used to communicated back the symbol information. + - Join(): called to conclude the batch to gather the last outstanding results. + In essence, before the Join method returns, this class will have issued as + many callbacks as the number of SymbolizeAsync() calls. In this regard, note + that due to multiprocess sharding, callbacks can be delivered out of order. + + Some background about addr2line: + - it is invoked passing the elf path in the cmdline, piping the addresses in + its stdin and getting results on its stdout. + - it has pretty large response times for the first requests, but it + works very well in streaming mode once it has been warmed up. + - it doesn't scale by itself (on more cores). However, spawning multiple + instances at the same time on the same file is pretty efficient as they + keep hitting the pagecache and become mostly CPU bound. + - it might hang or crash, mostly for OOM. This class deals with both of these + problems. + + Despite the "scary" imports and the multi* words above, (almost) no multi- + threading/processing is involved from the python viewpoint. Concurrency + here is achieved by spawning several addr2line subprocesses and handling their + output pipes asynchronously. Therefore, all the code here (with the exception + of the Queue instance in Addr2Line) should be free from mind-blowing + thread-safety concerns. + + The multiprocess sharding works as follows: + The symbolizer tries to use the lowest number of addr2line instances as + possible (with respect of |max_concurrent_jobs|) and enqueue all the requests + in a single addr2line instance. For few symbols (i.e. dozens) sharding isn't + worth the startup cost. + The multiprocess logic kicks in as soon as the queues for the existing + instances grow. Specifically, once all the existing instances reach the + |max_queue_size| bound, a new addr2line instance is kicked in. + In the case of a very eager producer (i.e. all |max_concurrent_jobs| instances + have a backlog of |max_queue_size|), back-pressure is applied on the caller by + blocking the SymbolizeAsync method. + + This module has been deliberately designed to be dependency free (w.r.t. of + other modules in this project), to allow easy reuse in external projects. + """ + + def __init__(self, elf_file_path, addr2line_path, callback, inlines=False, + max_concurrent_jobs=None, addr2line_timeout=30, max_queue_size=50, + source_root_path=None, strip_base_path=None, prefix_to_remove=None): + """Args: + elf_file_path: path of the elf file to be symbolized. + addr2line_path: path of the toolchain's addr2line binary. + callback: a callback which will be invoked for each resolved symbol with + the two args (sym_info, callback_arg). The former is an instance of + |ELFSymbolInfo| and contains the symbol information. The latter is an + embedder-provided argument which is passed to SymbolizeAsync(). + inlines: when True, the ELFSymbolInfo will contain also the details about + the outer inlining functions. When False, only the innermost function + will be provided. + max_concurrent_jobs: Max number of addr2line instances spawned. + Parallelize responsibly, addr2line is a memory and I/O monster. + max_queue_size: Max number of outstanding requests per addr2line instance. + addr2line_timeout: Max time (in seconds) to wait for a addr2line response. + After the timeout, the instance will be considered hung and respawned. + source_root_path: In some toolchains only the name of the source file is + is output, without any path information; disambiguation searches + through the source directory specified by |source_root_path| argument + for files whose name matches, adding the full path information to the + output. For example, if the toolchain outputs "unicode.cc" and there + is a file called "unicode.cc" located under |source_root_path|/foo, + the tool will replace "unicode.cc" with + "|source_root_path|/foo/unicode.cc". If there are multiple files with + the same name, disambiguation will fail because the tool cannot + determine which of the files was the source of the symbol. + strip_base_path: Rebases the symbols source paths onto |source_root_path| + (i.e replace |strip_base_path| with |source_root_path). + prefix_to_remove: Removes the prefix from ElfSymbolInfo output. Skia added + """ + assert(os.path.isfile(addr2line_path)), 'Cannot find ' + addr2line_path + self.elf_file_path = elf_file_path + self.addr2line_path = addr2line_path + self.callback = callback + self.inlines = inlines + self.max_concurrent_jobs = (max_concurrent_jobs or + min(multiprocessing.cpu_count(), 4)) + self.max_queue_size = max_queue_size + self.addr2line_timeout = addr2line_timeout + self.requests_counter = 0 # For generating monotonic request IDs. + self._a2l_instances = [] # Up to |max_concurrent_jobs| _Addr2Line inst. + + # Skia addition: remove the given prefix from tree paths. + self.prefix_to_remove = prefix_to_remove + + # If necessary, create disambiguation lookup table + self.disambiguate = source_root_path is not None + self.disambiguation_table = {} + self.strip_base_path = strip_base_path + if(self.disambiguate): + self.source_root_path = os.path.abspath(source_root_path) + self._CreateDisambiguationTable() + + # Create one addr2line instance. More instances will be created on demand + # (up to |max_concurrent_jobs|) depending on the rate of the requests. + self._CreateNewA2LInstance() + + def SymbolizeAsync(self, addr, callback_arg=None): + """Requests symbolization of a given address. + + This method is not guaranteed to return immediately. It generally does, but + in some scenarios (e.g. all addr2line instances have full queues) it can + block to create back-pressure. + + Args: + addr: address to symbolize. + callback_arg: optional argument which will be passed to the |callback|.""" + assert(isinstance(addr, int)) + + # Process all the symbols that have been resolved in the meanwhile. + # Essentially, this drains all the addr2line(s) out queues. + for a2l_to_purge in self._a2l_instances: + a2l_to_purge.ProcessAllResolvedSymbolsInQueue() + a2l_to_purge.RecycleIfNecessary() + + # Find the best instance according to this logic: + # 1. Find an existing instance with the shortest queue. + # 2. If all of instances' queues are full, but there is room in the pool, + # (i.e. < |max_concurrent_jobs|) create a new instance. + # 3. If there were already |max_concurrent_jobs| instances and all of them + # had full queues, make back-pressure. + + # 1. + def _SortByQueueSizeAndReqID(a2l): + return (a2l.queue_size, a2l.first_request_id) + a2l = min(self._a2l_instances, key=_SortByQueueSizeAndReqID) + + # 2. + if (a2l.queue_size >= self.max_queue_size and + len(self._a2l_instances) < self.max_concurrent_jobs): + a2l = self._CreateNewA2LInstance() + + # 3. + if a2l.queue_size >= self.max_queue_size: + a2l.WaitForNextSymbolInQueue() + + a2l.EnqueueRequest(addr, callback_arg) + + def Join(self): + """Waits for all the outstanding requests to complete and terminates.""" + for a2l in self._a2l_instances: + a2l.WaitForIdle() + a2l.Terminate() + + def _CreateNewA2LInstance(self): + assert(len(self._a2l_instances) < self.max_concurrent_jobs) + a2l = ELFSymbolizer.Addr2Line(self) + self._a2l_instances.append(a2l) + return a2l + + def _CreateDisambiguationTable(self): + """ Non-unique file names will result in None entries""" + self.disambiguation_table = {} + + for root, _, filenames in os.walk(self.source_root_path): + for f in filenames: + self.disambiguation_table[f] = os.path.join(root, f) if (f not in + self.disambiguation_table) else None + + + class Addr2Line(object): + """A python wrapper around an addr2line instance. + + The communication with the addr2line process looks as follows: + [STDIN] [STDOUT] (from addr2line's viewpoint) + > f001111 + > f002222 + < Symbol::Name(foo, bar) for f001111 + < /path/to/source/file.c:line_number + > f003333 + < Symbol::Name2() for f002222 + < /path/to/source/file.c:line_number + < Symbol::Name3() for f003333 + < /path/to/source/file.c:line_number + """ + + SYM_ADDR_RE = re.compile(r'([^:]+):(\?|\d+).*') + + def __init__(self, symbolizer): + self._symbolizer = symbolizer + self._lib_file_name = posixpath.basename(symbolizer.elf_file_path) + + # The request queue (i.e. addresses pushed to addr2line's stdin and not + # yet retrieved on stdout) + self._request_queue = collections.deque() + + # This is essentially len(self._request_queue). It has been optimized to a + # separate field because turned out to be a perf hot-spot. + self.queue_size = 0 + + # Keep track of the number of symbols a process has processed to + # avoid a single process growing too big and using all the memory. + self._processed_symbols_count = 0 + + # Objects required to handle the addr2line subprocess. + self._proc = None # Subprocess.Popen(...) instance. + self._thread = None # Threading.thread instance. + self._out_queue = None # Queue.Queue instance (for buffering a2l stdout). + self._RestartAddr2LineProcess() + + def EnqueueRequest(self, addr, callback_arg): + """Pushes an address to addr2line's stdin (and keeps track of it).""" + self._symbolizer.requests_counter += 1 # For global "age" of requests. + req_idx = self._symbolizer.requests_counter + self._request_queue.append((addr, callback_arg, req_idx)) + self.queue_size += 1 + self._WriteToA2lStdin(addr) + + def WaitForIdle(self): + """Waits until all the pending requests have been symbolized.""" + while self.queue_size > 0: + self.WaitForNextSymbolInQueue() + + def WaitForNextSymbolInQueue(self): + """Waits for the next pending request to be symbolized.""" + if not self.queue_size: + return + + # This outer loop guards against a2l hanging (detecting stdout timeout). + while True: + start_time = datetime.datetime.now() + timeout = datetime.timedelta(seconds=self._symbolizer.addr2line_timeout) + + # The inner loop guards against a2l crashing (checking if it exited). + while (datetime.datetime.now() - start_time < timeout): + # poll() returns !None if the process exited. a2l should never exit. + if self._proc.poll(): + logging.warning('addr2line crashed, respawning (lib: %s).' % + self._lib_file_name) + self._RestartAddr2LineProcess() + # TODO(primiano): the best thing to do in this case would be + # shrinking the pool size as, very likely, addr2line is crashed + # due to low memory (and the respawned one will die again soon). + + try: + lines = self._out_queue.get(block=True, timeout=0.25) + except Queue.Empty: + # On timeout (1/4 s.) repeat the inner loop and check if either the + # addr2line process did crash or we waited its output for too long. + continue + + # In nominal conditions, we get straight to this point. + self._ProcessSymbolOutput(lines) + return + + # If this point is reached, we waited more than |addr2line_timeout|. + logging.warning('Hung addr2line process, respawning (lib: %s).' % + self._lib_file_name) + self._RestartAddr2LineProcess() + + def ProcessAllResolvedSymbolsInQueue(self): + """Consumes all the addr2line output lines produced (without blocking).""" + if not self.queue_size: + return + while True: + try: + lines = self._out_queue.get_nowait() + except Queue.Empty: + break + self._ProcessSymbolOutput(lines) + + def RecycleIfNecessary(self): + """Restarts the process if it has been used for too long. + + A long running addr2line process will consume excessive amounts + of memory without any gain in performance.""" + if self._processed_symbols_count >= ADDR2LINE_RECYCLE_LIMIT: + self._RestartAddr2LineProcess() + + + def Terminate(self): + """Kills the underlying addr2line process. + + The poller |_thread| will terminate as well due to the broken pipe.""" + try: + self._proc.kill() + self._proc.communicate() # Essentially wait() without risking deadlock. + except Exception: # An exception while terminating? How interesting. + pass + self._proc = None + + def _WriteToA2lStdin(self, addr): + self._proc.stdin.write('%s\n' % hex(addr)) + if self._symbolizer.inlines: + # In the case of inlines we output an extra blank line, which causes + # addr2line to emit a (??,??:0) tuple that we use as a boundary marker. + self._proc.stdin.write('\n') + self._proc.stdin.flush() + + def _ProcessSymbolOutput(self, lines): + """Parses an addr2line symbol output and triggers the client callback.""" + (_, callback_arg, _) = self._request_queue.popleft() + self.queue_size -= 1 + + innermost_sym_info = None + sym_info = None + for (line1, line2) in lines: + prev_sym_info = sym_info + name = line1 if not line1.startswith('?') else None + source_path = None + source_line = None + m = ELFSymbolizer.Addr2Line.SYM_ADDR_RE.match(line2) + if m: + if not m.group(1).startswith('?'): + source_path = m.group(1) + if not m.group(2).startswith('?'): + source_line = int(m.group(2)) + else: + logging.warning('Got invalid symbol path from addr2line: %s' % line2) + + # In case disambiguation is on, and needed + was_ambiguous = False + disambiguated = False + if self._symbolizer.disambiguate: + if source_path and not posixpath.isabs(source_path): + path = self._symbolizer.disambiguation_table.get(source_path) + was_ambiguous = True + disambiguated = path is not None + source_path = path if disambiguated else source_path + + # Use absolute paths (so that paths are consistent, as disambiguation + # uses absolute paths) + if source_path and not was_ambiguous: + source_path = os.path.abspath(source_path) + + if source_path and self._symbolizer.strip_base_path: + # Strip the base path + source_path = re.sub('^' + self._symbolizer.strip_base_path, + self._symbolizer.source_root_path or '', source_path) + + sym_info = ELFSymbolInfo(name, source_path, source_line, was_ambiguous, + disambiguated, + self._symbolizer.prefix_to_remove) + if prev_sym_info: + prev_sym_info.inlined_by = sym_info + if not innermost_sym_info: + innermost_sym_info = sym_info + + self._processed_symbols_count += 1 + self._symbolizer.callback(innermost_sym_info, callback_arg) + + def _RestartAddr2LineProcess(self): + if self._proc: + self.Terminate() + + # The only reason of existence of this Queue (and the corresponding + # Thread below) is the lack of a subprocess.stdout.poll_avail_lines(). + # Essentially this is a pipe able to extract a couple of lines atomically. + self._out_queue = Queue.Queue() + + # Start the underlying addr2line process in line buffered mode. + + cmd = [self._symbolizer.addr2line_path, '--functions', '--demangle', + '--exe=' + self._symbolizer.elf_file_path] + if self._symbolizer.inlines: + cmd += ['--inlines'] + self._proc = subprocess.Popen(cmd, bufsize=1, stdout=subprocess.PIPE, + stdin=subprocess.PIPE, stderr=sys.stderr, close_fds=True) + + # Start the poller thread, which simply moves atomically the lines read + # from the addr2line's stdout to the |_out_queue|. + self._thread = threading.Thread( + target=ELFSymbolizer.Addr2Line.StdoutReaderThread, + args=(self._proc.stdout, self._out_queue, self._symbolizer.inlines)) + self._thread.daemon = True # Don't prevent early process exit. + self._thread.start() + + self._processed_symbols_count = 0 + + # Replay the pending requests on the new process (only for the case + # of a hung addr2line timing out during the game). + for (addr, _, _) in self._request_queue: + self._WriteToA2lStdin(addr) + + @staticmethod + def StdoutReaderThread(process_pipe, queue, inlines): + """The poller thread fn, which moves the addr2line stdout to the |queue|. + + This is the only piece of code not running on the main thread. It merely + writes to a Queue, which is thread-safe. In the case of inlines, it + detects the ??,??:0 marker and sends the lines atomically, such that the + main thread always receives all the lines corresponding to one symbol in + one shot.""" + try: + lines_for_one_symbol = [] + while True: + line1 = process_pipe.readline().rstrip('\r\n') + line2 = process_pipe.readline().rstrip('\r\n') + if not line1 or not line2: + break + inline_has_more_lines = inlines and (len(lines_for_one_symbol) == 0 or + (line1 != '??' and line2 != '??:0')) + if not inlines or inline_has_more_lines: + lines_for_one_symbol += [(line1, line2)] + if inline_has_more_lines: + continue + queue.put(lines_for_one_symbol) + lines_for_one_symbol = [] + process_pipe.close() + + # Every addr2line processes will die at some point, please die silently. + except (IOError, OSError): + pass + + @property + def first_request_id(self): + """Returns the request_id of the oldest pending request in the queue.""" + return self._request_queue[0][2] if self._request_queue else 0 + + +class ELFSymbolInfo(object): + """The result of the symbolization passed as first arg. of each callback.""" + + def __init__(self, name, source_path, source_line, was_ambiguous=False, + disambiguated=False, prefix_to_remove=None): + """All the fields here can be None (if addr2line replies with '??').""" + self.name = name + if source_path and source_path.startswith(prefix_to_remove): + source_path = source_path[len(prefix_to_remove) : ] + self.source_path = source_path + self.source_line = source_line + # In the case of |inlines|=True, the |inlined_by| points to the outer + # function inlining the current one (and so on, to form a chain). + self.inlined_by = None + self.disambiguated = disambiguated + self.was_ambiguous = was_ambiguous + + def __str__(self): + return '%s [%s:%d]' % ( + self.name or '??', self.source_path or '??', self.source_line or 0) diff --git a/infra/bots/recipe_modules/core/resources/generate_and_upload_doxygen.py b/infra/bots/recipe_modules/core/resources/generate_and_upload_doxygen.py new file mode 100755 index 0000000000..968f80debf --- /dev/null +++ b/infra/bots/recipe_modules/core/resources/generate_and_upload_doxygen.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +"""Generate Doxygen documentation.""" + + +import datetime +import os +import shutil +import subprocess +import sys + + +DOXYFILE_BASENAME = 'Doxyfile' # must match name of Doxyfile in skia root +DOXYGEN_BINARY = 'doxygen' +WORKDIR = os.path.join(os.pardir, 'doxygen_workdir') +DOXYGEN_CONFIG_DIR = os.path.join(WORKDIR, 'doxygen-config') +DOXYGEN_WORKING_DIR = os.path.join(WORKDIR, 'doxygen') +DOXYGEN_GS_PATH = '/'.join(['gs://skia-doc', 'doxygen']) + +IFRAME_FOOTER_TEMPLATE = """ +<html><body><address style="text-align: right;"><small> +Generated at %s for skia +by <a href="http://www.doxygen.org/index.html">doxygen</a> +%s </small></address></body></html> +""" + + +def recreate_dir(path): + """Delete and recreate the directory.""" + try: + shutil.rmtree(path) + except OSError: + if os.path.exists(path): + raise Exception('Could not remove %s' % path) + os.makedirs(path) + + +def generate_and_upload_doxygen(): + """Generate Doxygen.""" + # Create empty dir and add static_footer.txt + recreate_dir(DOXYGEN_WORKING_DIR) + static_footer_path = os.path.join(DOXYGEN_WORKING_DIR, 'static_footer.txt') + shutil.copyfile(os.path.join('tools', 'doxygen_footer.txt'), + static_footer_path) + + # Make copy of doxygen config file, overriding any necessary configs, + # and run doxygen. + recreate_dir(DOXYGEN_CONFIG_DIR) + modified_doxyfile = os.path.join(DOXYGEN_CONFIG_DIR, DOXYFILE_BASENAME) + with open(DOXYFILE_BASENAME, 'r') as reader: + with open(modified_doxyfile, 'w') as writer: + shutil.copyfileobj(reader, writer) + writer.write('OUTPUT_DIRECTORY = %s\n' % DOXYGEN_WORKING_DIR) + writer.write('HTML_FOOTER = %s\n' % static_footer_path) + subprocess.check_call([DOXYGEN_BINARY, modified_doxyfile]) + + # Create iframe_footer.html + with open(os.path.join(DOXYGEN_WORKING_DIR, 'iframe_footer.html'), 'w') as f: + f.write(IFRAME_FOOTER_TEMPLATE % ( + datetime.datetime.now().isoformat(' '), + subprocess.check_output([DOXYGEN_BINARY, '--version']).rstrip())) + + # Upload. + cmd = ['gsutil', 'cp', '-a', 'public-read', '-R', + DOXYGEN_WORKING_DIR, DOXYGEN_GS_PATH] + subprocess.check_call(cmd) + + +if '__main__' == __name__: + generate_and_upload_doxygen() + diff --git a/infra/bots/recipe_modules/core/resources/run_binary_size_analysis.py b/infra/bots/recipe_modules/core/resources/run_binary_size_analysis.py new file mode 100755 index 0000000000..99887ea9cc --- /dev/null +++ b/infra/bots/recipe_modules/core/resources/run_binary_size_analysis.py @@ -0,0 +1,817 @@ +#!/usr/bin/env python +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Generate a spatial analysis against an arbitrary library. + +Adapted for Skia's use case from +chromium/src/tools/binary_size/run_binary_size_analysis.py. Main changes: + +-- Cleans up some deprecated codes. +-- Always use relative code path so the tree root is Skia repo's root. +-- Instead of outputting the standalone HTML/CSS/JS filesets, writes the + TreeMap JSON data into a Google Storage bucket. +-- Adds githash and total_size to the JSON data. +-- Outputs another summary data in JSON Bench format for skiaperf ingestion. + +The output JSON data for visualization is in the following format: + +{ + "githash": 123abc, + "commit_ts": 1234567890, + "total_size": 1234567, + "key": {"source_type": "binary_size"}, + "tree_data": { + "maxDepth": 9, + "k": "p", "children":[ + {"k":"p","children":[ + {"k":"p","children":[ + {"k":"p","lastPathElement":true,"children":[ + {"k":"b","t":"t","children":[ + {"k":"s", "t":"t", "value":4029, + "n":"etc_encode_subblock_helper(unsigned char const*, ...)" + }, + ...... + } +} + +Another JSON file is generated for size summaries to be used in skiaperf. The +JSON format details can be found at: + https://github.com/google/skia/blob/master/bench/ResultsWriter.h#L54 +and: + https://skia.googlesource.com/buildbot/+/master/perf/go/ingester/nanobench.go + +In the binary size case, outputs look like: + +{ + "gitHash": "123abc", + "key": { + "source_type": "binarysize" + } + "results: { + "src_lazy_global_weak_symbol": { + "memory": { + "bytes": 41, + "options": { + "path": "src_lazy", + "symbol": "global_weak_symbol" + } + } + }, + "src_lazy_global_read_only_data": { + "memory": { + "bytes": 13476, + "options": { + "path": "src_lazy", + "symbol": "global_read_only_data" + } + } + }, + ... + } +} + +""" + +import collections +import datetime +import json +import logging +import multiprocessing +import optparse +import os +import re +import shutil +import struct +import subprocess +import sys +import tempfile +import time +import urllib2 + +import binary_size_utils +import elf_symbolizer + +from recipe_engine.types import freeze + +# Node dictionary keys. These are output in json read by the webapp so +# keep them short to save file size. +# Note: If these change, the webapp must also change. +NODE_TYPE_KEY = 'k' +NODE_NAME_KEY = 'n' +NODE_CHILDREN_KEY = 'children' +NODE_SYMBOL_TYPE_KEY = 't' +NODE_SYMBOL_SIZE_KEY = 'value' +NODE_MAX_DEPTH_KEY = 'maxDepth' +NODE_LAST_PATH_ELEMENT_KEY = 'lastPathElement' + +# The display name of the bucket where we put symbols without path. +NAME_NO_PATH_BUCKET = '(No Path)' + +# Try to keep data buckets smaller than this to avoid killing the +# graphing lib. +BIG_BUCKET_LIMIT = 3000 + +# Skia addition: relative dir for libskia.so from code base. +LIBSKIA_RELATIVE_PATH = os.path.join('out', 'Release', 'lib') + +# Skia addition: dictionary mapping symbol type code to symbol name. +# See +# https://code.google.com/p/chromium/codesearch#chromium/src/tools/binary_size/template/D3SymbolTreeMap.js&l=74 +SYMBOL_MAP = freeze({ + 'A': 'global_absolute', + 'B': 'global_uninitialized_data', + 'b': 'local_uninitialized_data', + 'C': 'global_uninitialized_common', + 'D': 'global_initialized_data', + 'd': 'local_initialized_data', + 'G': 'global_small initialized_data', + 'g': 'local_small_initialized_data', + 'i': 'indirect_function', + 'N': 'debugging', + 'p': 'stack_unwind', + 'R': 'global_read_only_data', + 'r': 'local_read_only_data', + 'S': 'global_small_uninitialized_data', + 's': 'local_small_uninitialized_data', + 'T': 'global_code', + 't': 'local_code', + 'U': 'undefined', + 'u': 'unique', + 'V': 'global_weak_object', + 'v': 'local_weak_object', + 'W': 'global_weak_symbol', + 'w': 'local_weak_symbol', + '@': 'vtable_entry', + '-': 'stabs_debugging', + '?': 'unrecognized', +}) + + +def _MkChild(node, name): + child = node[NODE_CHILDREN_KEY].get(name) + if child is None: + child = {NODE_NAME_KEY: name, + NODE_CHILDREN_KEY: {}} + node[NODE_CHILDREN_KEY][name] = child + return child + + +def SplitNoPathBucket(node): + """NAME_NO_PATH_BUCKET can be too large for the graphing lib to + handle. Split it into sub-buckets in that case.""" + root_children = node[NODE_CHILDREN_KEY] + if NAME_NO_PATH_BUCKET in root_children: + no_path_bucket = root_children[NAME_NO_PATH_BUCKET] + old_children = no_path_bucket[NODE_CHILDREN_KEY] + count = 0 + for symbol_type, symbol_bucket in old_children.iteritems(): + count += len(symbol_bucket[NODE_CHILDREN_KEY]) + if count > BIG_BUCKET_LIMIT: + new_children = {} + no_path_bucket[NODE_CHILDREN_KEY] = new_children + current_bucket = None + index = 0 + for symbol_type, symbol_bucket in old_children.iteritems(): + for symbol_name, value in symbol_bucket[NODE_CHILDREN_KEY].iteritems(): + if index % BIG_BUCKET_LIMIT == 0: + group_no = (index / BIG_BUCKET_LIMIT) + 1 + current_bucket = _MkChild(no_path_bucket, + '%s subgroup %d' % (NAME_NO_PATH_BUCKET, + group_no)) + assert not NODE_TYPE_KEY in node or node[NODE_TYPE_KEY] == 'p' + node[NODE_TYPE_KEY] = 'p' # p for path + index += 1 + symbol_size = value[NODE_SYMBOL_SIZE_KEY] + AddSymbolIntoFileNode(current_bucket, symbol_type, + symbol_name, symbol_size) + + +def MakeChildrenDictsIntoLists(node): + largest_list_len = 0 + if NODE_CHILDREN_KEY in node: + largest_list_len = len(node[NODE_CHILDREN_KEY]) + child_list = [] + for child in node[NODE_CHILDREN_KEY].itervalues(): + child_largest_list_len = MakeChildrenDictsIntoLists(child) + if child_largest_list_len > largest_list_len: + largest_list_len = child_largest_list_len + child_list.append(child) + node[NODE_CHILDREN_KEY] = child_list + + return largest_list_len + + +def AddSymbolIntoFileNode(node, symbol_type, symbol_name, symbol_size): + """Puts symbol into the file path node |node|. + Returns the number of added levels in tree. I.e. returns 2.""" + + # 'node' is the file node and first step is to find its symbol-type bucket. + node[NODE_LAST_PATH_ELEMENT_KEY] = True + node = _MkChild(node, symbol_type) + assert not NODE_TYPE_KEY in node or node[NODE_TYPE_KEY] == 'b' + node[NODE_SYMBOL_TYPE_KEY] = symbol_type + node[NODE_TYPE_KEY] = 'b' # b for bucket + + # 'node' is now the symbol-type bucket. Make the child entry. + node = _MkChild(node, symbol_name) + if NODE_CHILDREN_KEY in node: + if node[NODE_CHILDREN_KEY]: + logging.warning('A container node used as symbol for %s.' % symbol_name) + # This is going to be used as a leaf so no use for child list. + del node[NODE_CHILDREN_KEY] + node[NODE_SYMBOL_SIZE_KEY] = symbol_size + node[NODE_SYMBOL_TYPE_KEY] = symbol_type + node[NODE_TYPE_KEY] = 's' # s for symbol + + return 2 # Depth of the added subtree. + + +def MakeCompactTree(symbols, symbol_path_origin_dir): + result = {NODE_NAME_KEY: '/', + NODE_CHILDREN_KEY: {}, + NODE_TYPE_KEY: 'p', + NODE_MAX_DEPTH_KEY: 0} + seen_symbol_with_path = False + for symbol_name, symbol_type, symbol_size, file_path in symbols: + + if 'vtable for ' in symbol_name: + symbol_type = '@' # hack to categorize these separately + if file_path and file_path != "??": + seen_symbol_with_path = True + else: + file_path = NAME_NO_PATH_BUCKET + + path_parts = file_path.split('/') + + # Find pre-existing node in tree, or update if it already exists + node = result + depth = 0 + while len(path_parts) > 0: + path_part = path_parts.pop(0) + if len(path_part) == 0: + continue + depth += 1 + node = _MkChild(node, path_part) + assert not NODE_TYPE_KEY in node or node[NODE_TYPE_KEY] == 'p' + node[NODE_TYPE_KEY] = 'p' # p for path + + depth += AddSymbolIntoFileNode(node, symbol_type, symbol_name, symbol_size) + result[NODE_MAX_DEPTH_KEY] = max(result[NODE_MAX_DEPTH_KEY], depth) + + if not seen_symbol_with_path: + logging.warning('Symbols lack paths. Data will not be structured.') + + # The (no path) bucket can be extremely large if we failed to get + # path information. Split it into subgroups if needed. + SplitNoPathBucket(result) + + largest_list_len = MakeChildrenDictsIntoLists(result) + + if largest_list_len > BIG_BUCKET_LIMIT: + logging.warning('There are sections with %d nodes. ' + 'Results might be unusable.' % largest_list_len) + return result + + +# Skia added: summarizes tree size by symbol type for the given root node. +# Returns a dict keyed by symbol type, and value the type's overall size. +# e.g., {"t": 12345, "W": 543}. +def GetTreeSizes(node): + if 'children' not in node or not node['children']: + return {node['t']: node['value']} + dic = {} + for i in node['children']: + for k, v in GetTreeSizes(i).items(): + dic.setdefault(k, 0) + dic[k] += v + + return dic + + +# Skia added: creates dict to be converted to JSON in bench format. +# See top of file for the structure description. +def GetBenchDict(githash, tree_root): + dic = {'gitHash': githash, + 'key': {'source_type': 'binarysize'}, + 'results': {},} + for i in tree_root['children']: + if '(No Path)' == i['n']: # Already at symbol summary level. + for k, v in GetTreeSizes(i).items(): + dic['results']['no_path_' + SYMBOL_MAP[k]] = { + 'memory': { + 'bytes': v, + 'options': {'path': 'no_path', + 'symbol': SYMBOL_MAP[k],},}} + else: # We need to go deeper. + for c in i['children']: + path = i['n'] + '_' + c['n'] + for k, v in GetTreeSizes(c).items(): + dic['results'][path + '_' + SYMBOL_MAP[k]] = { + 'memory': { + 'bytes': v, + 'options': {'path': path, + 'symbol': SYMBOL_MAP[k],}}} + + return dic + + +# Skia added: constructs 'gsutil cp' subprocess command list. +def GetGsCopyCommandList(gsutil, src, dst): + return [gsutil, '-h', 'Content-Type:application/json', 'cp', '-a', + 'public-read', src, dst] + + +def DumpCompactTree(symbols, symbol_path_origin_dir, ha, ts, issue, gsutil): + tree_root = MakeCompactTree(symbols, symbol_path_origin_dir) + json_data = {'tree_data': tree_root, + 'githash': ha, + 'commit_ts': ts, + 'key': {'source_type': 'binary_size'}, + 'total_size': sum(GetTreeSizes(tree_root).values()),} + tmpfile = tempfile.NamedTemporaryFile(delete=False).name + with open(tmpfile, 'w') as out: + # Use separators without whitespace to get a smaller file. + json.dump(json_data, out, separators=(',', ':')) + + GS_PREFIX = 'gs://skia-perf/' + # Writes to Google Storage for visualization. + subprocess.check_call(GetGsCopyCommandList( + gsutil, tmpfile, GS_PREFIX + 'size/' + ha + '.json')) + # Updates the latest data. + if not issue: + subprocess.check_call(GetGsCopyCommandList(gsutil, tmpfile, + GS_PREFIX + 'size/latest.json')) + # Writes an extra copy using year/month/day/hour path for easy ingestion. + with open(tmpfile, 'w') as out: + json.dump(GetBenchDict(ha, tree_root), out, separators=(',', ':')) + now = datetime.datetime.utcnow() + ingest_path = '/'.join(('nano-json-v1', str(now.year).zfill(4), + str(now.month).zfill(2), str(now.day).zfill(2), + str(now.hour).zfill(2))) + if issue: + ingest_path = '/'.join('trybot', ingest_path, issue) + subprocess.check_call(GetGsCopyCommandList(gsutil, tmpfile, + GS_PREFIX + ingest_path + '/binarysize_' + ha + '.json')) + + +def MakeSourceMap(symbols): + sources = {} + for _sym, _symbol_type, size, path in symbols: + key = None + if path: + key = os.path.normpath(path) + else: + key = '[no path]' + if key not in sources: + sources[key] = {'path': path, 'symbol_count': 0, 'size': 0} + record = sources[key] + record['size'] += size + record['symbol_count'] += 1 + return sources + + +# Regex for parsing "nm" output. A sample line looks like this: +# 0167b39c 00000018 t ACCESS_DESCRIPTION_free /path/file.c:95 +# +# The fields are: address, size, type, name, source location +# Regular expression explained ( see also: https://xkcd.com/208 ): +# ([0-9a-f]{8,}+) The address +# [\s]+ Whitespace separator +# ([0-9a-f]{8,}+) The size. From here on out it's all optional. +# [\s]+ Whitespace separator +# (\S?) The symbol type, which is any non-whitespace char +# [\s*] Whitespace separator +# ([^\t]*) Symbol name, any non-tab character (spaces ok!) +# [\t]? Tab separator +# (.*) The location (filename[:linennum|?][ (discriminator n)] +sNmPattern = re.compile( + r'([0-9a-f]{8,})[\s]+([0-9a-f]{8,})[\s]*(\S?)[\s*]([^\t]*)[\t]?(.*)') + +class Progress(): + def __init__(self): + self.count = 0 + self.skip_count = 0 + self.collisions = 0 + self.time_last_output = time.time() + self.count_last_output = 0 + self.disambiguations = 0 + self.was_ambiguous = 0 + + +def RunElfSymbolizer(outfile, library, addr2line_binary, nm_binary, jobs, + disambiguate, src_path): + nm_output = RunNm(library, nm_binary) + nm_output_lines = nm_output.splitlines() + nm_output_lines_len = len(nm_output_lines) + address_symbol = {} + progress = Progress() + def map_address_symbol(symbol, addr): + progress.count += 1 + if addr in address_symbol: + # 'Collision between %s and %s.' % (str(symbol.name), + # str(address_symbol[addr].name)) + progress.collisions += 1 + else: + if symbol.disambiguated: + progress.disambiguations += 1 + if symbol.was_ambiguous: + progress.was_ambiguous += 1 + + address_symbol[addr] = symbol + + progress_output() + + def progress_output(): + progress_chunk = 100 + if progress.count % progress_chunk == 0: + time_now = time.time() + time_spent = time_now - progress.time_last_output + if time_spent > 1.0: + # Only output at most once per second. + progress.time_last_output = time_now + chunk_size = progress.count - progress.count_last_output + progress.count_last_output = progress.count + if time_spent > 0: + speed = chunk_size / time_spent + else: + speed = 0 + progress_percent = (100.0 * (progress.count + progress.skip_count) / + nm_output_lines_len) + disambiguation_percent = 0 + if progress.disambiguations != 0: + disambiguation_percent = (100.0 * progress.disambiguations / + progress.was_ambiguous) + + sys.stdout.write('\r%.1f%%: Looked up %d symbols (%d collisions, ' + '%d disambiguations where %.1f%% succeeded)' + ' - %.1f lookups/s.' % + (progress_percent, progress.count, progress.collisions, + progress.disambiguations, disambiguation_percent, speed)) + + # In case disambiguation was disabled, we remove the source path (which upon + # being set signals the symbolizer to enable disambiguation) + if not disambiguate: + src_path = None + symbol_path_origin_dir = os.path.dirname(library) + # Skia specific. + symbol_path_prefix = symbol_path_origin_dir.replace(LIBSKIA_RELATIVE_PATH, '') + symbolizer = elf_symbolizer.ELFSymbolizer(library, addr2line_binary, + map_address_symbol, + max_concurrent_jobs=jobs, + source_root_path=src_path, + prefix_to_remove=symbol_path_prefix) + user_interrupted = False + try: + for line in nm_output_lines: + match = sNmPattern.match(line) + if match: + location = match.group(5) + if not location: + addr = int(match.group(1), 16) + size = int(match.group(2), 16) + if addr in address_symbol: # Already looked up, shortcut + # ELFSymbolizer. + map_address_symbol(address_symbol[addr], addr) + continue + elif size == 0: + # Save time by not looking up empty symbols (do they even exist?) + print('Empty symbol: ' + line) + else: + symbolizer.SymbolizeAsync(addr, addr) + continue + + progress.skip_count += 1 + except KeyboardInterrupt: + user_interrupted = True + print('Interrupting - killing subprocesses. Please wait.') + + try: + symbolizer.Join() + except KeyboardInterrupt: + # Don't want to abort here since we will be finished in a few seconds. + user_interrupted = True + print('Patience you must have my young padawan.') + + print '' + + if user_interrupted: + print('Skipping the rest of the file mapping. ' + 'Output will not be fully classified.') + + symbol_path_origin_dir = os.path.dirname(library) + # Skia specific: path prefix to strip. + symbol_path_prefix = symbol_path_origin_dir.replace(LIBSKIA_RELATIVE_PATH, '') + + with open(outfile, 'w') as out: + for line in nm_output_lines: + match = sNmPattern.match(line) + if match: + location = match.group(5) + if not location: + addr = int(match.group(1), 16) + symbol = address_symbol.get(addr) + if symbol is not None: + path = '??' + if symbol.source_path is not None: + path = symbol.source_path.replace(symbol_path_prefix, '') + line_number = 0 + if symbol.source_line is not None: + line_number = symbol.source_line + out.write('%s\t%s:%d\n' % (line, path, line_number)) + continue + + out.write('%s\n' % line) + + print('%d symbols in the results.' % len(address_symbol)) + + +def RunNm(binary, nm_binary): + cmd = [nm_binary, '-C', '--print-size', '--size-sort', '--reverse-sort', + binary] + nm_process = subprocess.Popen(cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + (process_output, err_output) = nm_process.communicate() + + if nm_process.returncode != 0: + if err_output: + raise Exception, err_output + else: + raise Exception, process_output + + return process_output + + +def GetNmSymbols(nm_infile, outfile, library, jobs, verbose, + addr2line_binary, nm_binary, disambiguate, src_path): + if nm_infile is None: + if outfile is None: + outfile = tempfile.NamedTemporaryFile(delete=False).name + + if verbose: + print 'Running parallel addr2line, dumping symbols to ' + outfile + RunElfSymbolizer(outfile, library, addr2line_binary, nm_binary, jobs, + disambiguate, src_path) + + nm_infile = outfile + + elif verbose: + print 'Using nm input from ' + nm_infile + with file(nm_infile, 'r') as infile: + return list(binary_size_utils.ParseNm(infile)) + + +PAK_RESOURCE_ID_TO_STRING = { "inited": False } + +def LoadPakIdsFromResourceFile(filename): + """Given a file name, it loads everything that looks like a resource id + into PAK_RESOURCE_ID_TO_STRING.""" + with open(filename) as resource_header: + for line in resource_header: + if line.startswith("#define "): + line_data = line.split() + if len(line_data) == 3: + try: + resource_number = int(line_data[2]) + resource_name = line_data[1] + PAK_RESOURCE_ID_TO_STRING[resource_number] = resource_name + except ValueError: + pass + +def GetReadablePakResourceName(pak_file, resource_id): + """Pak resources have a numeric identifier. It is not helpful when + trying to locate where footprint is generated. This does its best to + map the number to a usable string.""" + if not PAK_RESOURCE_ID_TO_STRING['inited']: + # Try to find resource header files generated by grit when + # building the pak file. We'll look for files named *resources.h" + # and lines of the type: + # #define MY_RESOURCE_JS 1234 + PAK_RESOURCE_ID_TO_STRING['inited'] = True + gen_dir = os.path.join(os.path.dirname(pak_file), 'gen') + if os.path.isdir(gen_dir): + for dirname, _dirs, files in os.walk(gen_dir): + for filename in files: + if filename.endswith('resources.h'): + LoadPakIdsFromResourceFile(os.path.join(dirname, filename)) + return PAK_RESOURCE_ID_TO_STRING.get(resource_id, + 'Pak Resource %d' % resource_id) + +def AddPakData(symbols, pak_file): + """Adds pseudo-symbols from a pak file.""" + pak_file = os.path.abspath(pak_file) + with open(pak_file, 'rb') as pak: + data = pak.read() + + PAK_FILE_VERSION = 4 + HEADER_LENGTH = 2 * 4 + 1 # Two uint32s. (file version, number of entries) + # and one uint8 (encoding of text resources) + INDEX_ENTRY_SIZE = 2 + 4 # Each entry is a uint16 and a uint32. + version, num_entries, _encoding = struct.unpack('<IIB', data[:HEADER_LENGTH]) + assert version == PAK_FILE_VERSION, ('Unsupported pak file ' + 'version (%d) in %s. Only ' + 'support version %d' % + (version, pak_file, PAK_FILE_VERSION)) + if num_entries > 0: + # Read the index and data. + data = data[HEADER_LENGTH:] + for _ in range(num_entries): + resource_id, offset = struct.unpack('<HI', data[:INDEX_ENTRY_SIZE]) + data = data[INDEX_ENTRY_SIZE:] + _next_id, next_offset = struct.unpack('<HI', data[:INDEX_ENTRY_SIZE]) + resource_size = next_offset - offset + + symbol_name = GetReadablePakResourceName(pak_file, resource_id) + symbol_path = pak_file + symbol_type = 'd' # Data. Approximation. + symbol_size = resource_size + symbols.append((symbol_name, symbol_type, symbol_size, symbol_path)) + +def _find_in_system_path(binary): + """Locate the full path to binary in the system path or return None + if not found.""" + system_path = os.environ["PATH"].split(os.pathsep) + for path in system_path: + binary_path = os.path.join(path, binary) + if os.path.isfile(binary_path): + return binary_path + return None + +def CheckDebugFormatSupport(library, addr2line_binary): + """Kills the program if debug data is in an unsupported format. + + There are two common versions of the DWARF debug formats and + since we are right now transitioning from DWARF2 to newer formats, + it's possible to have a mix of tools that are not compatible. Detect + that and abort rather than produce meaningless output.""" + tool_output = subprocess.check_output([addr2line_binary, '--version']) + version_re = re.compile(r'^GNU [^ ]+ .* (\d+).(\d+).*?$', re.M) + parsed_output = version_re.match(tool_output) + major = int(parsed_output.group(1)) + minor = int(parsed_output.group(2)) + supports_dwarf4 = major > 2 or major == 2 and minor > 22 + + if supports_dwarf4: + return + + print('Checking version of debug information in %s.' % library) + debug_info = subprocess.check_output(['readelf', '--debug-dump=info', + '--dwarf-depth=1', library]) + dwarf_version_re = re.compile(r'^\s+Version:\s+(\d+)$', re.M) + parsed_dwarf_format_output = dwarf_version_re.search(debug_info) + version = int(parsed_dwarf_format_output.group(1)) + if version > 2: + print('The supplied tools only support DWARF2 debug data but the binary\n' + + 'uses DWARF%d. Update the tools or compile the binary\n' % version + + 'with -gdwarf-2.') + sys.exit(1) + + +def main(): + usage = """%prog [options] + + Runs a spatial analysis on a given library, looking up the source locations + of its symbols and calculating how much space each directory, source file, + and so on is taking. The result is a report that can be used to pinpoint + sources of large portions of the binary, etceteras. + + Under normal circumstances, you only need to pass two arguments, thusly: + + %prog --library /path/to/library --destdir /path/to/output + + In this mode, the program will dump the symbols from the specified library + and map those symbols back to source locations, producing a web-based + report in the specified output directory. + + Other options are available via '--help'. + """ + parser = optparse.OptionParser(usage=usage) + parser.add_option('--nm-in', metavar='PATH', + help='if specified, use nm input from <path> instead of ' + 'generating it. Note that source locations should be ' + 'present in the file; i.e., no addr2line symbol lookups ' + 'will be performed when this option is specified. ' + 'Mutually exclusive with --library.') + parser.add_option('--destdir', metavar='PATH', + help='write output to the specified directory. An HTML ' + 'report is generated here along with supporting files; ' + 'any existing report will be overwritten. Not used in ' + 'Skia.') + parser.add_option('--library', metavar='PATH', + help='if specified, process symbols in the library at ' + 'the specified path. Mutually exclusive with --nm-in.') + parser.add_option('--pak', metavar='PATH', + help='if specified, includes the contents of the ' + 'specified *.pak file in the output.') + parser.add_option('--nm-binary', + help='use the specified nm binary to analyze library. ' + 'This is to be used when the nm in the path is not for ' + 'the right architecture or of the right version.') + parser.add_option('--addr2line-binary', + help='use the specified addr2line binary to analyze ' + 'library. This is to be used when the addr2line in ' + 'the path is not for the right architecture or ' + 'of the right version.') + parser.add_option('--jobs', type='int', + help='number of jobs to use for the parallel ' + 'addr2line processing pool; defaults to 1. More ' + 'jobs greatly improve throughput but eat RAM like ' + 'popcorn, and take several gigabytes each. Start low ' + 'and ramp this number up until your machine begins to ' + 'struggle with RAM. ' + 'This argument is only valid when using --library.') + parser.add_option('-v', dest='verbose', action='store_true', + help='be verbose, printing lots of status information.') + parser.add_option('--nm-out', metavar='PATH', + help='keep the nm output file, and store it at the ' + 'specified path. This is useful if you want to see the ' + 'fully processed nm output after the symbols have been ' + 'mapped to source locations. By default, a tempfile is ' + 'used and is deleted when the program terminates.' + 'This argument is only valid when using --library.') + parser.add_option('--legacy', action='store_true', + help='emit legacy binary size report instead of modern') + parser.add_option('--disable-disambiguation', action='store_true', + help='disables the disambiguation process altogether,' + ' NOTE: this may, depending on your toolchain, produce' + ' output with some symbols at the top layer if addr2line' + ' could not get the entire source path.') + parser.add_option('--source-path', default='./', + help='the path to the source code of the output binary, ' + 'default set to current directory. Used in the' + ' disambiguation process.') + parser.add_option('--githash', default='latest', + help='Git hash for the binary version. Added by Skia.') + parser.add_option('--commit_ts', type='int', default=-1, + help='Timestamp for the commit. Added by Skia.') + parser.add_option('--issue_number', default='', + help='The trybot issue number in string. Added by Skia.') + parser.add_option('--gsutil_path', default='gsutil', + help='Path to gsutil binary. Added by Skia.') + opts, _args = parser.parse_args() + + if ((not opts.library) and (not opts.nm_in)) or (opts.library and opts.nm_in): + parser.error('exactly one of --library or --nm-in is required') + if (opts.nm_in): + if opts.jobs: + print >> sys.stderr, ('WARNING: --jobs has no effect ' + 'when used with --nm-in') + if not opts.jobs: + # Use the number of processors but cap between 2 and 4 since raw + # CPU power isn't the limiting factor. It's I/O limited, memory + # bus limited and available-memory-limited. Too many processes and + # the computer will run out of memory and it will be slow. + opts.jobs = max(2, min(4, str(multiprocessing.cpu_count()))) + + if opts.addr2line_binary: + assert os.path.isfile(opts.addr2line_binary) + addr2line_binary = opts.addr2line_binary + else: + addr2line_binary = _find_in_system_path('addr2line') + assert addr2line_binary, 'Unable to find addr2line in the path. '\ + 'Use --addr2line-binary to specify location.' + + if opts.nm_binary: + assert os.path.isfile(opts.nm_binary) + nm_binary = opts.nm_binary + else: + nm_binary = _find_in_system_path('nm') + assert nm_binary, 'Unable to find nm in the path. Use --nm-binary '\ + 'to specify location.' + + if opts.pak: + assert os.path.isfile(opts.pak), 'Could not find ' % opts.pak + + print('addr2line: %s' % addr2line_binary) + print('nm: %s' % nm_binary) + + if opts.library: + CheckDebugFormatSupport(opts.library, addr2line_binary) + + symbols = GetNmSymbols(opts.nm_in, opts.nm_out, opts.library, + opts.jobs, opts.verbose is True, + addr2line_binary, nm_binary, + opts.disable_disambiguation is None, + opts.source_path) + + if opts.pak: + AddPakData(symbols, opts.pak) + + if opts.legacy: # legacy report + print 'Do Not set legacy flag.' + + else: # modern report + if opts.library: + symbol_path_origin_dir = os.path.dirname(os.path.abspath(opts.library)) + else: + # Just a guess. Hopefully all paths in the input file are absolute. + symbol_path_origin_dir = os.path.abspath(os.getcwd()) + DumpCompactTree(symbols, symbol_path_origin_dir, opts.githash, + opts.commit_ts, opts.issue_number, opts.gsutil_path) + print 'Report data uploaded to GS.' + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/infra/bots/recipe_modules/ct/__init__.py b/infra/bots/recipe_modules/ct/__init__.py new file mode 100644 index 0000000000..b1dfd6886a --- /dev/null +++ b/infra/bots/recipe_modules/ct/__init__.py @@ -0,0 +1,11 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/file', + 'build/gsutil', + 'recipe_engine/path', + 'recipe_engine/step', + 'run', +] diff --git a/infra/bots/recipe_modules/ct/api.py b/infra/bots/recipe_modules/ct/api.py new file mode 100644 index 0000000000..91478fb50e --- /dev/null +++ b/infra/bots/recipe_modules/ct/api.py @@ -0,0 +1,51 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +from recipe_engine import recipe_api + +import re + + +class CTApi(recipe_api.RecipeApi): + """Provides steps to run CT tasks.""" + + CT_GS_BUCKET = 'cluster-telemetry' + + def download_swarming_skps(self, page_type, slave_num, skps_chromium_build, + dest_dir, start_range, num_skps): + """Downloads SKPs corresponding to the specified page type, slave and build. + + The SKPs are stored in Google Storage in the following dirs in CT_GS_BUCKET: + /swarming/skps/${page_type}/${skps_chromium_build}/{start_range..end_num}/ + The SKPs are downloaded into subdirectories in the dest_dir. + + Args: + api: RecipeApi instance. + page_type: str. The CT page type. Eg: 1k, 10k. + slave_num: int. The number of the swarming bot. + skps_chromium_build: str. The build the SKPs were captured from. + dest_dir: path obj. The directory to download SKPs into. + start_range: int. The subdirectory number to start from. + num_skps: int. The total number of SKPs to download starting with + start_range. + """ + slave_dest_dir = dest_dir.join('slave%s' % slave_num ) + remote_dir = 'gs://%s/swarming/skps/%s/%s' % ( + self.CT_GS_BUCKET, page_type, skps_chromium_build) + + # Delete and recreate the local dir. + self.m.run.rmtree(slave_dest_dir) + self.m.file.makedirs(self.m.path.basename(slave_dest_dir), slave_dest_dir) + + # Populate the empty local dir. + gsutil_args = ['-m', 'cp'] + for i in range(start_range, start_range+num_skps): + gsutil_args.append('%s/%s/*.skp' % (str(remote_dir), i)) + gsutil_args.append(str(slave_dest_dir)) + try: + self.m.gsutil(gsutil_args, use_retry_wrapper=False) + except self.m.step.StepFailure: # pragma: nocover + # Some subdirectories might have no SKPs in them. + pass diff --git a/infra/bots/recipe_modules/flavor/__init__.py b/infra/bots/recipe_modules/flavor/__init__.py new file mode 100644 index 0000000000..b532b41f34 --- /dev/null +++ b/infra/bots/recipe_modules/flavor/__init__.py @@ -0,0 +1,17 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/adb', + 'build/file', + 'builder_name_schema', + 'recipe_engine/path', + 'recipe_engine/platform', + 'recipe_engine/properties', + 'recipe_engine/python', + 'recipe_engine/raw_io', + 'recipe_engine/step', + 'run', + 'vars', +] diff --git a/infra/bots/recipe_modules/flavor/api.py b/infra/bots/recipe_modules/flavor/api.py new file mode 100644 index 0000000000..1032f64207 --- /dev/null +++ b/infra/bots/recipe_modules/flavor/api.py @@ -0,0 +1,219 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# pylint: disable=W0201 + + +from recipe_engine import recipe_api + +from . import default_flavor +from . import gn_android_flavor +from . import gn_flavor +from . import ios_flavor +from . import pdfium_flavor +from . import valgrind_flavor + + +TEST_EXPECTED_SKP_VERSION = '42' +TEST_EXPECTED_SVG_VERSION = '42' +TEST_EXPECTED_SK_IMAGE_VERSION = '42' + +VERSION_FILE_SK_IMAGE = 'SK_IMAGE_VERSION' +VERSION_FILE_SKP = 'SKP_VERSION' +VERSION_FILE_SVG = 'SVG_VERSION' + +VERSION_NONE = -1 + +def is_android(builder_cfg): + return 'Android' in builder_cfg.get('extra_config', '') + + +def is_ios(builder_cfg): + return ('iOS' == builder_cfg.get('extra_config', '') or + builder_cfg.get('os') == 'iOS') + + +def is_pdfium(builder_cfg): + return 'PDFium' in builder_cfg.get('extra_config', '') + + +def is_valgrind(builder_cfg): + return 'Valgrind' in builder_cfg.get('extra_config', '') + + +class SkiaFlavorApi(recipe_api.RecipeApi): + def get_flavor(self, builder_cfg): + """Return a flavor utils object specific to the given builder.""" + if is_android(builder_cfg): + return gn_android_flavor.GNAndroidFlavorUtils(self.m) + elif is_ios(builder_cfg): + return ios_flavor.iOSFlavorUtils(self.m) + elif is_pdfium(builder_cfg): + return pdfium_flavor.PDFiumFlavorUtils(self.m) + elif is_valgrind(builder_cfg): + return valgrind_flavor.ValgrindFlavorUtils(self.m) + else: + return gn_flavor.GNFlavorUtils(self.m) + + def setup(self): + self._f = self.get_flavor(self.m.vars.builder_cfg) + + def step(self, name, cmd, **kwargs): + return self._f.step(name, cmd, **kwargs) + + def compile(self, target, **kwargs): + return self._f.compile(target, **kwargs) + + def copy_extra_build_products(self, swarming_out_dir): + return self._f.copy_extra_build_products(swarming_out_dir) + + @property + def out_dir(self): + return self._f.out_dir + + def device_path_join(self, *args): + return self._f.device_path_join(*args) + + def copy_directory_contents_to_device(self, host_dir, device_dir): + return self._f.copy_directory_contents_to_device(host_dir, device_dir) + + def copy_directory_contents_to_host(self, device_dir, host_dir): + return self._f.copy_directory_contents_to_host(device_dir, host_dir) + + def copy_file_to_device(self, host_path, device_path): + return self._f.copy_file_to_device(host_path, device_path) + + def create_clean_host_dir(self, path): + return self._f.create_clean_host_dir(path) + + def create_clean_device_dir(self, path): + return self._f.create_clean_device_dir(path) + + def read_file_on_device(self, path): + return self._f.read_file_on_device(path) + + def remove_file_on_device(self, path): + return self._f.remove_file_on_device(path) + + def install_everything(self): + self.install(skps=True, images=True, svgs=True, resources=True) + + def install(self, skps=False, images=False, svgs=False, resources=False): + self._f.install() + self.device_dirs = self._f.device_dirs + + # TODO(borenet): Only copy files which have changed. + if resources: + self.copy_directory_contents_to_device( + self.m.vars.resource_dir, + self.device_dirs.resource_dir) + + if skps: + self._copy_skps() + if images: + self._copy_images() + if svgs: + self._copy_svgs() + + def cleanup_steps(self): + return self._f.cleanup_steps() + + def _copy_dir(self, host_version, version_file, tmp_dir, + host_path, device_path, test_expected_version, + test_actual_version): + actual_version_file = self.m.path.join(tmp_dir, version_file) + # Copy to device. + device_version_file = self.device_path_join( + self.device_dirs.tmp_dir, version_file) + if str(actual_version_file) != str(device_version_file): + try: + device_version = self.read_file_on_device(device_version_file) + except self.m.step.StepFailure: + device_version = VERSION_NONE + if device_version != host_version: + self.remove_file_on_device(device_version_file) + self.create_clean_device_dir(device_path) + self.copy_directory_contents_to_device( + host_path, device_path) + + # Copy the new version file. + self.copy_file_to_device(actual_version_file, device_version_file) + + def _copy_images(self): + """Download and copy test images if needed.""" + version_file = self.m.vars.infrabots_dir.join( + 'assets', 'skimage', 'VERSION') + test_data = self.m.properties.get( + 'test_downloaded_sk_image_version', TEST_EXPECTED_SK_IMAGE_VERSION) + version = self.m.run.readfile( + version_file, + name='Get downloaded skimage VERSION', + test_data=test_data).rstrip() + self.m.run.writefile( + self.m.path.join(self.m.vars.tmp_dir, VERSION_FILE_SK_IMAGE), + version) + self._copy_dir( + version, + VERSION_FILE_SK_IMAGE, + self.m.vars.tmp_dir, + self.m.vars.images_dir, + self.device_dirs.images_dir, + test_expected_version=self.m.properties.get( + 'test_downloaded_sk_image_version', + TEST_EXPECTED_SK_IMAGE_VERSION), + test_actual_version=self.m.properties.get( + 'test_downloaded_sk_image_version', + TEST_EXPECTED_SK_IMAGE_VERSION)) + return version + + def _copy_skps(self): + """Download and copy the SKPs if needed.""" + version_file = self.m.vars.infrabots_dir.join( + 'assets', 'skp', 'VERSION') + test_data = self.m.properties.get( + 'test_downloaded_skp_version', TEST_EXPECTED_SKP_VERSION) + version = self.m.run.readfile( + version_file, + name='Get downloaded SKP VERSION', + test_data=test_data).rstrip() + self.m.run.writefile( + self.m.path.join(self.m.vars.tmp_dir, VERSION_FILE_SKP), + version) + self._copy_dir( + version, + VERSION_FILE_SKP, + self.m.vars.tmp_dir, + self.m.vars.local_skp_dir, + self.device_dirs.skp_dir, + test_expected_version=self.m.properties.get( + 'test_downloaded_skp_version', TEST_EXPECTED_SKP_VERSION), + test_actual_version=self.m.properties.get( + 'test_downloaded_skp_version', TEST_EXPECTED_SKP_VERSION)) + return version + + def _copy_svgs(self): + """Download and copy the SVGs if needed.""" + version_file = self.m.vars.infrabots_dir.join( + 'assets', 'svg', 'VERSION') + test_data = self.m.properties.get( + 'test_downloaded_svg_version', TEST_EXPECTED_SVG_VERSION) + version = self.m.run.readfile( + version_file, + name='Get downloaded SVG VERSION', + test_data=test_data).rstrip() + self.m.run.writefile( + self.m.path.join(self.m.vars.tmp_dir, VERSION_FILE_SVG), + version) + self._copy_dir( + version, + VERSION_FILE_SVG, + self.m.vars.tmp_dir, + self.m.vars.local_svg_dir, + self.device_dirs.svg_dir, + test_expected_version=self.m.properties.get( + 'test_downloaded_svg_version', TEST_EXPECTED_SVG_VERSION), + test_actual_version=self.m.properties.get( + 'test_downloaded_svg_version', TEST_EXPECTED_SVG_VERSION)) + return version diff --git a/infra/bots/recipe_modules/flavor/default_flavor.py b/infra/bots/recipe_modules/flavor/default_flavor.py new file mode 100644 index 0000000000..dacb0fd056 --- /dev/null +++ b/infra/bots/recipe_modules/flavor/default_flavor.py @@ -0,0 +1,152 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# pylint: disable=W0201 + + +"""Default flavor utils class, used for desktop builders.""" + + +import json + + +WIN_TOOLCHAIN_DIR = 't' + + +class DeviceDirs(object): + def __init__(self, + dm_dir, + perf_data_dir, + resource_dir, + images_dir, + skp_dir, + svg_dir, + tmp_dir): + self._dm_dir = dm_dir + self._perf_data_dir = perf_data_dir + self._resource_dir = resource_dir + self._images_dir = images_dir + self._skp_dir = skp_dir + self._svg_dir = svg_dir + self._tmp_dir = tmp_dir + + @property + def dm_dir(self): + """Where DM writes.""" + return self._dm_dir + + @property + def perf_data_dir(self): + return self._perf_data_dir + + @property + def resource_dir(self): + return self._resource_dir + + @property + def images_dir(self): + return self._images_dir + + @property + def skp_dir(self): + """Holds SKP files that are consumed by RenderSKPs and BenchPictures.""" + return self._skp_dir + + @property + def svg_dir(self): + return self._svg_dir + + @property + def tmp_dir(self): + return self._tmp_dir + + +class DefaultFlavorUtils(object): + """Utilities to be used by build steps. + + The methods in this class define how certain high-level functions should + work. Each build step flavor should correspond to a subclass of + DefaultFlavorUtils which may override any of these functions as appropriate + for that flavor. + + For example, the AndroidFlavorUtils will override the functions for + 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 + 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( + 'assets', 'win_toolchain', 'VERSION') + if not self.m.path.exists(win_toolchain_asset_path): + self._win_toolchain_dir = self.m.vars.slave_dir + + def copy_extra_build_products(self, swarming_out_dir): + pass + + @property + def out_dir(self): + """Flavor-specific out directory.""" + return self.m.vars.skia_out.join(self.m.vars.configuration) + + def device_path_join(self, *args): + """Like os.path.join(), but for paths on a connected device.""" + return self.m.path.join(*args) + + def copy_directory_contents_to_device(self, host_dir, device_dir): + """Like shutil.copytree(), but for copying to a connected device.""" + # For "normal" builders who don't have an attached device, we expect + # host_dir and device_dir to be the same. + if str(host_dir) != str(device_dir): + raise ValueError('For builders who do not have attached devices, copying ' + 'from host to device is undefined and only allowed if ' + 'host_path and device_path are the same (%s vs %s).' % ( + str(host_dir), str(device_dir))) # pragma: no cover + + def copy_directory_contents_to_host(self, device_dir, host_dir): + """Like shutil.copytree(), but for copying from a connected device.""" + # For "normal" builders who don't have an attached device, we expect + # host_dir and device_dir to be the same. + if str(host_dir) != str(device_dir): + raise ValueError('For builders who do not have attached devices, copying ' + 'from device to host is undefined and only allowed if ' + 'host_path and device_path are the same (%s vs %s).' % ( + str(host_dir), str(device_dir))) # pragma: no cover + + def copy_file_to_device(self, host_path, device_path): + """Like shutil.copyfile, but for copying to a connected device.""" + # For "normal" builders who don't have an attached device, we expect + # host_dir and device_dir to be the same. + if str(host_path) != str(device_path): # pragma: no cover + raise ValueError('For builders who do not have attached devices, copying ' + 'from host to device is undefined and only allowed if ' + 'host_path and device_path are the same (%s vs %s).' % ( + str(host_path), str(device_path))) + + def create_clean_device_dir(self, path): + """Like shutil.rmtree() + os.makedirs(), but on a connected device.""" + self.create_clean_host_dir(path) + + def create_clean_host_dir(self, path): + """Convenience function for creating a clean directory.""" + self.m.run.rmtree(path) + self.m.file.makedirs( + self.m.path.basename(path), path, infra_step=True) + + def install(self): + """Run device-specific installation steps.""" + self.device_dirs = DeviceDirs( + dm_dir=self.m.vars.dm_dir, + perf_data_dir=self.m.vars.perf_data_dir, + resource_dir=self.m.vars.resource_dir, + images_dir=self.m.vars.images_dir, + skp_dir=self.m.vars.local_skp_dir, + svg_dir=self.m.vars.local_svg_dir, + tmp_dir=self.m.vars.tmp_dir) + + def cleanup_steps(self): + """Run any device-specific cleanup steps.""" + pass diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py new file mode 100644 index 0000000000..bf1510b143 --- /dev/null +++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py @@ -0,0 +1,179 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import default_flavor +import subprocess + + +"""GN Android flavor utils, used for building Skia for Android with GN.""" +class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): + def __init__(self, m): + super(GNAndroidFlavorUtils, self).__init__(m) + self._ever_ran_adb = False + + self.device_dirs = default_flavor.DeviceDirs( + dm_dir = self.m.vars.android_data_dir + 'dm_out', + perf_data_dir = self.m.vars.android_data_dir + 'perf', + resource_dir = self.m.vars.android_data_dir + 'resources', + images_dir = self.m.vars.android_data_dir + 'images', + skp_dir = self.m.vars.android_data_dir + 'skps', + svg_dir = self.m.vars.android_data_dir + 'svgs', + tmp_dir = self.m.vars.android_data_dir) + + def _strip_environment(self): + self.m.vars.default_env = {k: v for (k,v) + in self.m.vars.default_env.iteritems() + if k in ['PATH']} + + def _run(self, title, *cmd, **kwargs): + self._strip_environment() + return self.m.run(self.m.step, title, cmd=list(cmd), + cwd=self.m.vars.skia_dir, **kwargs) + + def _py(self, title, script, infra_step=True): + self._strip_environment() + return self.m.run(self.m.python, title, script=script, + cwd=self.m.vars.skia_dir, env=None, infra_step=infra_step) + + def _adb(self, title, *cmd, **kwargs): + self._ever_ran_adb = True + # The only non-infra adb steps (dm / nanobench) happen to not use _adb(). + if 'infra_step' not in kwargs: + kwargs['infra_step'] = True + return self._run(title, 'adb', *cmd, **kwargs) + + def compile(self, unused_target, **kwargs): + compiler = self.m.vars.builder_cfg.get('compiler') + configuration = self.m.vars.builder_cfg.get('configuration') + extra_config = self.m.vars.builder_cfg.get('extra_config', '') + os = self.m.vars.builder_cfg.get('os') + target_arch = self.m.vars.builder_cfg.get('target_arch') + + assert compiler == 'Clang' # At this rate we might not ever support GCC. + + extra_cflags = [] + if configuration == 'Debug': + extra_cflags.append('-O1') + + ndk_asset = 'android_ndk_linux' + if 'Mac' in os: + ndk_asset = 'android_ndk_darwin' + elif 'Win' in os: + ndk_asset = 'n' + + quote = lambda x: '"%s"' % x + args = { + 'ndk': quote(self.m.vars.slave_dir.join(ndk_asset)), + 'target_cpu': quote(target_arch), + } + + if configuration != 'Debug': + args['is_debug'] = 'false' + if 'Vulkan' in extra_config: + args['ndk_api'] = 24 + args['skia_enable_vulkan_debug_layers'] = 'false' + if 'FrameworkDefs' in extra_config: + args['skia_enable_android_framework_defines'] = 'true' + if extra_cflags: + args['extra_cflags'] = repr(extra_cflags).replace("'", '"') + + gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems())) + + gn = 'gn.exe' if 'Win' in os else 'gn' + ninja = 'ninja.exe' if 'Win' in os else 'ninja' + gn = self.m.vars.skia_dir.join('bin', gn) + + self._py('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn')) + self._run('gn gen', gn, 'gen', self.out_dir, '--args=' + gn_args) + self._run('ninja', ninja, '-C', self.out_dir) + + def install(self): + self._adb('mkdir ' + self.device_dirs.resource_dir, + 'shell', 'mkdir', '-p', self.device_dirs.resource_dir) + + def cleanup_steps(self): + if self._ever_ran_adb: + self.m.python.inline('dump log', """ + import os + import subprocess + import sys + out = sys.argv[1] + log = subprocess.check_output(['adb', 'logcat', '-d']) + for line in log.split('\\n'): + tokens = line.split() + if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc': + addr, path = tokens[-2:] + local = os.path.join(out, os.path.basename(path)) + if os.path.exists(local): + sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr]) + line = line.replace(addr, addr + ' ' + sym.strip()) + print line + """, + args=[self.m.vars.skia_out.join(self.m.vars.configuration)], + infra_step=True) + self._adb('kill adb server', 'kill-server') + + def step(self, name, cmd, env=None, **kwargs): + app = self.m.vars.skia_out.join(self.m.vars.configuration, cmd[0]) + self._adb('push %s' % cmd[0], + 'push', app, self.m.vars.android_bin_dir) + + sh = '%s.sh' % cmd[0] + self.m.run.writefile(self.m.vars.tmp_dir.join(sh), + 'set -x; %s%s; echo $? >%src' % + (self.m.vars.android_bin_dir, subprocess.list2cmdline(map(str, cmd)), + self.m.vars.android_bin_dir)) + self._adb('push %s' % sh, + 'push', self.m.vars.tmp_dir.join(sh), self.m.vars.android_bin_dir) + + self._adb('clear log', 'logcat', '-c') + self.m.python.inline('%s' % cmd[0], """ + import subprocess + import sys + bin_dir = sys.argv[1] + sh = sys.argv[2] + subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh]) + try: + sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat', + bin_dir + 'rc']))) + except ValueError: + print "Couldn't read the return code. Probably killed for OOM." + sys.exit(1) + """, args=[self.m.vars.android_bin_dir, sh]) + + def copy_file_to_device(self, host, device): + self._adb('push %s %s' % (host, device), 'push', host, device) + + def copy_directory_contents_to_device(self, host, device): + # Copy the tree, avoiding hidden directories and resolving symlinks. + self.m.python.inline('push %s/* %s' % (host, device), """ + import os + import subprocess + import sys + host = sys.argv[1] + device = sys.argv[2] + for d, _, fs in os.walk(host): + p = os.path.relpath(d, host) + if p != '.' and p.startswith('.'): + continue + for f in fs: + print os.path.join(p,f) + subprocess.check_call(['adb', 'push', + os.path.realpath(os.path.join(host, p, f)), + os.path.join(device, p, f)]) + """, args=[host, device], cwd=self.m.vars.skia_dir, infra_step=True) + + def copy_directory_contents_to_host(self, device, host): + self._adb('pull %s %s' % (device, host), 'pull', device, host) + + def read_file_on_device(self, path): + return self._adb('read %s' % path, + 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout + + def remove_file_on_device(self, path): + self._adb('rm %s' % path, 'shell', 'rm', '-f', path) + + def create_clean_device_dir(self, path): + self._adb('rm %s' % path, 'shell', 'rm', '-rf', path) + self._adb('mkdir %s' % path, 'shell', 'mkdir', '-p', path) diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py new file mode 100644 index 0000000000..f68e3b231f --- /dev/null +++ b/infra/bots/recipe_modules/flavor/gn_flavor.py @@ -0,0 +1,154 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import default_flavor + +"""GN flavor utils, used for building Skia with GN.""" +class GNFlavorUtils(default_flavor.DefaultFlavorUtils): + def _strip_environment(self): + self.m.vars.default_env = {k: v for (k,v) + in self.m.vars.default_env.iteritems() + if k in ['PATH']} + + def _run(self, title, cmd, env=None, infra_step=False): + self._strip_environment() + self.m.run(self.m.step, title, cmd=cmd, + env=env, cwd=self.m.vars.skia_dir, infra_step=infra_step) + + def _py(self, title, script, env=None, infra_step=True): + self._strip_environment() + self.m.run(self.m.python, title, script=script, + env=env, cwd=self.m.vars.skia_dir, infra_step=infra_step) + + def build_command_buffer(self): + self.m.run(self.m.python, 'build command_buffer', + script=self.m.vars.skia_dir.join('tools', 'build_command_buffer.py'), + args=[ + '--chrome-dir', self.m.vars.checkout_root, + '--output-dir', self.m.vars.skia_out.join(self.m.vars.configuration), + '--no-sync', '--make-output-dir']) + + def compile(self, unused_target, **kwargs): + """Build Skia with GN.""" + compiler = self.m.vars.builder_cfg.get('compiler', '') + configuration = self.m.vars.builder_cfg.get('configuration', '') + extra_config = self.m.vars.builder_cfg.get('extra_config', '') + os = self.m.vars.builder_cfg.get('os', '') + target_arch = self.m.vars.builder_cfg.get('target_arch', '') + + clang_linux = str(self.m.vars.slave_dir.join('clang_linux')) + linux_vulkan_sdk = str(self.m.vars.slave_dir.join('linux_vulkan_sdk')) + win_toolchain = str(self.m.vars.slave_dir.join( + 't', 'depot_tools', 'win_toolchain', 'vs_files', + 'd3cb0e37bdd120ad0ac4650b674b09e81be45616')) + win_vulkan_sdk = str(self.m.vars.slave_dir.join('win_vulkan_sdk')) + + cc, cxx = None, None + extra_cflags = [] + extra_ldflags = [] + + if compiler == 'Clang' and os == 'Ubuntu': + cc = clang_linux + '/bin/clang' + cxx = clang_linux + '/bin/clang++' + extra_ldflags.append('-fuse-ld=lld') + elif compiler == 'Clang': + cc, cxx = 'clang', 'clang++' + elif compiler == 'GCC': + cc, cxx = 'gcc', 'g++' + + if compiler != 'MSVC' and configuration == 'Debug': + extra_cflags.append('-O1') + + if extra_config == 'Exceptions': + extra_cflags.append('/EHsc') + if extra_config == 'Fast': + extra_cflags.extend(['-march=native', '-fomit-frame-pointer', '-O3', + '-ffp-contract=off']) + if extra_config.startswith('SK'): + extra_cflags.append('-D' + extra_config) + if extra_config == 'MSAN': + extra_ldflags.append('-L' + clang_linux + '/msan') + + args = {} + + if configuration != 'Debug': + args['is_debug'] = 'false' + if extra_config == 'ANGLE': + args['skia_use_angle'] = 'true' + if extra_config == 'CommandBuffer': + self.m.run.run_once(self.build_command_buffer) + if extra_config == 'GDI': + args['skia_use_gdi'] = 'true' + if extra_config == 'MSAN': + args['skia_use_fontconfig'] = 'false' + if extra_config == 'Mesa': + args['skia_use_mesa'] = 'true' + if extra_config == 'NoGPU': + args['skia_enable_gpu'] = 'false' + if extra_config == 'Vulkan': + if os == 'Ubuntu': + args['skia_vulkan_sdk'] = '"%s"' % linux_vulkan_sdk + if 'Win' in os: + args['skia_vulkan_sdk'] = '"%s"' % win_vulkan_sdk + + for (k,v) in { + 'cc': cc, + 'cxx': cxx, + 'sanitize': extra_config if 'SAN' in extra_config else '', + 'target_cpu': target_arch, + 'target_os': 'ios' if 'iOS' in extra_config else '', + 'windk': win_toolchain if 'Win' in os else '', + }.iteritems(): + if v: + args[k] = '"%s"' % v + if extra_cflags: + args['extra_cflags'] = repr(extra_cflags).replace("'", '"') + if extra_ldflags: + args['extra_ldflags'] = repr(extra_ldflags).replace("'", '"') + + gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems())) + + gn = 'gn.exe' if 'Win' in os else 'gn' + ninja = 'ninja.exe' if 'Win' in os else 'ninja' + gn = self.m.vars.skia_dir.join('bin', gn) + + self._py('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn')) + self._run('gn gen', [gn, 'gen', self.out_dir, '--args=' + gn_args]) + self._run('ninja', [ninja, '-C', self.out_dir]) + + def copy_extra_build_products(self, swarming_out_dir): + configuration = self.m.vars.builder_cfg.get('configuration', '') + extra_config = self.m.vars.builder_cfg.get('extra_config', '') + os = self.m.vars.builder_cfg.get('os', '') + + win_vulkan_sdk = str(self.m.vars.slave_dir.join('win_vulkan_sdk')) + if 'Win' in os and extra_config == 'Vulkan': + self.m.run.copy_build_products( + win_vulkan_sdk, + swarming_out_dir.join('out', configuration + '_x64')) + + def step(self, name, cmd, env=None, **kwargs): + app = self.m.vars.skia_out.join(self.m.vars.configuration, cmd[0]) + cmd = [app] + cmd[1:] + env = {} + + clang_linux = str(self.m.vars.slave_dir.join('clang_linux')) + extra_config = self.m.vars.builder_cfg.get('extra_config', '') + + if 'SAN' in extra_config: + # Sanitized binaries may want to run clang_linux/bin/llvm-symbolizer. + self.m.vars.default_env['PATH'] = '%%(PATH)s:%s' % clang_linux + '/bin' + elif 'Ubuntu' == self.m.vars.builder_cfg.get('os', ''): + cmd = ['catchsegv'] + cmd + + if 'ASAN' == extra_config: + env[ 'ASAN_OPTIONS'] = 'symbolize=1 detect_leaks=1' + env[ 'LSAN_OPTIONS'] = 'symbolize=1 print_suppressions=1' + env['UBSAN_OPTIONS'] = 'symbolize=1 print_stacktrace=1' + + if 'MSAN' == extra_config: + # Find the MSAN-built libc++. + env['LD_LIBRARY_PATH'] = clang_linux + '/msan' + + self._run(name, cmd, env=env) diff --git a/infra/bots/recipe_modules/flavor/ios_flavor.py b/infra/bots/recipe_modules/flavor/ios_flavor.py new file mode 100644 index 0000000000..5d33d1c4df --- /dev/null +++ b/infra/bots/recipe_modules/flavor/ios_flavor.py @@ -0,0 +1,168 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# pylint: disable=W0201 + + +import copy +import default_flavor + + +"""iOS flavor utils, used for building for and running tests on iOS.""" + + +class iOSFlavorUtils(default_flavor.DefaultFlavorUtils): + def __init__(self, m): + super(iOSFlavorUtils, self).__init__(m) + self.default_env = {} + self.default_env['XCODEBUILD'] = ( + self.m.vars.slave_dir.join('xcodebuild')) + self.ios_bin = self.m.vars.skia_dir.join( + 'platform_tools', 'ios', 'bin') + + def step(self, name, cmd, **kwargs): + args = [self.ios_bin.join('ios_run_skia')] + env = {} + env.update(kwargs.pop('env', {})) + env.update(self.default_env) + # Convert 'dm' and 'nanobench' from positional arguments + # to flags, which is what iOSShell expects to select which + # one is being run. + cmd = ["--" + c if c in ['dm', 'nanobench'] else c + for c in cmd] + return self.m.run(self.m.step, name=name, cmd=args + cmd, + env=env, **kwargs) + + def compile(self, target, **kwargs): + """Build the given target.""" + cmd = [self.ios_bin.join('ios_ninja')] + self.m.run(self.m.step, 'build iOSShell', cmd=cmd, + cwd=self.m.path['checkout'], **kwargs) + + def device_path_join(self, *args): + """Like os.path.join(), but for paths on a connected iOS device.""" + return '/'.join(args) + + def _remove_device_dir(self, path): + """Remove the directory on the device.""" + return self.m.run( + self.m.step, + 'rmdir %s' % path, + cmd=[self.ios_bin.join('ios_rm'), path], + env=self.default_env, + infra_step=True, + ) + + def _create_device_dir(self, path): + """Create the directory on the device.""" + return self.m.run( + self.m.step, + 'mkdir %s' % path, + cmd=[self.ios_bin.join('ios_mkdir'), path], + env=self.default_env, + infra_step=True, + ) + + def copy_directory_contents_to_device(self, host_dir, device_dir): + """Like shutil.copytree(), but for copying to a connected device.""" + return self.m.run( + self.m.step, + name='push %s to %s' % (self.m.path.basename(host_dir), + self.m.path.basename(device_dir)), + cmd=[self.ios_bin.join('ios_push_if_needed'), + host_dir, device_dir], + env=self.default_env, + infra_step=True, + ) + + def copy_directory_contents_to_host(self, device_dir, host_dir): + """Like shutil.copytree(), but for copying from a connected device.""" + self.m.run( + self.m.step, + name='pull %s' % self.m.path.basename(device_dir), + cmd=[self.ios_bin.join('ios_pull_if_needed'), + device_dir, host_dir], + env=self.default_env, + infra_step=True, + ) + + def copy_file_to_device(self, host_path, device_path): + """Like shutil.copyfile, but for copying to a connected device.""" + self.m.run( + self.m.step, + name='push %s' % host_path, + cmd=[self.ios_bin.join('ios_push_file'), host_path, device_path], + env=self.default_env, + infra_step=True, + ) + + def copy_extra_build_products(self, swarming_out_dir): + xcode_dir = self.m.path.join( + 'xcodebuild', '%s-iphoneos' % self.m.vars.configuration) + self.m.run.copy_build_products( + self.m.vars.skia_dir.join(xcode_dir), + swarming_out_dir.join(xcode_dir)) + + def create_clean_device_dir(self, path): + """Like shutil.rmtree() + os.makedirs(), but on a connected device.""" + self._remove_device_dir(path) + self._create_device_dir(path) + + def install(self): + """Run device-specific installation steps.""" + prefix = self.device_path_join('skiabot', 'skia_') + self.device_dirs = default_flavor.DeviceDirs( + dm_dir=prefix + 'dm', + perf_data_dir=prefix + 'perf', + resource_dir=prefix + 'resources', + images_dir=prefix + 'images', + skp_dir=prefix + 'skp/skps', + svg_dir=prefix + 'svg/svgs', + tmp_dir=prefix + 'tmp_dir') + + self.m.run( + self.m.step, + name='install iOSShell', + cmd=[self.ios_bin.join('ios_install')], + env=self.default_env, + infra_step=True) + + def cleanup_steps(self): + """Run any device-specific cleanup steps.""" + if self.m.vars.role in (self.m.builder_name_schema.BUILDER_ROLE_TEST, + self.m.builder_name_schema.BUILDER_ROLE_PERF): + self.m.run( + self.m.step, + name='reboot', + cmd=[self.ios_bin.join('ios_restart')], + env=self.default_env, + infra_step=True) + self.m.run( + self.m.step, + name='wait for reboot', + cmd=['sleep', '20'], + env=self.default_env, + infra_step=True) + + def read_file_on_device(self, path): + """Read the given file.""" + ret = self.m.run( + self.m.step, + name='read %s' % self.m.path.basename(path), + cmd=[self.ios_bin.join('ios_cat_file'), path], + env=self.default_env, + stdout=self.m.raw_io.output(), + infra_step=True) + return ret.stdout.rstrip() if ret.stdout else ret.stdout + + def remove_file_on_device(self, path): + """Remove the file on the device.""" + return self.m.run( + self.m.step, + 'rm %s' % path, + cmd=[self.ios_bin.join('ios_rm'), path], + env=self.default_env, + infra_step=True, + ) diff --git a/infra/bots/recipe_modules/flavor/pdfium_flavor.py b/infra/bots/recipe_modules/flavor/pdfium_flavor.py new file mode 100644 index 0000000000..3482560841 --- /dev/null +++ b/infra/bots/recipe_modules/flavor/pdfium_flavor.py @@ -0,0 +1,64 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import re + +import default_flavor + + +"""PDFium flavor utils, used for building PDFium with Skia.""" + + +class PDFiumFlavorUtils(default_flavor.DefaultFlavorUtils): + + def compile(self, target, **kwargs): + """Build PDFium with Skia.""" + pdfium_dir = self.m.vars.checkout_root.join('pdfium') + + # Runhook to generate the gn binary in buildtools. + self.m.run( + self.m.step, + 'runhook', + cmd=['gclient', 'runhook', 'gn_linux64'], + cwd=pdfium_dir, + **kwargs) + + # Install the sysroot. + self.m.run( + self.m.step, + 'sysroot', + cmd=['python', 'build/linux/sysroot_scripts/install-sysroot.py', + '--arch=amd64'], + cwd=pdfium_dir) + + # Setup gn args. + gn_args = [ + 'pdf_is_standalone=true', + 'clang_use_chrome_plugins=false', + 'is_component_build=false', + 'is_debug=false', + ] + if 'SkiaPaths' in self.m.vars.builder_name: + gn_args.append('pdf_use_skia_paths=true') + else: + gn_args.append('pdf_use_skia=true') + + + env = kwargs.pop('env', {}) + env['CHROMIUM_BUILDTOOLS_PATH'] = str(pdfium_dir.join('buildtools')) + self.m.run( + self.m.step, + 'gn_gen', + cmd=['gn', 'gen', 'out/skia', '--args=%s' % ' '.join(gn_args)], + cwd=pdfium_dir, + env=env) + + # Build PDFium. + self.m.run( + self.m.step, + 'build_pdfium', + cmd=['ninja', '-C', 'out/skia', '-j100'], + cwd=pdfium_dir, + env=env, + **kwargs) diff --git a/infra/bots/recipe_modules/flavor/valgrind_flavor.py b/infra/bots/recipe_modules/flavor/valgrind_flavor.py new file mode 100644 index 0000000000..0ebc161118 --- /dev/null +++ b/infra/bots/recipe_modules/flavor/valgrind_flavor.py @@ -0,0 +1,27 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +import gn_flavor + + +"""Utils for running under Valgrind.""" + + +class ValgrindFlavorUtils(gn_flavor.GNFlavorUtils): + def __init__(self, m): + super(ValgrindFlavorUtils, self).__init__(m) + self._suppressions_file = self.m.vars.skia_dir.join( + 'tools', 'valgrind.supp') + + def step(self, name, cmd, **kwargs): + new_cmd = ['valgrind', '--gen-suppressions=all', '--leak-check=full', + '--track-origins=yes', '--error-exitcode=1', '--num-callers=40', + '--suppressions=%s' % self._suppressions_file] + path_to_app = self.out_dir.join(cmd[0]) + new_cmd.append(path_to_app) + new_cmd.extend(cmd[1:]) + return self.m.run(self.m.step, name, cmd=new_cmd, + **kwargs) + diff --git a/infra/bots/recipe_modules/infra/__init__.py b/infra/bots/recipe_modules/infra/__init__.py new file mode 100644 index 0000000000..ba20b52f95 --- /dev/null +++ b/infra/bots/recipe_modules/infra/__init__.py @@ -0,0 +1,9 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'recipe_engine/step', + 'run', + 'vars', +] diff --git a/infra/bots/recipe_modules/infra/api.py b/infra/bots/recipe_modules/infra/api.py new file mode 100644 index 0000000000..7a4d7b21ac --- /dev/null +++ b/infra/bots/recipe_modules/infra/api.py @@ -0,0 +1,32 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +from recipe_engine import recipe_api + + +INFRA_GO_PKG = 'go.skia.org/infra' +UPDATE_GO_ATTEMPTS = 5 + + +class InfraApi(recipe_api.RecipeApi): + @property + def go_env(self): + return {'GOPATH': self.gopath} + + @property + def gopath(self): + return self.m.vars.checkout_root.join('gopath') + + def update_go_deps(self): + """Attempt to update go dependencies. + + This fails flakily sometimes, so perform multiple attempts. + """ + self.m.run.with_retry( + self.m.step, + 'update go pkgs', + UPDATE_GO_ATTEMPTS, + cmd=['go', 'get', '-u', '-t', '%s/...' % INFRA_GO_PKG], + env=self.go_env) diff --git a/infra/bots/recipe_modules/infra/example.expected/failed_all_updates.json b/infra/bots/recipe_modules/infra/example.expected/failed_all_updates.json new file mode 100644 index 0000000000..dae9cc3cf3 --- /dev/null +++ b/infra/bots/recipe_modules/infra/example.expected/failed_all_updates.json @@ -0,0 +1,169 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "go", + "get", + "-u", + "-t", + "go.skia.org/infra/..." + ], + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "update go pkgs", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "go", + "get", + "-u", + "-t", + "go.skia.org/infra/..." + ], + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "update go pkgs (attempt 2)", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "go", + "get", + "-u", + "-t", + "go.skia.org/infra/..." + ], + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "update go pkgs (attempt 3)", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "go", + "get", + "-u", + "-t", + "go.skia.org/infra/..." + ], + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "update go pkgs (attempt 4)", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "go", + "get", + "-u", + "-t", + "go.skia.org/infra/..." + ], + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "update go pkgs (attempt 5)", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "name": "$result", + "reason": "Step('update go pkgs (attempt 5)') failed with return_code 1", + "recipe_result": null, + "status_code": 1 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/infra/example.expected/failed_one_update.json b/infra/bots/recipe_modules/infra/example.expected/failed_one_update.json new file mode 100644 index 0000000000..bb21f4f523 --- /dev/null +++ b/infra/bots/recipe_modules/infra/example.expected/failed_one_update.json @@ -0,0 +1,124 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "go", + "get", + "-u", + "-t", + "go.skia.org/infra/..." + ], + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "update go pkgs", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "go", + "get", + "-u", + "-t", + "go.skia.org/infra/..." + ], + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "update go pkgs (attempt 2)" + }, + { + "cmd": [ + "python", + "[CUSTOM_/_B_WORK]/skia/infra/bots/infra_tests.py" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "infra_tests" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/infra/example.expected/infra_tests.json b/infra/bots/recipe_modules/infra/example.expected/infra_tests.json new file mode 100644 index 0000000000..b2416faea3 --- /dev/null +++ b/infra/bots/recipe_modules/infra/example.expected/infra_tests.json @@ -0,0 +1,107 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_/_B_WORK]", + "511" + ], + "name": "makedirs checkout_path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec", + "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", + "--patch_root", + "skia", + "--revision_mapping_file", + "{\"skia\": \"got_revision\"}", + "--git-cache-dir", + "[CUSTOM_/_B_CACHE]", + "--output_json", + "/path/to/tmp/json", + "--revision", + "skia@abc123", + "--output_manifest" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "bot_update", + "~followup_annotations": [ + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" + ] + }, + { + "cmd": [ + "go", + "get", + "-u", + "-t", + "go.skia.org/infra/..." + ], + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "update go pkgs" + }, + { + "cmd": [ + "python", + "[CUSTOM_/_B_WORK]/skia/infra/bots/infra_tests.py" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "GOPATH": "[CUSTOM_/_B_WORK]/gopath" + }, + "name": "infra_tests" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/infra/example.py b/infra/bots/recipe_modules/infra/example.py new file mode 100644 index 0000000000..2c9134b530 --- /dev/null +++ b/infra/bots/recipe_modules/infra/example.py @@ -0,0 +1,75 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Recipe which runs the Skia infra tests. + + +DEPS = [ + 'core', + 'infra', + 'recipe_engine/path', + 'recipe_engine/properties', + 'recipe_engine/step', + 'run', + 'vars', +] + + +def RunSteps(api): + api.vars.setup() + api.core.checkout_steps() + api.infra.update_go_deps() + + # Run the infra tests. + infra_tests = api.vars.skia_dir.join( + 'infra', 'bots', 'infra_tests.py') + api.step('infra_tests', + cmd=['python', infra_tests], + cwd=api.vars.skia_dir, + env=api.infra.go_env) + + +def GenTests(api): + yield ( + api.test('infra_tests') + + api.properties(buildername='Housekeeper-PerCommit-InfraTests', + mastername='client.skia.fyi', + slavename='dummy-slave', + buildnumber=5, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + ) + + yield ( + api.test('failed_one_update') + + api.properties(buildername='Housekeeper-PerCommit-InfraTests', + mastername='client.skia.fyi', + slavename='dummy-slave', + buildnumber=5, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.step_data('update go pkgs', retcode=1) + ) + + yield ( + api.test('failed_all_updates') + + api.properties(buildername='Housekeeper-PerCommit-InfraTests', + mastername='client.skia.fyi', + slavename='dummy-slave', + buildnumber=5, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.step_data('update go pkgs', retcode=1) + + api.step_data('update go pkgs (attempt 2)', retcode=1) + + api.step_data('update go pkgs (attempt 3)', retcode=1) + + api.step_data('update go pkgs (attempt 4)', retcode=1) + + api.step_data('update go pkgs (attempt 5)', retcode=1) + ) diff --git a/infra/bots/recipe_modules/perf/__init__.py b/infra/bots/recipe_modules/perf/__init__.py new file mode 100644 index 0000000000..10649df617 --- /dev/null +++ b/infra/bots/recipe_modules/perf/__init__.py @@ -0,0 +1,17 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/file', + 'core', + 'recipe_engine/json', + 'recipe_engine/path', + 'recipe_engine/platform', + 'recipe_engine/properties', + 'recipe_engine/raw_io', + 'recipe_engine/time', + 'run', + 'flavor', + 'vars', +] diff --git a/infra/bots/recipe_modules/perf/api.py b/infra/bots/recipe_modules/perf/api.py new file mode 100644 index 0000000000..7edd492601 --- /dev/null +++ b/infra/bots/recipe_modules/perf/api.py @@ -0,0 +1,221 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Recipe module for Skia Swarming perf. + + +import calendar + +from recipe_engine import recipe_api + + +def nanobench_flags(bot): + args = ['--pre_log'] + + if 'GPU' in bot: + args.append('--images') + args.extend(['--gpuStatsDump', 'true']) + + if 'Android' in bot and 'GPU' in bot: + args.extend(['--useThermalManager', '1,1,10,1000']) + + args.extend(['--scales', '1.0', '1.1']) + + if 'iOS' in bot: + args.extend(['--skps', 'ignore_skps']) + + config = ['8888', 'gpu', 'nonrendering', 'hwui' ] + if 'AndroidOne' not in bot: + config += [ 'f16', 'srgb' ] + if '-GCE-' in bot: + config += [ '565' ] + # The NP produces a long error stream when we run with MSAA. + if 'NexusPlayer' not in bot: + if 'Android' in bot: + # The NVIDIA_Shield has a regular OpenGL implementation. We bench that + # instead of ES. + if 'NVIDIA_Shield' in bot: + config.remove('gpu') + config.extend(['gl', 'glmsaa4', 'glnvpr4', 'glnvprdit4']) + else: + config.extend(['msaa4', 'nvpr4', 'nvprdit4']) + else: + config.extend(['msaa16', 'nvpr16', 'nvprdit16']) + + # Bench instanced rendering on a limited number of platforms + if 'Nexus6' in bot: + config.append('esinst') # esinst4 isn't working yet on Adreno. + elif 'PixelC' in bot: + config.extend(['esinst', 'esinst4']) + elif 'NVIDIA_Shield' in bot: + config.extend(['glinst', 'glinst4']) + elif 'MacMini6.2' in bot: + config.extend(['glinst', 'glinst16']) + + if 'CommandBuffer' in bot: + config = ['commandbuffer'] + if 'Vulkan' in bot: + config = ['vk'] + + if 'ANGLE' in bot: + config.extend(['angle_d3d11_es2']) + # The GL backend of ANGLE crashes on the perf bot currently. + if 'Win' not in bot: + config.extend(['angle_gl_es2']) + + args.append('--config') + args.extend(config) + + if 'Valgrind' in bot: + # Don't care about Valgrind performance. + args.extend(['--loops', '1']) + args.extend(['--samples', '1']) + # Ensure that the bot framework does not think we have timed out. + args.extend(['--keepAlive', 'true']) + + match = [] + if 'Android' in bot: + # Segfaults when run as GPU bench. Very large texture? + match.append('~blurroundrect') + match.append('~patch_grid') # skia:2847 + match.append('~desk_carsvg') + if 'NexusPlayer' in bot: + match.append('~desk_unicodetable') + if 'Nexus5' in bot: + match.append('~keymobi_shop_mobileweb_ebay_com.skp') # skia:5178 + if 'iOS' in bot: + match.append('~blurroundrect') + match.append('~patch_grid') # skia:2847 + match.append('~desk_carsvg') + match.append('~keymobi') + match.append('~path_hairline') + match.append('~GLInstancedArraysBench') # skia:4714 + if 'IntelIris540' in bot and 'ANGLE' in bot: + match.append('~tile_image_filter_tiled_64') # skia:6082 + if 'Vulkan' in bot and 'NexusPlayer' in bot: + match.append('~hardstop') # skia:6037 + + # We do not need or want to benchmark the decodes of incomplete images. + # In fact, in nanobench we assert that the full image decode succeeds. + match.append('~inc0.gif') + match.append('~inc1.gif') + match.append('~incInterlaced.gif') + match.append('~inc0.jpg') + match.append('~incGray.jpg') + match.append('~inc0.wbmp') + match.append('~inc1.wbmp') + match.append('~inc0.webp') + match.append('~inc1.webp') + match.append('~inc0.ico') + match.append('~inc1.ico') + match.append('~inc0.png') + match.append('~inc1.png') + match.append('~inc2.png') + match.append('~inc12.png') + match.append('~inc13.png') + match.append('~inc14.png') + match.append('~inc0.webp') + match.append('~inc1.webp') + + if match: + args.append('--match') + args.extend(match) + + return args + + +def perf_steps(api): + """Run Skia benchmarks.""" + if api.vars.upload_perf_results: + api.flavor.create_clean_device_dir( + api.flavor.device_dirs.perf_data_dir) + + # Run nanobench. + properties = [ + '--properties', + 'gitHash', api.vars.got_revision, + 'build_number', api.vars.build_number, + ] + if api.vars.is_trybot: + properties.extend([ + 'issue', api.vars.issue, + 'patchset', api.vars.patchset, + 'patch_storage', api.vars.patch_storage, + ]) + if api.vars.no_buildbot: + properties.extend(['no_buildbot', 'True']) + properties.extend(['swarming_bot_id', api.vars.swarming_bot_id]) + properties.extend(['swarming_task_id', api.vars.swarming_task_id]) + + target = 'nanobench' + args = [ + target, + '--undefok', # This helps branches that may not know new flags. + '-i', api.flavor.device_dirs.resource_dir, + '--skps', api.flavor.device_dirs.skp_dir, + '--images', api.flavor.device_path_join( + api.flavor.device_dirs.images_dir, 'nanobench'), + ] + + # Do not run svgs on Valgrind. + if 'Valgrind' not in api.vars.builder_name: + if ('Vulkan' not in api.vars.builder_name or + 'NexusPlayer' not in api.vars.builder_name): + args.extend(['--svgs', api.flavor.device_dirs.svg_dir]) + + skip_flag = None + if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': + skip_flag = '--nogpu' + elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': + skip_flag = '--nocpu' + if skip_flag: + args.append(skip_flag) + args.extend(nanobench_flags(api.vars.builder_name)) + + if api.vars.upload_perf_results: + now = api.time.utcnow() + ts = int(calendar.timegm(now.utctimetuple())) + json_path = api.flavor.device_path_join( + api.flavor.device_dirs.perf_data_dir, + 'nanobench_%s_%d.json' % (api.vars.got_revision, ts)) + args.extend(['--outResultsFile', json_path]) + args.extend(properties) + + keys_blacklist = ['configuration', 'role', 'is_trybot'] + args.append('--key') + for k in sorted(api.vars.builder_cfg.keys()): + if not k in keys_blacklist: + args.extend([k, api.vars.builder_cfg[k]]) + + api.run(api.flavor.step, target, cmd=args, + abort_on_failure=False, + env=api.vars.default_env) + + # See skia:2789. + if ('Valgrind' in api.vars.builder_name and + api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'): + abandonGpuContext = list(args) + abandonGpuContext.extend(['--abandonGpuContext', '--nocpu']) + api.run(api.flavor.step, + '%s --abandonGpuContext' % target, + cmd=abandonGpuContext, abort_on_failure=False, + env=api.vars.default_env) + + # Copy results to swarming out dir. + if api.vars.upload_perf_results: + api.file.makedirs('perf_dir', api.vars.perf_data_dir) + api.flavor.copy_directory_contents_to_host( + api.flavor.device_dirs.perf_data_dir, + api.vars.perf_data_dir) + +class PerfApi(recipe_api.RecipeApi): + def run(self): + self.m.core.setup() + try: + self.m.flavor.install_everything() + perf_steps(self.m) + finally: + self.m.flavor.cleanup_steps() + self.m.run.check_failure() diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android_Vulkan.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android_Vulkan.json new file mode 100644 index 0000000000..4c222d112c --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android_Vulkan.json @@ -0,0 +1,455 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Debug/nanobench", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config vk --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/nanobench.sh" + ], + "name": "write nanobench.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/nanobench.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "nanobench.sh" + ], + "name": "nanobench", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Debug" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android.json new file mode 100644 index 0000000000..199abf21f0 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android.json @@ -0,0 +1,455 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Debug/nanobench", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering hwui f16 srgb msaa4 nvpr4 nvprdit4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~keymobi_shop_mobileweb_ebay_com.skp ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/nanobench.sh" + ], + "name": "write nanobench.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/nanobench.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "nanobench.sh" + ], + "name": "nanobench", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Debug" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android.json new file mode 100644 index 0000000000..f6101b463a --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android.json @@ -0,0 +1,509 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/nanobench", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering hwui f16 srgb msaa4 nvpr4 nvprdit4 esinst --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337000001.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Adreno420 extra_config GN_Android model Nexus6 os Android; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/nanobench.sh" + ], + "name": "write nanobench.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/nanobench.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "nanobench.sh" + ], + "name": "nanobench", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/perf", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android/data" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/perf [CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android/data" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android.json new file mode 100644 index 0000000000..e847a237d6 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android.json @@ -0,0 +1,509 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/nanobench", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering hwui f16 srgb msaa4 nvpr4 nvprdit4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337000001.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Tegra3 extra_config GN_Android model Nexus7 os Android; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/nanobench.sh" + ], + "name": "write nanobench.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/nanobench.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "nanobench.sh" + ], + "name": "nanobench", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/perf", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android/data" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/perf [CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android/data" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android.json new file mode 100644 index 0000000000..c4228de6c1 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android.json @@ -0,0 +1,509 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/nanobench", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering hwui f16 srgb --match ~blurroundrect ~patch_grid ~desk_carsvg ~desk_unicodetable ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337000001.json --properties gitHash abc123 build_number 5 --key arch x86 compiler Clang cpu_or_gpu GPU cpu_or_gpu_value PowerVR extra_config GN_Android model NexusPlayer os Android; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/nanobench.sh" + ], + "name": "write nanobench.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/nanobench.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "nanobench.sh" + ], + "name": "nanobench", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/perf", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android/data" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/perf [CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android/data" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json new file mode 100644 index 0000000000..d33c8fe984 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json @@ -0,0 +1,509 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/nanobench", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config vk --match ~blurroundrect ~patch_grid ~desk_carsvg ~desk_unicodetable ~hardstop ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337000001.json --properties gitHash abc123 build_number 5 --key arch x86 compiler Clang cpu_or_gpu GPU cpu_or_gpu_value PowerVR extra_config GN_Android_Vulkan model NexusPlayer os Android; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/nanobench.sh" + ], + "name": "write nanobench.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/nanobench.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "nanobench.sh" + ], + "name": "nanobench", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/perf", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan/data" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/perf [CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan/data" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android.json new file mode 100644 index 0000000000..35b20726c3 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android.json @@ -0,0 +1,509 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/perf" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/perf" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/nanobench", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering hwui f16 srgb msaa4 nvpr4 nvprdit4 esinst esinst4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337000001.json --properties gitHash abc123 build_number 5 --key arch arm64 compiler Clang cpu_or_gpu GPU cpu_or_gpu_value TegraX1 extra_config GN_Android model PixelC os Android; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/nanobench.sh" + ], + "name": "write nanobench.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/nanobench.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push nanobench.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "nanobench.sh" + ], + "name": "nanobench", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/perf", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android/data" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/perf [CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android/data" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN.json new file mode 100644 index 0000000000..9492e955a7 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN.json @@ -0,0 +1,208 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN/data" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN/data", + "511" + ], + "name": "makedirs data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]/out/Release/nanobench", + "--undefok", + "-i", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/nanobench", + "--svgs", + "[START_DIR]/svg", + "--nogpu", + "--pre_log", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "glinst", + "glinst16", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--outResultsFile", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN/data/nanobench_abc123_1337000001.json", + "--properties", + "gitHash", + "abc123", + "build_number", + "5", + "--key", + "arch", + "x86_64", + "compiler", + "Clang", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX", + "extra_config", + "GN", + "model", + "MacMini6.2", + "os", + "Mac" + ], + "cwd": "[START_DIR]/skia", + "name": "nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer.json new file mode 100644 index 0000000000..16a2734c6e --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer.json @@ -0,0 +1,113 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/out/Debug/nanobench", + "--undefok", + "-i", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/nanobench", + "--svgs", + "[START_DIR]/svg", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "commandbuffer", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp" + ], + "cwd": "[START_DIR]/skia", + "name": "nanobench" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN.json new file mode 100644 index 0000000000..3b4b94c675 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN.json @@ -0,0 +1,208 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN/data" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN/data", + "511" + ], + "name": "makedirs data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "catchsegv", + "[START_DIR]/out/Release/nanobench", + "--undefok", + "-i", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/nanobench", + "--svgs", + "[START_DIR]/svg", + "--nogpu", + "--pre_log", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "565", + "msaa16", + "nvpr16", + "nvprdit16", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--outResultsFile", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN/data/nanobench_abc123_1337000001.json", + "--properties", + "gitHash", + "abc123", + "build_number", + "5", + "--key", + "arch", + "x86_64", + "compiler", + "Clang", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "extra_config", + "GN", + "model", + "GCE", + "os", + "Ubuntu" + ], + "cwd": "[START_DIR]/skia", + "name": "nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-ANGLE.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-ANGLE.json new file mode 100644 index 0000000000..7eda498082 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-ANGLE.json @@ -0,0 +1,212 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-ANGLE/data" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-ANGLE/data", + "511" + ], + "name": "makedirs data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "catchsegv", + "[START_DIR]/out/Release/nanobench", + "--undefok", + "-i", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/nanobench", + "--svgs", + "[START_DIR]/svg", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "angle_d3d11_es2", + "angle_gl_es2", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--outResultsFile", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-ANGLE/data/nanobench_abc123_1337000001.json", + "--properties", + "gitHash", + "abc123", + "build_number", + "5", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "GTX550Ti", + "extra_config", + "ANGLE", + "model", + "ShuttleA", + "os", + "Ubuntu" + ], + "cwd": "[START_DIR]/skia", + "name": "nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-ANGLE/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json new file mode 100644 index 0000000000..ff596e3b53 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json @@ -0,0 +1,207 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "valgrind", + "--gen-suppressions=all", + "--leak-check=full", + "--track-origins=yes", + "--error-exitcode=1", + "--num-callers=40", + "--suppressions=[START_DIR]/skia/tools/valgrind.supp", + "[START_DIR]/out/Release/nanobench", + "--undefok", + "-i", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/nanobench", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "--loops", + "1", + "--samples", + "1", + "--keepAlive", + "true", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp" + ], + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "nanobench" + }, + { + "cmd": [ + "valgrind", + "--gen-suppressions=all", + "--leak-check=full", + "--track-origins=yes", + "--error-exitcode=1", + "--num-callers=40", + "--suppressions=[START_DIR]/skia/tools/valgrind.supp", + "[START_DIR]/out/Release/nanobench", + "--undefok", + "-i", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/nanobench", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "--loops", + "1", + "--samples", + "1", + "--keepAlive", + "true", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--abandonGpuContext", + "--nocpu" + ], + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "nanobench --abandonGpuContext" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug.json new file mode 100644 index 0000000000..f3fd6492cb --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug.json @@ -0,0 +1,119 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]\\out\\Debug_x64\\nanobench", + "--undefok", + "-i", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\nanobench", + "--svgs", + "[START_DIR]\\svg", + "--nogpu", + "--pre_log", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "565", + "msaa16", + "nvpr16", + "nvprdit16", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp" + ], + "cwd": "[START_DIR]\\skia", + "name": "nanobench" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release.json new file mode 100644 index 0000000000..9a94744ff1 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release.json @@ -0,0 +1,205 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release\\data" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release\\data", + "511" + ], + "name": "makedirs data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Release_x64\\nanobench", + "--undefok", + "-i", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\nanobench", + "--svgs", + "[START_DIR]\\svg", + "--nogpu", + "--pre_log", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "565", + "msaa16", + "nvpr16", + "nvprdit16", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--outResultsFile", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release\\data\\nanobench_abc123_1337000001.json", + "--properties", + "gitHash", + "abc123", + "build_number", + "5", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "model", + "GCE", + "os", + "Win" + ], + "cwd": "[START_DIR]\\skia", + "name": "nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release\\data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE.json new file mode 100644 index 0000000000..4db8b0ba3d --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE.json @@ -0,0 +1,211 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE\\data" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE\\data", + "511" + ], + "name": "makedirs data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Release_x64\\nanobench", + "--undefok", + "-i", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\nanobench", + "--svgs", + "[START_DIR]\\svg", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "angle_d3d11_es2", + "--match", + "~tile_image_filter_tiled_64", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--outResultsFile", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE\\data\\nanobench_abc123_1337000001.json", + "--properties", + "gitHash", + "abc123", + "build_number", + "5", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "IntelIris540", + "extra_config", + "ANGLE", + "model", + "NUC", + "os", + "Win10" + ], + "cwd": "[START_DIR]\\skia", + "name": "nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE\\data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json new file mode 100644 index 0000000000..3e02cdd9f1 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json @@ -0,0 +1,122 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]\\out\\Debug_x64\\nanobench", + "--undefok", + "-i", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\nanobench", + "--svgs", + "[START_DIR]\\svg", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "angle_d3d11_es2", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp" + ], + "cwd": "[START_DIR]\\skia", + "name": "nanobench" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot.json b/infra/bots/recipe_modules/perf/example.expected/Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot.json new file mode 100644 index 0000000000..c743570a0f --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot.json @@ -0,0 +1,213 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data", + "511" + ], + "name": "makedirs data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Release_x64\\nanobench", + "--undefok", + "-i", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\nanobench", + "--svgs", + "[START_DIR]\\svg", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--outResultsFile", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data\\nanobench_abc123_1337000001.json", + "--properties", + "gitHash", + "abc123", + "build_number", + "5", + "issue", + "500", + "patchset", + "1", + "patch_storage", + "rietveld", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "HD4600", + "model", + "ShuttleB", + "os", + "Win8" + ], + "cwd": "[START_DIR]\\skia", + "name": "nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json b/infra/bots/recipe_modules/perf/example.expected/Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json new file mode 100644 index 0000000000..a5c89e7611 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json @@ -0,0 +1,429 @@ +[ + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_install" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "install iOSShell" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/skia/resources", + "skiabot/skia_resources" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push resources to skia_resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file", + "skiabot/skia_tmp_dir/SKP_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "read SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_tmp_dir/SKP_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rm skiabot/skia_tmp_dir/SKP_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_skp/skps" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_skp/skps" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_skp/skps" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_skp/skps" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/skp", + "skiabot/skia_skp/skps" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push skp to skps" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/SKP_VERSION", + "skiabot/skia_tmp_dir/SKP_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file", + "skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "read SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rm skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_images" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_images" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_images" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_images" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/skimage", + "skiabot/skia_images" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push skimage to skia_images" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file", + "skiabot/skia_tmp_dir/SVG_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "read SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_tmp_dir/SVG_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rm skiabot/skia_tmp_dir/SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_svg/svgs" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_svg/svgs" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_svg/svgs" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_svg/svgs" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/svg", + "skiabot/skia_svg/svgs" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push svg to svgs" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/SVG_VERSION", + "skiabot/skia_tmp_dir/SVG_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_run_skia", + "--nanobench", + "--undefok", + "-i", + "skiabot/skia_resources", + "--skps", + "skiabot/skia_skp/skps", + "--images", + "skiabot/skia_images/nanobench", + "--svgs", + "skiabot/skia_svg/svgs", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--skps", + "ignore_skps", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "--match", + "~blurroundrect", + "~patch_grid", + "~desk_carsvg", + "~keymobi", + "~path_hairline", + "~GLInstancedArraysBench", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "nanobench" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_restart" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "reboot" + }, + { + "cmd": [ + "sleep", + "20" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "wait for reboot" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/big_issue_number.json b/infra/bots/recipe_modules/perf/example.expected/big_issue_number.json new file mode 100644 index 0000000000..2817618709 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/big_issue_number.json @@ -0,0 +1,213 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data", + "511" + ], + "name": "makedirs data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Release_x64\\nanobench", + "--undefok", + "-i", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\nanobench", + "--svgs", + "[START_DIR]\\svg", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--outResultsFile", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data\\nanobench_abc123_1337000001.json", + "--properties", + "gitHash", + "abc123", + "build_number", + "5", + "issue", + "2147533002", + "patchset", + "1", + "patch_storage", + "rietveld", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "HD4600", + "model", + "ShuttleB", + "os", + "Win8" + ], + "cwd": "[START_DIR]\\skia", + "name": "nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/nobuildbot.json b/infra/bots/recipe_modules/perf/example.expected/nobuildbot.json new file mode 100644 index 0000000000..01b485bc21 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/nobuildbot.json @@ -0,0 +1,247 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data", + "511" + ], + "name": "makedirs data", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n" + ], + "name": "get swarming task id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Release_x64\\nanobench", + "--undefok", + "-i", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\nanobench", + "--svgs", + "[START_DIR]\\svg", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--outResultsFile", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data\\nanobench_abc123_1337000001.json", + "--properties", + "gitHash", + "abc123", + "build_number", + "571", + "issue", + "456789", + "patchset", + "12", + "patch_storage", + "gerrit", + "no_buildbot", + "True", + "swarming_bot_id", + "skia-bot-123", + "swarming_task_id", + "123456", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "HD4600", + "model", + "ShuttleB", + "os", + "Win8" + ], + "cwd": "[START_DIR]\\skia", + "name": "nanobench" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.expected/recipe_with_gerrit_patch.json b/infra/bots/recipe_modules/perf/example.expected/recipe_with_gerrit_patch.json new file mode 100644 index 0000000000..ed45dac5ab --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.expected/recipe_with_gerrit_patch.json @@ -0,0 +1,229 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "valgrind", + "--gen-suppressions=all", + "--leak-check=full", + "--track-origins=yes", + "--error-exitcode=1", + "--num-callers=40", + "--suppressions=[START_DIR]/skia/tools/valgrind.supp", + "[START_DIR]/out/Release/nanobench", + "--undefok", + "-i", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/nanobench", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "--loops", + "1", + "--samples", + "1", + "--keepAlive", + "true", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp" + ], + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "nanobench" + }, + { + "cmd": [ + "valgrind", + "--gen-suppressions=all", + "--leak-check=full", + "--track-origins=yes", + "--error-exitcode=1", + "--num-callers=40", + "--suppressions=[START_DIR]/skia/tools/valgrind.supp", + "[START_DIR]/out/Release/nanobench", + "--undefok", + "-i", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/nanobench", + "--nocpu", + "--pre_log", + "--images", + "--gpuStatsDump", + "true", + "--scales", + "1.0", + "1.1", + "--config", + "8888", + "gpu", + "nonrendering", + "hwui", + "f16", + "srgb", + "msaa16", + "nvpr16", + "nvprdit16", + "--loops", + "1", + "--samples", + "1", + "--keepAlive", + "true", + "--match", + "~inc0.gif", + "~inc1.gif", + "~incInterlaced.gif", + "~inc0.jpg", + "~incGray.jpg", + "~inc0.wbmp", + "~inc1.wbmp", + "~inc0.webp", + "~inc1.webp", + "~inc0.ico", + "~inc1.ico", + "~inc0.png", + "~inc1.png", + "~inc2.png", + "~inc12.png", + "~inc13.png", + "~inc14.png", + "~inc0.webp", + "~inc1.webp", + "--abandonGpuContext", + "--nocpu" + ], + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "nanobench --abandonGpuContext" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/perf/example.py b/infra/bots/recipe_modules/perf/example.py new file mode 100644 index 0000000000..19f9dcce91 --- /dev/null +++ b/infra/bots/recipe_modules/perf/example.py @@ -0,0 +1,159 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Example recipe w/ coverage. + + +DEPS = [ + 'perf', + 'recipe_engine/path', + 'recipe_engine/platform', + 'recipe_engine/properties', + 'recipe_engine/raw_io', +] + + +TEST_BUILDERS = { + 'client.skia': { + 'skiabot-linux-swarm-000': [ + ('Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug' + + '-GN_Android_Vulkan'), + 'Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android', + 'Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android', + 'Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android', + 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android', + ('Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_' + 'Android_Vulkan'), + 'Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android', + 'Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN', + 'Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer', + 'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN', + 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', + 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-ANGLE', + 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug', + 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release', + 'Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE', + 'Perf-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE', + 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot', + 'Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', + ], + }, +} + + +def RunSteps(api): + api.perf.run() + + +def GenTests(api): + for mastername, slaves in TEST_BUILDERS.iteritems(): + for slavename, builders_by_slave in slaves.iteritems(): + for builder in builders_by_slave: + test = ( + api.test(builder) + + api.properties(buildername=builder, + mastername=mastername, + slavename=slavename, + buildnumber=5, + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.path.exists( + api.path['start_dir'].join('skia'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skimage', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skp', 'VERSION'), + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + ) + if 'Trybot' in builder: + test += api.properties(issue=500, + patchset=1, + rietveld='https://codereview.chromium.org') + if 'Win' in builder: + test += api.platform('win', 64) + + yield test + + builder = 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot' + yield ( + api.test('big_issue_number') + + api.properties(buildername=builder, + mastername='client.skia.compile', + slavename='skiabot-linux-swarm-000', + buildnumber=5, + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + rietveld='https://codereview.chromium.org', + patchset=1, + issue=2147533002L) + + api.path.exists( + api.path['start_dir'].join('skia'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skimage', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skp', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'svg', 'VERSION'), + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + + api.platform('win', 64) + ) + + builder = ('Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind-' + 'Trybot') + yield ( + api.test('recipe_with_gerrit_patch') + + api.properties( + buildername=builder, + mastername='client.skia', + slavename='skiabot-linux-swarm-000', + buildnumber=5, + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + revision='abc123', + patch_storage='gerrit') + + api.properties.tryserver( + buildername=builder, + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + ) + + builder = 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot' + yield ( + api.test('nobuildbot') + + api.properties( + buildername=builder, + mastername='client.skia', + slavename='skiabot-linux-swarm-000', + buildnumber=5, + revision='abc123', + path_config='kitchen', + nobuildbot='True', + swarm_out_dir='[SWARM_OUT_DIR]', + patch_storage='gerrit') + + api.properties.tryserver( + buildername=builder, + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + + api.path.exists( + api.path['start_dir'].join('skia'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skimage', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skp', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'svg', 'VERSION'), + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + + api.platform('win', 64) + + api.step_data('get swarming bot id', + stdout=api.raw_io.output('skia-bot-123')) + + api.step_data('get swarming task id', stdout=api.raw_io.output('123456')) + ) diff --git a/infra/bots/recipe_modules/run/__init__.py b/infra/bots/recipe_modules/run/__init__.py new file mode 100644 index 0000000000..cb4c1ae0ee --- /dev/null +++ b/infra/bots/recipe_modules/run/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/file', + 'recipe_engine/json', + 'recipe_engine/path', + 'recipe_engine/platform', + 'recipe_engine/python', + 'recipe_engine/step', + 'vars', +] diff --git a/infra/bots/recipe_modules/run/api.py b/infra/bots/recipe_modules/run/api.py new file mode 100644 index 0000000000..0b247c9c0e --- /dev/null +++ b/infra/bots/recipe_modules/run/api.py @@ -0,0 +1,130 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# pylint: disable=W0201 + + +from recipe_engine import recipe_api + + +BUILD_PRODUCTS_ISOLATE_WHITELIST = [ + 'dm', + 'dm.exe', + 'get_images_from_skps', + 'get_images_from_skps.exe', + 'nanobench', + 'nanobench.exe', + 'skpbench', + '*.so', + '*.dll', + '*.dylib', + 'skia_launcher', + 'lib/*.so', + 'iOSShell.app', + 'iOSShell.ipa', + 'visualbench', + 'visualbench.exe', + 'vulkan-1.dll', +] + + +class SkiaStepApi(recipe_api.RecipeApi): + + def __init__(self, *args, **kwargs): + """Initialize the recipe module.""" + super(SkiaStepApi, self).__init__(*args, **kwargs) + + self._already_ran = {} + self._ccache = None + self._checked_for_ccache = False + self._failed = [] + + def check_failure(self): + """Raise an exception if any step failed.""" + if self._failed: + raise self.m.step.StepFailure('Failed build steps: %s' % + ', '.join([f.name for f in self._failed])) + + def run_once(self, fn, *args, **kwargs): + if not fn.__name__ in self._already_ran: + self._already_ran[fn.__name__] = fn(*args, **kwargs) + return self._already_ran[fn.__name__] + + def readfile(self, filename, *args, **kwargs): + """Convenience function for reading files.""" + name = kwargs.pop('name') or 'read %s' % self.m.path.basename(filename) + return self.m.file.read(name, filename, infra_step=True, *args, **kwargs) + + def writefile(self, filename, contents): + """Convenience function for writing files.""" + return self.m.file.write('write %s' % self.m.path.basename(filename), + filename, contents, infra_step=True) + + def rmtree(self, path): + """Wrapper around api.file.rmtree with environment fix.""" + env = {} + env['PYTHONPATH'] = str(self.m.path['start_dir'].join( + 'skia', 'infra', 'bots', '.recipe_deps', 'build', 'scripts')) + self.m.file.rmtree(self.m.path.basename(path), + path, + env=env, + infra_step=True) + + def __call__(self, steptype, name, abort_on_failure=True, + fail_build_on_failure=True, env=None, **kwargs): + """Run a step. If it fails, keep going but mark the build status failed.""" + env = dict(env or {}) + env.update(self.m.vars.default_env) + try: + return steptype(name=name, env=env, **kwargs) + except self.m.step.StepFailure as e: + if abort_on_failure: + raise # pragma: no cover + if fail_build_on_failure: + self._failed.append(e) + + def copy_build_products(self, src, dst): + """Copy whitelisted build products from src to dst.""" + self.m.python.inline( + name='copy build products', + program='''import errno +import glob +import os +import shutil +import sys + +src = sys.argv[1] +dst = sys.argv[2] +build_products_whitelist = %s + +try: + os.makedirs(dst) +except OSError as e: + if e.errno != errno.EEXIST: + raise + +for pattern in build_products_whitelist: + path = os.path.join(src, pattern) + for f in glob.glob(path): + dst_path = os.path.join(dst, os.path.relpath(f, src)) + if not os.path.isdir(os.path.dirname(dst_path)): + os.makedirs(os.path.dirname(dst_path)) + print 'Copying build product %%s to %%s' %% (f, dst_path) + shutil.move(f, dst_path) +''' % str(BUILD_PRODUCTS_ISOLATE_WHITELIST), + args=[src, dst], + infra_step=True) + + def with_retry(self, steptype, name, attempts, *args, **kwargs): + for attempt in xrange(attempts): + step_name = name + if attempt > 0: + step_name += ' (attempt %d)' % (attempt + 1) + try: + steptype(step_name, *args, **kwargs) + return + except self.m.step.StepFailure: + if attempt == attempts - 1: + raise diff --git a/infra/bots/recipe_modules/skpbench/__init__.py b/infra/bots/recipe_modules/skpbench/__init__.py new file mode 100644 index 0000000000..f2a0bfed43 --- /dev/null +++ b/infra/bots/recipe_modules/skpbench/__init__.py @@ -0,0 +1,17 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/file', + 'core', + 'recipe_engine/path', + 'recipe_engine/properties', + 'recipe_engine/python', + 'recipe_engine/raw_io', + 'recipe_engine/step', + 'recipe_engine/time', + 'run', + 'flavor', + 'vars', +] diff --git a/infra/bots/recipe_modules/skpbench/api.py b/infra/bots/recipe_modules/skpbench/api.py new file mode 100644 index 0000000000..85efd75c12 --- /dev/null +++ b/infra/bots/recipe_modules/skpbench/api.py @@ -0,0 +1,89 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Recipe module for Skia Swarming skpbench. + + +import calendar + +from recipe_engine import recipe_api + + +def _run(api, title, *cmd, **kwargs): + return api.run(api.step, title, cmd=list(cmd), + cwd=api.vars.skia_dir, **kwargs) + + +def _adb(api, title, *cmd, **kwargs): + if 'infra_step' not in kwargs: + kwargs['infra_step'] = True + return _run(api, title, 'adb', *cmd, **kwargs) + + +def skpbench_steps(api): + """benchmark Skia using skpbench.""" + app = api.vars.skia_out.join(api.vars.configuration, 'skpbench') + _adb(api, 'push skpbench', 'push', app, api.vars.android_bin_dir) + + skpbench_dir = api.vars.slave_dir.join('skia', 'tools', 'skpbench') + table = api.path.join(api.vars.swarming_out_dir, 'table') + + config = 'gpu,esinst4' + if 'Vulkan' in api.vars.builder_name: + config = 'vk' + + skpbench_args = [ + api.path.join(api.vars.android_bin_dir, 'skpbench'), + api.path.join(api.vars.android_data_dir, 'skps'), + '--adb', + '--resultsfile', table, + '--config', config] + + api.run(api.python, 'skpbench', + script=skpbench_dir.join('skpbench.py'), + args=skpbench_args) + + skiaperf_args = [ + table, + '--properties', + 'gitHash', api.vars.got_revision, + 'build_number', api.vars.build_number, + ] + + skiaperf_args.extend(['no_buildbot', 'True']) + skiaperf_args.extend(['swarming_bot_id', api.vars.swarming_bot_id]) + skiaperf_args.extend(['swarming_task_id', api.vars.swarming_task_id]) + + now = api.time.utcnow() + ts = int(calendar.timegm(now.utctimetuple())) + api.file.makedirs('perf_dir', api.vars.perf_data_dir) + json_path = api.path.join( + api.vars.perf_data_dir, + 'skpbench_%s_%d.json' % (api.vars.got_revision, ts)) + + skiaperf_args.extend([ + '--outfile', json_path + ]) + + keys_blacklist = ['configuration', 'role', 'is_trybot'] + skiaperf_args.append('--key') + for k in sorted(api.vars.builder_cfg.keys()): + if not k in keys_blacklist: + skiaperf_args.extend([k, api.vars.builder_cfg[k]]) + + api.run(api.python, 'Parse skpbench output into Perf json', + script=skpbench_dir.join('skiaperf.py'), + args=skiaperf_args) + + +class SkpBenchApi(recipe_api.RecipeApi): + def run(self): + self.m.core.setup() + try: + self.m.flavor.install(skps=True) + skpbench_steps(self.m) + finally: + self.m.flavor.cleanup_steps() + self.m.run.check_failure() diff --git a/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json b/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json new file mode 100644 index 0000000000..6353575a6c --- /dev/null +++ b/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench.json @@ -0,0 +1,290 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/skpbench", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push skpbench" + }, + { + "cmd": [ + "python", + "-u", + "[START_DIR]/skia/tools/skpbench/skpbench.py", + "/data/local/tmp/skpbench", + "/sdcard/revenge_of_the_skiabot/skps", + "--adb", + "--resultsfile", + "[CUSTOM_[SWARM_OUT_DIR]]/table", + "--config", + "gpu,esinst4" + ], + "name": "skpbench" + }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n" + ], + "name": "get swarming task id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[START_DIR]/skia/tools/skpbench/skiaperf.py", + "[CUSTOM_[SWARM_OUT_DIR]]/table", + "--properties", + "gitHash", + "abc123", + "build_number", + "5", + "no_buildbot", + "True", + "swarming_bot_id", + "skia-bot-123", + "swarming_task_id", + "123456", + "--outfile", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench/data/skpbench_abc123_1337000001.json", + "--key", + "arch", + "arm64", + "compiler", + "Clang", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "TegraX1", + "extra_config", + "GN_Android_Skpbench", + "model", + "PixelC", + "os", + "Android" + ], + "name": "Parse skpbench output into Perf json" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench.json b/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench.json new file mode 100644 index 0000000000..5a54a616b7 --- /dev/null +++ b/infra/bots/recipe_modules/skpbench/example.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench.json @@ -0,0 +1,290 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/skpbench", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push skpbench" + }, + { + "cmd": [ + "python", + "-u", + "[START_DIR]/skia/tools/skpbench/skpbench.py", + "/data/local/tmp/skpbench", + "/sdcard/revenge_of_the_skiabot/skps", + "--adb", + "--resultsfile", + "[CUSTOM_[SWARM_OUT_DIR]]/table", + "--config", + "vk" + ], + "name": "skpbench" + }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n" + ], + "name": "get swarming task id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench/data", + "511" + ], + "name": "makedirs perf_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[START_DIR]/skia/tools/skpbench/skiaperf.py", + "[CUSTOM_[SWARM_OUT_DIR]]/table", + "--properties", + "gitHash", + "abc123", + "build_number", + "5", + "no_buildbot", + "True", + "swarming_bot_id", + "skia-bot-123", + "swarming_task_id", + "123456", + "--outfile", + "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Vulkan_Skpbench/data/skpbench_abc123_1337000001.json", + "--key", + "arch", + "arm64", + "compiler", + "Clang", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "TegraX1", + "extra_config", + "GN_Android_Vulkan_Skpbench", + "model", + "PixelC", + "os", + "Android" + ], + "name": "Parse skpbench output into Perf json" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/skpbench/example.py b/infra/bots/recipe_modules/skpbench/example.py new file mode 100644 index 0000000000..4acf916524 --- /dev/null +++ b/infra/bots/recipe_modules/skpbench/example.py @@ -0,0 +1,56 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Example recipe w/ coverage. + + +DEPS = [ + 'recipe_engine/path', + 'recipe_engine/properties', + 'recipe_engine/raw_io', + 'skpbench', +] + + +TEST_BUILDERS = { + 'client.skia': { + 'skiabot-linux-swarm-000': [ + 'Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench', + ('Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-' + + 'GN_Android_Vulkan_Skpbench'), + ], + }, +} + + +def RunSteps(api): + api.skpbench.run() + + +def GenTests(api): + for mastername, slaves in TEST_BUILDERS.iteritems(): + for slavename, builders_by_slave in slaves.iteritems(): + for builder in builders_by_slave: + test = ( + api.test(builder) + + api.properties(buildername=builder, + mastername=mastername, + slavename=slavename, + buildnumber=5, + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.path.exists( + api.path['start_dir'].join('skia'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skp', 'VERSION'), + ) + + api.step_data('get swarming bot id', + stdout=api.raw_io.output('skia-bot-123')) + + api.step_data('get swarming task id', + stdout=api.raw_io.output('123456')) + ) + + yield test diff --git a/infra/bots/recipe_modules/sktest/__init__.py b/infra/bots/recipe_modules/sktest/__init__.py new file mode 100644 index 0000000000..578c162988 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/__init__.py @@ -0,0 +1,17 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/file', + 'core', + 'recipe_engine/json', + 'recipe_engine/path', + 'recipe_engine/platform', + 'recipe_engine/properties', + 'recipe_engine/python', + 'recipe_engine/raw_io', + 'flavor', + 'run', + 'vars', +] diff --git a/infra/bots/recipe_modules/sktest/api.py b/infra/bots/recipe_modules/sktest/api.py new file mode 100644 index 0000000000..2b1713b4fe --- /dev/null +++ b/infra/bots/recipe_modules/sktest/api.py @@ -0,0 +1,541 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Recipe module for Skia Swarming test. + + +from recipe_engine import recipe_api + + +def dm_flags(bot): + args = [] + + # 32-bit desktop bots tend to run out of memory, because they have relatively + # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit. + if '-x86-' in bot and not 'NexusPlayer' in bot: + args.extend('--threads 4'.split(' ')) + + # These are the canonical configs that we would ideally run on all bots. We + # may opt out or substitute some below for specific bots + configs = ['8888', 'srgb', 'gpu', 'gpudft', 'gpusrgb', 'pdf'] + # Add in either msaa4 or msaa16 to the canonical set of configs to run + if 'Android' in bot or 'iOS' in bot: + configs.append('msaa4') + else: + configs.append('msaa16') + + # The NP produces a long error stream when we run with MSAA. The Tegra3 just + # doesn't support it. + if ('NexusPlayer' in bot or + 'Tegra3' in bot or + # We aren't interested in fixing msaa bugs on iPad4. + 'iPad4' in bot or + # skia:5792 + 'iHD530' in bot or + 'IntelIris540' in bot): + configs = [x for x in configs if 'msaa' not in x] + + # The NP produces different images for dft on every run. + if 'NexusPlayer' in bot: + configs = [x for x in configs if 'gpudft' not in x] + + # Runs out of memory on Android bots. Everyone else seems fine. + if 'Android' in bot: + configs.remove('pdf') + + if '-GCE-' in bot: + configs.extend(['565']) + configs.extend(['f16']) + configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture. + configs.extend(['lite-8888']) # Experimental display list. + + if '-TSAN' not in bot: + if ('TegraK1' in bot or + 'TegraX1' in bot or + 'GTX550Ti' in bot or + 'GTX660' in bot or + 'GT610' in bot): + if 'Android' in bot: + configs.append('nvprdit4') + else: + configs.append('nvprdit16') + + # We want to test the OpenGL config not the GLES config on the Shield + if 'NVIDIA_Shield' in bot: + configs = [x.replace('gpu', 'gl') for x in configs] + configs = [x.replace('msaa', 'glmsaa') for x in configs] + configs = [x.replace('nvpr', 'glnvpr') for x in configs] + + # NP is running out of RAM when we run all these modes. skia:3255 + if 'NexusPlayer' not in bot: + configs.extend(mode + '-8888' for mode in + ['serialize', 'tiles_rt', 'pic']) + + # Test instanced rendering on a limited number of platforms + if 'Nexus6' in bot: + configs.append('esinst') # esinst4 isn't working yet on Adreno. + elif 'NVIDIA_Shield' in bot: + # Multisampled instanced configs use nvpr. + configs = [x.replace('glnvpr', 'glinst') for x in configs] + configs.append('glinst') + elif 'PixelC' in bot: + # Multisampled instanced configs use nvpr. + configs = [x.replace('nvpr', 'esinst') for x in configs] + configs.append('esinst') + elif 'MacMini6.2' in bot: + configs.extend(['glinst', 'glinst16']) + + # CommandBuffer bot *only* runs the command_buffer config. + if 'CommandBuffer' in bot: + configs = ['commandbuffer'] + + # ANGLE bot *only* runs the angle configs + if 'ANGLE' in bot: + configs = ['angle_d3d11_es2', + 'angle_d3d9_es2', + 'angle_d3d11_es2_msaa4', + 'angle_gl_es2'] + + # Vulkan bot *only* runs the vk config. + if 'Vulkan' in bot: + configs = ['vk'] + + args.append('--config') + args.extend(configs) + + # Run tests, gms, and image decoding tests everywhere. + args.extend('--src tests gm image colorImage'.split(' ')) + if 'Vulkan' not in bot or 'NexusPlayer' not in bot: + args.append('svg') + + if 'GalaxyS' in bot: + args.extend(('--threads', '0')) + + blacklisted = [] + def blacklist(quad): + config, src, options, name = quad.split(' ') if type(quad) is str else quad + if config == '_' or config in configs: + blacklisted.extend([config, src, options, name]) + + # TODO: ??? + blacklist('f16 _ _ dstreadshuffle') + blacklist('gpusrgb image _ _') + blacklist('glsrgb image _ _') + + # Decoder tests are now performing gamma correct decodes. This means + # that, when viewing the results, we need to perform a gamma correct + # encode to PNG. Therefore, we run the image tests in srgb mode instead + # of 8888. + blacklist('8888 image _ _') + + if 'Valgrind' in bot: + # These take 18+ hours to run. + blacklist('pdf gm _ fontmgr_iter') + blacklist('pdf _ _ PANO_20121023_214540.jpg') + blacklist('pdf skp _ worldjournal') + blacklist('pdf skp _ desk_baidu.skp') + blacklist('pdf skp _ desk_wikipedia.skp') + blacklist('_ svg _ _') + + if 'iOS' in bot: + blacklist('gpu skp _ _') + blacklist('msaa skp _ _') + blacklist('msaa16 gm _ tilemodesProcess') + + if 'Mac' in bot or 'iOS' in bot: + # CG fails on questionable bmps + blacklist('_ image gen_platf rgba32abf.bmp') + blacklist('_ image gen_platf rgb24prof.bmp') + blacklist('_ image gen_platf rgb24lprof.bmp') + blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp') + blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp') + blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp') + blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp') + + # CG has unpredictable behavior on this questionable gif + # It's probably using uninitialized memory + blacklist('_ image gen_platf frame_larger_than_image.gif') + + # CG has unpredictable behavior on incomplete pngs + # skbug.com/5774 + blacklist('_ image gen_platf inc0.png') + blacklist('_ image gen_platf inc1.png') + blacklist('_ image gen_platf inc2.png') + blacklist('_ image gen_platf inc3.png') + blacklist('_ image gen_platf inc4.png') + blacklist('_ image gen_platf inc5.png') + blacklist('_ image gen_platf inc6.png') + blacklist('_ image gen_platf inc7.png') + blacklist('_ image gen_platf inc8.png') + blacklist('_ image gen_platf inc9.png') + blacklist('_ image gen_platf inc10.png') + blacklist('_ image gen_platf inc11.png') + blacklist('_ image gen_platf inc12.png') + blacklist('_ image gen_platf inc13.png') + blacklist('_ image gen_platf inc14.png') + + # WIC fails on questionable bmps + if 'Win' in bot: + blacklist('_ image gen_platf rle8-height-negative.bmp') + blacklist('_ image gen_platf rle4-height-negative.bmp') + blacklist('_ image gen_platf pal8os2v2.bmp') + blacklist('_ image gen_platf pal8os2v2-16.bmp') + blacklist('_ image gen_platf rgba32abf.bmp') + blacklist('_ image gen_platf rgb24prof.bmp') + blacklist('_ image gen_platf rgb24lprof.bmp') + blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp') + blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp') + blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp') + blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp') + if 'x86_64' in bot and 'CPU' in bot: + # This GM triggers a SkSmallAllocator assert. + blacklist('_ gm _ composeshader_bitmap') + + if 'Android' in bot or 'iOS' in bot: + # This test crashes the N9 (perhaps because of large malloc/frees). It also + # is fairly slow and not platform-specific. So we just disable it on all of + # Android and iOS. skia:5438 + blacklist('_ test _ GrShape') + + if 'Win8' in bot: + # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with + # 'Unexpected error' from DirectWrite" + blacklist('_ gm _ fontscalerdistortable') + # skia:5636 + blacklist('_ svg _ Nebraska-StateSeal.svg') + + # skia:4095 + bad_serialize_gms = ['bleed_image', + 'c_gms', + 'colortype', + 'colortype_xfermodes', + 'drawfilter', + 'fontmgr_bounds_0.75_0', + 'fontmgr_bounds_1_-0.25', + 'fontmgr_bounds', + 'fontmgr_match', + 'fontmgr_iter', + 'imagemasksubset'] + + # skia:5589 + bad_serialize_gms.extend(['bitmapfilters', + 'bitmapshaders', + 'bleed', + 'bleed_alpha_bmp', + 'bleed_alpha_bmp_shader', + 'convex_poly_clip', + 'extractalpha', + 'filterbitmap_checkerboard_32_32_g8', + 'filterbitmap_image_mandrill_64', + 'shadows', + 'simpleaaclip_aaclip']) + # skia:5595 + bad_serialize_gms.extend(['composeshader_bitmap', + 'scaled_tilemodes_npot', + 'scaled_tilemodes']) + + # skia:5778 + bad_serialize_gms.append('typefacerendering_pfaMac') + # skia:5942 + bad_serialize_gms.append('parsedpaths') + + # these use a custom image generator which doesn't serialize + bad_serialize_gms.append('ImageGeneratorExternal_rect') + bad_serialize_gms.append('ImageGeneratorExternal_shader') + + # skia:6189 + bad_serialize_gms.append('shadow_utils') + + for test in bad_serialize_gms: + blacklist(['serialize-8888', 'gm', '_', test]) + + if 'Mac' not in bot: + for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']: + blacklist(['serialize-8888', 'gm', '_', test]) + # It looks like we skip these only for out-of-memory concerns. + if 'Win' in bot or 'Android' in bot: + for test in ['verylargebitmap', 'verylarge_picture_image']: + blacklist(['serialize-8888', 'gm', '_', test]) + + # skia:4769 + for test in ['drawfilter']: + blacklist([ 'sp-8888', 'gm', '_', test]) + blacklist([ 'pic-8888', 'gm', '_', test]) + blacklist(['2ndpic-8888', 'gm', '_', test]) + blacklist([ 'lite-8888', 'gm', '_', test]) + # skia:4703 + for test in ['image-cacherator-from-picture', + 'image-cacherator-from-raster', + 'image-cacherator-from-ctable']: + blacklist([ 'sp-8888', 'gm', '_', test]) + blacklist([ 'pic-8888', 'gm', '_', test]) + blacklist([ '2ndpic-8888', 'gm', '_', test]) + blacklist(['serialize-8888', 'gm', '_', test]) + + # GM that requires raster-backed canvas + for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']: + blacklist([ 'sp-8888', 'gm', '_', test]) + blacklist([ 'pic-8888', 'gm', '_', test]) + blacklist([ 'lite-8888', 'gm', '_', test]) + blacklist([ '2ndpic-8888', 'gm', '_', test]) + blacklist(['serialize-8888', 'gm', '_', test]) + + # GM that not support tiles_rt + for test in ['complexclip4_bw', 'complexclip4_aa']: + blacklist([ 'tiles_rt-8888', 'gm', '_', test]) + + # Extensions for RAW images + r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw", + "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"] + + # skbug.com/4888 + # Blacklist RAW images (and a few large PNGs) on GPU bots + # until we can resolve failures + if 'GPU' in bot: + blacklist('_ image _ interlaced1.png') + blacklist('_ image _ interlaced2.png') + blacklist('_ image _ interlaced3.png') + for raw_ext in r: + blacklist('_ image _ .%s' % raw_ext) + + # Large image that overwhelms older Mac bots + if 'MacMini4.1-GPU' in bot: + blacklist('_ image _ abnormal.wbmp') + blacklist(['msaa16', 'gm', '_', 'blurcircles']) + + if 'Nexus5' in bot: + # skia:5876 + blacklist(['msaa4', 'gm', '_', 'encode-platform']) + + match = [] + if 'Valgrind' in bot: # skia:3021 + match.append('~Threaded') + + if 'AndroidOne' in bot: # skia:4711 + match.append('~WritePixels') + + if 'NexusPlayer' in bot: + match.append('~ResourceCache') + + if 'Nexus10' in bot: + match.append('~CopySurface') # skia:5509 + match.append('~SRGBReadWritePixels') # skia:6097 + + if 'ANGLE' in bot and 'Debug' in bot: + match.append('~GLPrograms') # skia:4717 + + if 'MSAN' in bot: + match.extend(['~Once', '~Shared']) # Not sure what's up with these tests. + + if 'TSAN' in bot: + match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots. + match.extend(['~RGBA4444TextureTest', # Flakier than they are important. + '~RGB565TextureTest']) + + if 'Vulkan' in bot and 'Adreno' in bot: + # skia:5777 + match.extend(['~XfermodeImageFilterCroppedInput', + '~GrTextureStripAtlasFlush', + '~CopySurface']) + + if 'Vulkan' in bot and 'NexusPlayer' in bot: + match.extend(['~hardstop_gradient', # skia:6037 + '~gradients_dup_color_stops', # skia:6037 + '~gradients_no_texture$', # skia:6132 + '~tilemodes', # skia:6132 + '~shadertext$', # skia:6132 + '~bitmapfilters']) # skia:6132 + + if 'Vulkan' in bot and 'GTX1070' in bot and 'Win' in bot: + # skia:6092 + match.append('~GPUMemorySize') + + if 'IntelIris540' in bot and 'ANGLE' in bot: + match.append('~IntTexture') # skia:6086 + + if blacklisted: + args.append('--blacklist') + args.extend(blacklisted) + + if match: + args.append('--match') + args.extend(match) + + # These bots run out of memory running RAW codec tests. Do not run them in + # parallel + if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot + or 'Win8-MSVC-ShuttleB' in bot): + args.append('--noRAW_threading') + + return args + + +def key_params(api): + """Build a unique key from the builder name (as a list). + + E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6 + """ + # Don't bother to include role, which is always Test. + # TryBots are uploaded elsewhere so they can use the same key. + blacklist = ['role', 'is_trybot'] + + flat = [] + for k in sorted(api.vars.builder_cfg.keys()): + if k not in blacklist: + flat.append(k) + flat.append(api.vars.builder_cfg[k]) + return flat + + +def test_steps(api): + """Run the DM test.""" + use_hash_file = False + if api.vars.upload_dm_results: + # This must run before we write anything into + # api.flavor.device_dirs.dm_dir or we may end up deleting our + # output on machines where they're the same. + api.flavor.create_clean_host_dir(api.vars.dm_dir) + host_dm_dir = str(api.vars.dm_dir) + device_dm_dir = str(api.flavor.device_dirs.dm_dir) + if host_dm_dir != device_dm_dir: + api.flavor.create_clean_device_dir(device_dm_dir) + + # Obtain the list of already-generated hashes. + hash_filename = 'uninteresting_hashes.txt' + + # Ensure that the tmp_dir exists. + api.run.run_once(api.file.makedirs, + 'tmp_dir', + api.vars.tmp_dir, + infra_step=True) + + host_hashes_file = api.vars.tmp_dir.join(hash_filename) + hashes_file = api.flavor.device_path_join( + api.flavor.device_dirs.tmp_dir, hash_filename) + api.run( + api.python.inline, + 'get uninteresting hashes', + program=""" + import contextlib + import math + import socket + import sys + import time + import urllib2 + + HASHES_URL = 'https://gold.skia.org/_/hashes' + RETRIES = 5 + TIMEOUT = 60 + WAIT_BASE = 15 + + socket.setdefaulttimeout(TIMEOUT) + for retry in range(RETRIES): + try: + with contextlib.closing( + urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w: + hashes = w.read() + with open(sys.argv[1], 'w') as f: + f.write(hashes) + break + except Exception as e: + print 'Failed to get uninteresting hashes from %s:' % HASHES_URL + print e + if retry == RETRIES: + raise + waittime = WAIT_BASE * math.pow(2, retry) + print 'Retry in %d seconds.' % waittime + time.sleep(waittime) + """, + args=[host_hashes_file], + cwd=api.vars.skia_dir, + abort_on_failure=False, + fail_build_on_failure=False, + infra_step=True) + + if api.path.exists(host_hashes_file): + api.flavor.copy_file_to_device(host_hashes_file, hashes_file) + use_hash_file = True + + # Run DM. + properties = [ + 'gitHash', api.vars.got_revision, + 'master', api.vars.master_name, + 'builder', api.vars.builder_name, + 'build_number', api.vars.build_number, + ] + if api.vars.is_trybot: + properties.extend([ + 'issue', api.vars.issue, + 'patchset', api.vars.patchset, + 'patch_storage', api.vars.patch_storage, + ]) + if api.vars.no_buildbot: + properties.extend(['no_buildbot', 'True']) + properties.extend(['swarming_bot_id', api.vars.swarming_bot_id]) + properties.extend(['swarming_task_id', api.vars.swarming_task_id]) + + args = [ + 'dm', + '--undefok', # This helps branches that may not know new flags. + '--resourcePath', api.flavor.device_dirs.resource_dir, + '--skps', api.flavor.device_dirs.skp_dir, + '--images', api.flavor.device_path_join( + api.flavor.device_dirs.images_dir, 'dm'), + '--colorImages', api.flavor.device_path_join( + api.flavor.device_dirs.images_dir, 'colorspace'), + '--nameByHash', + '--properties' + ] + properties + + args.extend(['--svgs', api.flavor.device_dirs.svg_dir]) + + args.append('--key') + args.extend(key_params(api)) + if use_hash_file: + args.extend(['--uninterestingHashesFile', hashes_file]) + if api.vars.upload_dm_results: + args.extend(['--writePath', api.flavor.device_dirs.dm_dir]) + + skip_flag = None + if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': + skip_flag = '--nogpu' + elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': + skip_flag = '--nocpu' + if skip_flag: + args.append(skip_flag) + args.extend(dm_flags(api.vars.builder_name)) + + api.run(api.flavor.step, 'dm', cmd=args, + abort_on_failure=False, + env=api.vars.default_env) + + if api.vars.upload_dm_results: + # Copy images and JSON to host machine if needed. + api.flavor.copy_directory_contents_to_host( + api.flavor.device_dirs.dm_dir, api.vars.dm_dir) + + # See skia:2789. + if ('Valgrind' in api.vars.builder_name and + api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'): + abandonGpuContext = list(args) + abandonGpuContext.append('--abandonGpuContext') + api.run(api.flavor.step, 'dm --abandonGpuContext', + cmd=abandonGpuContext, abort_on_failure=False) + preAbandonGpuContext = list(args) + preAbandonGpuContext.append('--preAbandonGpuContext') + api.run(api.flavor.step, 'dm --preAbandonGpuContext', + cmd=preAbandonGpuContext, abort_on_failure=False, + env=api.vars.default_env) + + +class TestApi(recipe_api.RecipeApi): + def run(self): + self.m.core.setup() + try: + self.m.flavor.install_everything() + test_steps(self.m) + finally: + self.m.flavor.cleanup_steps() + self.m.run.check_failure() diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android.json new file mode 100644 index 0000000000..9e1bf32805 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm compiler Clang configuration Release cpu_or_gpu CPU cpu_or_gpu_value MT6582 extra_config GN_Android model AndroidOne os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nogpu --config 8888 srgb gpu gpudft gpusrgb msaa4 serialize-8888 tiles_rt-8888 pic-8888 --src tests gm image colorImage svg --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa --match ~WritePixels; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android.json new file mode 100644 index 0000000000..3406632a25 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm compiler Clang configuration Release cpu_or_gpu GPU cpu_or_gpu_value Mali400MP2 extra_config GN_Android model AndroidOne os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config 8888 srgb gpu gpudft gpusrgb msaa4 serialize-8888 tiles_rt-8888 pic-8888 --src tests gm image colorImage svg --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW --match ~WritePixels; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android.json new file mode 100644 index 0000000000..db11f2a5fb --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Debug/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm64 compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value Adreno530 extra_config GN_Android model GalaxyS7 os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config 8888 srgb gpu gpudft gpusrgb msaa4 serialize-8888 tiles_rt-8888 pic-8888 --src tests gm image colorImage svg --threads 0 --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Debug" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android.json new file mode 100644 index 0000000000..b739277a3f --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Debug/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm64 compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value TegraX1 extra_config GN_Android model NVIDIA_Shield os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config 8888 srgb gl gldft glsrgb glmsaa4 glinstdit4 serialize-8888 tiles_rt-8888 pic-8888 glinst --src tests gm image colorImage svg --blacklist glsrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Debug" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android.json new file mode 100644 index 0000000000..92bf966011 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm compiler Clang configuration Release cpu_or_gpu GPU cpu_or_gpu_value MaliT604 extra_config GN_Android model Nexus10 os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config 8888 srgb gpu gpudft gpusrgb msaa4 serialize-8888 tiles_rt-8888 pic-8888 --src tests gm image colorImage svg --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW --match ~CopySurface ~SRGBReadWritePixels; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android.json new file mode 100644 index 0000000000..e0af4f6235 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm compiler Clang configuration Release cpu_or_gpu GPU cpu_or_gpu_value Adreno330 extra_config Android model Nexus5 os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config 8888 srgb gpu gpudft gpusrgb msaa4 serialize-8888 tiles_rt-8888 pic-8888 --src tests gm image colorImage svg --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW msaa4 gm _ encode-platform --noRAW_threading; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android.json new file mode 100644 index 0000000000..48da2e3b6f --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Debug/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value Adreno420 extra_config GN_Android model Nexus6 os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config 8888 srgb gpu gpudft gpusrgb msaa4 serialize-8888 tiles_rt-8888 pic-8888 esinst --src tests gm image colorImage svg --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Debug" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan.json new file mode 100644 index 0000000000..bb07359b71 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Debug/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm64 compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value Adreno430 extra_config GN_Android_Vulkan model Nexus6p os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config vk --src tests gm image colorImage svg --blacklist _ test _ GrShape _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW --match ~XfermodeImageFilterCroppedInput ~GrTextureStripAtlasFlush ~CopySurface; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Debug" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android.json new file mode 100644 index 0000000000..62bb13d740 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Debug/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value Tegra3 extra_config GN_Android model Nexus7 os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config 8888 srgb gpu gpudft gpusrgb serialize-8888 tiles_rt-8888 pic-8888 --src tests gm image colorImage svg --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Debug" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android.json new file mode 100644 index 0000000000..2b9b16d0da --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch x86 compiler Clang configuration Release cpu_or_gpu CPU cpu_or_gpu_value SSE4 extra_config GN_Android model NexusPlayer os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nogpu --config 8888 srgb gpu gpusrgb --src tests gm image colorImage svg --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape --match ~ResourceCache --noRAW_threading; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json new file mode 100644 index 0000000000..75e19b3007 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Release/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch x86 compiler Clang configuration Release cpu_or_gpu GPU cpu_or_gpu_value PowerVR extra_config GN_Android_Vulkan model NexusPlayer os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config vk --src tests gm image colorImage --blacklist _ test _ GrShape _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW --match ~ResourceCache ~hardstop_gradient ~gradients_dup_color_stops ~gradients_no_texture$ ~tilemodes ~shadertext$ ~bitmapfilters --noRAW_threading; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Release" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android.json new file mode 100644 index 0000000000..d5c5b38b9f --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android.json @@ -0,0 +1,606 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Debug/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android build_number 5 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm64 compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value TegraX1 extra_config GN_Android model PixelC os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config 8888 srgb gpu gpudft gpusrgb msaa4 esinstdit4 serialize-8888 tiles_rt-8888 pic-8888 esinst --src tests gm image colorImage svg --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Debug" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug.json new file mode 100644 index 0000000000..84335d6f77 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug.json @@ -0,0 +1,627 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "Clang", + "configuration", + "Debug", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "GeForce320M", + "model", + "MacMini4.1", + "os", + "Mac", + "--uninterestingHashesFile", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "--nocpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "frame_larger_than_image.gif", + "_", + "image", + "gen_platf", + "inc0.png", + "_", + "image", + "gen_platf", + "inc1.png", + "_", + "image", + "gen_platf", + "inc2.png", + "_", + "image", + "gen_platf", + "inc3.png", + "_", + "image", + "gen_platf", + "inc4.png", + "_", + "image", + "gen_platf", + "inc5.png", + "_", + "image", + "gen_platf", + "inc6.png", + "_", + "image", + "gen_platf", + "inc7.png", + "_", + "image", + "gen_platf", + "inc8.png", + "_", + "image", + "gen_platf", + "inc9.png", + "_", + "image", + "gen_platf", + "inc10.png", + "_", + "image", + "gen_platf", + "inc11.png", + "_", + "image", + "gen_platf", + "inc12.png", + "_", + "image", + "gen_platf", + "inc13.png", + "_", + "image", + "gen_platf", + "inc14.png", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "pic-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW", + "_", + "image", + "_", + "abnormal.wbmp", + "msaa16", + "gm", + "_", + "blurcircles" + ], + "cwd": "[START_DIR]/skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug.json new file mode 100644 index 0000000000..09c180e93b --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug.json @@ -0,0 +1,529 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "Clang", + "configuration", + "Debug", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX", + "model", + "MacMini6.2", + "os", + "Mac", + "--uninterestingHashesFile", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "--nogpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "glinst", + "glinst16", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "frame_larger_than_image.gif", + "_", + "image", + "gen_platf", + "inc0.png", + "_", + "image", + "gen_platf", + "inc1.png", + "_", + "image", + "gen_platf", + "inc2.png", + "_", + "image", + "gen_platf", + "inc3.png", + "_", + "image", + "gen_platf", + "inc4.png", + "_", + "image", + "gen_platf", + "inc5.png", + "_", + "image", + "gen_platf", + "inc6.png", + "_", + "image", + "gen_platf", + "inc7.png", + "_", + "image", + "gen_platf", + "inc8.png", + "_", + "image", + "gen_platf", + "inc9.png", + "_", + "image", + "gen_platf", + "inc10.png", + "_", + "image", + "gen_platf", + "inc11.png", + "_", + "image", + "gen_platf", + "inc12.png", + "_", + "image", + "gen_platf", + "inc13.png", + "_", + "image", + "gen_platf", + "inc14.png", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "pic-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa" + ], + "cwd": "[START_DIR]/skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer.json new file mode 100644 index 0000000000..21e42dc0e2 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer.json @@ -0,0 +1,424 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "Clang", + "configuration", + "Debug", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "HD4000", + "extra_config", + "CommandBuffer", + "model", + "MacMini6.2", + "os", + "Mac", + "--uninterestingHashesFile", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "--nocpu", + "--config", + "commandbuffer", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "frame_larger_than_image.gif", + "_", + "image", + "gen_platf", + "inc0.png", + "_", + "image", + "gen_platf", + "inc1.png", + "_", + "image", + "gen_platf", + "inc2.png", + "_", + "image", + "gen_platf", + "inc3.png", + "_", + "image", + "gen_platf", + "inc4.png", + "_", + "image", + "gen_platf", + "inc5.png", + "_", + "image", + "gen_platf", + "inc6.png", + "_", + "image", + "gen_platf", + "inc7.png", + "_", + "image", + "gen_platf", + "inc8.png", + "_", + "image", + "gen_platf", + "inc9.png", + "_", + "image", + "gen_platf", + "inc10.png", + "_", + "image", + "gen_platf", + "inc11.png", + "_", + "image", + "gen_platf", + "inc12.png", + "_", + "image", + "gen_platf", + "inc13.png", + "_", + "image", + "gen_platf", + "inc14.png", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW" + ], + "cwd": "[START_DIR]/skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug.json new file mode 100644 index 0000000000..119556e5fb --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug.json @@ -0,0 +1,527 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "catchsegv", + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86", + "compiler", + "GCC", + "configuration", + "Debug", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "model", + "GCE", + "os", + "Ubuntu", + "--uninterestingHashesFile", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "--nogpu", + "--threads", + "4", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "565", + "f16", + "sp-8888", + "2ndpic-8888", + "lite-8888", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "f16", + "_", + "_", + "dstreadshuffle", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "sp-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "drawfilter", + "2ndpic-8888", + "gm", + "_", + "drawfilter", + "lite-8888", + "gm", + "_", + "drawfilter", + "sp-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "sp-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "sp-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "sp-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "gamut", + "lite-8888", + "gm", + "_", + "gamut", + "2ndpic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "sp-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "lite-8888", + "gm", + "_", + "complexclip4_bw", + "2ndpic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "sp-8888", + "gm", + "_", + "complexclip4_aa", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "lite-8888", + "gm", + "_", + "complexclip4_aa", + "2ndpic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa" + ], + "cwd": "[START_DIR]/skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN.json new file mode 100644 index 0000000000..3691e2d4de --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN.json @@ -0,0 +1,414 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "configuration", + "Debug", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "extra_config", + "ASAN", + "model", + "GCE", + "os", + "Ubuntu", + "--nogpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "565", + "f16", + "sp-8888", + "2ndpic-8888", + "lite-8888", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "f16", + "_", + "_", + "dstreadshuffle", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "sp-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "drawfilter", + "2ndpic-8888", + "gm", + "_", + "drawfilter", + "lite-8888", + "gm", + "_", + "drawfilter", + "sp-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "sp-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "sp-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "sp-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "gamut", + "lite-8888", + "gm", + "_", + "gamut", + "2ndpic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "sp-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "lite-8888", + "gm", + "_", + "complexclip4_bw", + "2ndpic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "sp-8888", + "gm", + "_", + "complexclip4_aa", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "lite-8888", + "gm", + "_", + "complexclip4_aa", + "2ndpic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa" + ], + "cwd": "[START_DIR]/skia", + "env": { + "ASAN_OPTIONS": "symbolize=1 detect_leaks=1", + "LSAN_OPTIONS": "symbolize=1 print_suppressions=1", + "PATH": "%(PATH)s:[START_DIR]/clang_linux/bin", + "UBSAN_OPTIONS": "symbolize=1 print_stacktrace=1" + }, + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json new file mode 100644 index 0000000000..a7265ad14d --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json @@ -0,0 +1,415 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "configuration", + "Debug", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "extra_config", + "MSAN", + "model", + "GCE", + "os", + "Ubuntu", + "--nogpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "565", + "f16", + "sp-8888", + "2ndpic-8888", + "lite-8888", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "f16", + "_", + "_", + "dstreadshuffle", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "sp-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "drawfilter", + "2ndpic-8888", + "gm", + "_", + "drawfilter", + "lite-8888", + "gm", + "_", + "drawfilter", + "sp-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "sp-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "sp-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "sp-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "gamut", + "lite-8888", + "gm", + "_", + "gamut", + "2ndpic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "sp-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "lite-8888", + "gm", + "_", + "complexclip4_bw", + "2ndpic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "sp-8888", + "gm", + "_", + "complexclip4_aa", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "lite-8888", + "gm", + "_", + "complexclip4_aa", + "2ndpic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "--match", + "~Once", + "~Shared" + ], + "cwd": "[START_DIR]/skia", + "env": { + "LD_LIBRARY_PATH": "[START_DIR]/clang_linux/msan", + "PATH": "%(PATH)s:[START_DIR]/clang_linux/bin" + }, + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug.json new file mode 100644 index 0000000000..c4248ae3db --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug.json @@ -0,0 +1,525 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "catchsegv", + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "configuration", + "Debug", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "model", + "GCE", + "os", + "Ubuntu", + "--uninterestingHashesFile", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "--nogpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "565", + "f16", + "sp-8888", + "2ndpic-8888", + "lite-8888", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "f16", + "_", + "_", + "dstreadshuffle", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "sp-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "drawfilter", + "2ndpic-8888", + "gm", + "_", + "drawfilter", + "lite-8888", + "gm", + "_", + "drawfilter", + "sp-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "sp-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "sp-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "sp-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "gamut", + "lite-8888", + "gm", + "_", + "gamut", + "2ndpic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "sp-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "lite-8888", + "gm", + "_", + "complexclip4_bw", + "2ndpic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "sp-8888", + "gm", + "_", + "complexclip4_aa", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "lite-8888", + "gm", + "_", + "complexclip4_aa", + "2ndpic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa" + ], + "cwd": "[START_DIR]/skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared.json new file mode 100644 index 0000000000..7a822cd1b7 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared.json @@ -0,0 +1,527 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "catchsegv", + "[START_DIR]/out/Release/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "configuration", + "Release", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "extra_config", + "Shared", + "model", + "GCE", + "os", + "Ubuntu", + "--uninterestingHashesFile", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "--nogpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "565", + "f16", + "sp-8888", + "2ndpic-8888", + "lite-8888", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "f16", + "_", + "_", + "dstreadshuffle", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "sp-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "drawfilter", + "2ndpic-8888", + "gm", + "_", + "drawfilter", + "lite-8888", + "gm", + "_", + "drawfilter", + "sp-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "sp-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "sp-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "sp-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "gamut", + "lite-8888", + "gm", + "_", + "gamut", + "2ndpic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "sp-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "lite-8888", + "gm", + "_", + "complexclip4_bw", + "2ndpic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "sp-8888", + "gm", + "_", + "complexclip4_aa", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "lite-8888", + "gm", + "_", + "complexclip4_aa", + "2ndpic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa" + ], + "cwd": "[START_DIR]/skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN.json new file mode 100644 index 0000000000..111c924432 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN.json @@ -0,0 +1,415 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/out/Release/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "configuration", + "Release", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "extra_config", + "TSAN", + "model", + "GCE", + "os", + "Ubuntu", + "--nogpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "565", + "f16", + "sp-8888", + "2ndpic-8888", + "lite-8888", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "f16", + "_", + "_", + "dstreadshuffle", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "sp-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "drawfilter", + "2ndpic-8888", + "gm", + "_", + "drawfilter", + "lite-8888", + "gm", + "_", + "drawfilter", + "sp-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "sp-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "sp-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "sp-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "gamut", + "lite-8888", + "gm", + "_", + "gamut", + "2ndpic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "sp-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "lite-8888", + "gm", + "_", + "complexclip4_bw", + "2ndpic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "sp-8888", + "gm", + "_", + "complexclip4_aa", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "lite-8888", + "gm", + "_", + "complexclip4_aa", + "2ndpic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "--match", + "~ReadWriteAlpha", + "~RGBA4444TextureTest", + "~RGB565TextureTest" + ], + "cwd": "[START_DIR]/skia", + "env": { + "PATH": "%(PATH)s:[START_DIR]/clang_linux/bin" + }, + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json new file mode 100644 index 0000000000..3cfa9a4141 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json @@ -0,0 +1,1239 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "valgrind", + "--gen-suppressions=all", + "--leak-check=full", + "--track-origins=yes", + "--error-exitcode=1", + "--num-callers=40", + "--suppressions=[START_DIR]/skia/tools/valgrind.supp", + "[START_DIR]/out/Release/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "configuration", + "Release", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "GTX550Ti", + "extra_config", + "Valgrind", + "model", + "ShuttleA", + "os", + "Ubuntu", + "--nocpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "nvprdit16", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "pdf", + "gm", + "_", + "fontmgr_iter", + "pdf", + "_", + "_", + "PANO_20121023_214540.jpg", + "pdf", + "skp", + "_", + "worldjournal", + "pdf", + "skp", + "_", + "desk_baidu.skp", + "pdf", + "skp", + "_", + "desk_wikipedia.skp", + "_", + "svg", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "pic-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW", + "--match", + "~Threaded" + ], + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "dm" + }, + { + "cmd": [ + "valgrind", + "--gen-suppressions=all", + "--leak-check=full", + "--track-origins=yes", + "--error-exitcode=1", + "--num-callers=40", + "--suppressions=[START_DIR]/skia/tools/valgrind.supp", + "[START_DIR]/out/Release/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "configuration", + "Release", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "GTX550Ti", + "extra_config", + "Valgrind", + "model", + "ShuttleA", + "os", + "Ubuntu", + "--nocpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "nvprdit16", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "pdf", + "gm", + "_", + "fontmgr_iter", + "pdf", + "_", + "_", + "PANO_20121023_214540.jpg", + "pdf", + "skp", + "_", + "worldjournal", + "pdf", + "skp", + "_", + "desk_baidu.skp", + "pdf", + "skp", + "_", + "desk_wikipedia.skp", + "_", + "svg", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "pic-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW", + "--match", + "~Threaded", + "--abandonGpuContext" + ], + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "dm --abandonGpuContext" + }, + { + "cmd": [ + "valgrind", + "--gen-suppressions=all", + "--leak-check=full", + "--track-origins=yes", + "--error-exitcode=1", + "--num-callers=40", + "--suppressions=[START_DIR]/skia/tools/valgrind.supp", + "[START_DIR]/out/Release/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind", + "build_number", + "5", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "configuration", + "Release", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "GTX550Ti", + "extra_config", + "Valgrind", + "model", + "ShuttleA", + "os", + "Ubuntu", + "--nocpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "nvprdit16", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "pdf", + "gm", + "_", + "fontmgr_iter", + "pdf", + "_", + "_", + "PANO_20121023_214540.jpg", + "pdf", + "skp", + "_", + "worldjournal", + "pdf", + "skp", + "_", + "desk_baidu.skp", + "pdf", + "skp", + "_", + "desk_wikipedia.skp", + "_", + "svg", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "pic-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW", + "--match", + "~Threaded", + "--preAbandonGpuContext" + ], + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "dm --preAbandonGpuContext" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-ANGLE.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-ANGLE.json new file mode 100644 index 0000000000..4472f5443d --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-ANGLE.json @@ -0,0 +1,382 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]\\tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]\\tmp\\uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]\\skia", + "env": { + "BUILDTYPE": "Debug_x64", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]\\out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Debug_x64\\dm", + "--undefok", + "--resourcePath", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\dm", + "--colorImages", + "[START_DIR]\\skimage\\colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-ANGLE", + "build_number", + "5", + "--svgs", + "[START_DIR]\\svg", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "configuration", + "Debug", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "IntelIris540", + "extra_config", + "ANGLE", + "model", + "NUC", + "os", + "Win10", + "--uninterestingHashesFile", + "[START_DIR]\\tmp\\uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "--nocpu", + "--config", + "angle_d3d11_es2", + "angle_d3d9_es2", + "angle_d3d11_es2_msaa4", + "angle_gl_es2", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "_", + "image", + "gen_platf", + "rle8-height-negative.bmp", + "_", + "image", + "gen_platf", + "rle4-height-negative.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2-16.bmp", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW", + "--match", + "~GLPrograms", + "~IntTexture" + ], + "cwd": "[START_DIR]\\skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json new file mode 100644 index 0000000000..b44fc614c1 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json @@ -0,0 +1,376 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]\\tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]\\tmp\\uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]\\skia", + "env": { + "BUILDTYPE": "Debug_x64", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]\\out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Debug_x64\\dm", + "--undefok", + "--resourcePath", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\dm", + "--colorImages", + "[START_DIR]\\skimage\\colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan", + "build_number", + "5", + "--svgs", + "[START_DIR]\\svg", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "configuration", + "Debug", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "GTX660", + "extra_config", + "Vulkan", + "model", + "ShuttleA", + "os", + "Win10", + "--uninterestingHashesFile", + "[START_DIR]\\tmp\\uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "--nocpu", + "--config", + "vk", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "_", + "image", + "gen_platf", + "rle8-height-negative.bmp", + "_", + "image", + "gen_platf", + "rle4-height-negative.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2-16.bmp", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW" + ], + "cwd": "[START_DIR]\\skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan.json new file mode 100644 index 0000000000..0e17c8c4d5 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan.json @@ -0,0 +1,378 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]\\tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]\\tmp\\uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]\\skia", + "env": { + "BUILDTYPE": "Debug_x64", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]\\out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Debug_x64\\dm", + "--undefok", + "--resourcePath", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\dm", + "--colorImages", + "[START_DIR]\\skimage\\colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan", + "build_number", + "5", + "--svgs", + "[START_DIR]\\svg", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "configuration", + "Debug", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "GTX1070", + "extra_config", + "Vulkan", + "model", + "ZBOX", + "os", + "Win10", + "--uninterestingHashesFile", + "[START_DIR]\\tmp\\uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "--nocpu", + "--config", + "vk", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "_", + "image", + "gen_platf", + "rle8-height-negative.bmp", + "_", + "image", + "gen_platf", + "rle4-height-negative.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2-16.bmp", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW", + "--match", + "~GPUMemorySize" + ], + "cwd": "[START_DIR]\\skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot.json new file mode 100644 index 0000000000..1801ba154b --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot.json @@ -0,0 +1,514 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]\\tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]\\tmp\\uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]\\skia", + "env": { + "BUILDTYPE": "Release_x64", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]\\out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Release_x64\\dm", + "--undefok", + "--resourcePath", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\dm", + "--colorImages", + "[START_DIR]\\skimage\\colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot", + "build_number", + "5", + "issue", + "500", + "patchset", + "1", + "patch_storage", + "rietveld", + "--svgs", + "[START_DIR]\\svg", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "configuration", + "Release", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "model", + "ShuttleB", + "os", + "Win8", + "--uninterestingHashesFile", + "[START_DIR]\\tmp\\uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "--nogpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "_", + "image", + "gen_platf", + "rle8-height-negative.bmp", + "_", + "image", + "gen_platf", + "rle4-height-negative.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2-16.bmp", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "gm", + "_", + "composeshader_bitmap", + "_", + "gm", + "_", + "fontscalerdistortable", + "_", + "svg", + "_", + "Nebraska-StateSeal.svg", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "serialize-8888", + "gm", + "_", + "verylargebitmap", + "serialize-8888", + "gm", + "_", + "verylarge_picture_image", + "pic-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "--noRAW_threading" + ], + "cwd": "[START_DIR]\\skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json new file mode 100644 index 0000000000..7b5a76d0f5 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json @@ -0,0 +1,390 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]\\tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]\\tmp\\uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]\\skia", + "env": { + "BUILDTYPE": "Debug_x64", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]\\out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Debug_x64\\dm", + "--undefok", + "--resourcePath", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\dm", + "--colorImages", + "[START_DIR]\\skimage\\colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE", + "build_number", + "5", + "--svgs", + "[START_DIR]\\svg", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "configuration", + "Debug", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "GTX960", + "extra_config", + "ANGLE", + "model", + "ShuttleB", + "os", + "Win8", + "--uninterestingHashesFile", + "[START_DIR]\\tmp\\uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "--nocpu", + "--config", + "angle_d3d11_es2", + "angle_d3d9_es2", + "angle_d3d11_es2_msaa4", + "angle_gl_es2", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "_", + "image", + "gen_platf", + "rle8-height-negative.bmp", + "_", + "image", + "gen_platf", + "rle4-height-negative.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2-16.bmp", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "gm", + "_", + "fontscalerdistortable", + "_", + "svg", + "_", + "Nebraska-StateSeal.svg", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW", + "--match", + "~GLPrograms", + "--noRAW_threading" + ], + "cwd": "[START_DIR]\\skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json b/infra/bots/recipe_modules/sktest/example.expected/Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json new file mode 100644 index 0000000000..598f218428 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json @@ -0,0 +1,988 @@ +[ + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_install" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "install iOSShell" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/skia/resources", + "skiabot/skia_resources" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push resources to skia_resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file", + "skiabot/skia_tmp_dir/SKP_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "read SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_tmp_dir/SKP_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rm skiabot/skia_tmp_dir/SKP_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_skp/skps" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_skp/skps" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_skp/skps" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_skp/skps" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/skp", + "skiabot/skia_skp/skps" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push skp to skps" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/SKP_VERSION", + "skiabot/skia_tmp_dir/SKP_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file", + "skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "read SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rm skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_images" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_images" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_images" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_images" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/skimage", + "skiabot/skia_images" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push skimage to skia_images" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file", + "skiabot/skia_tmp_dir/SVG_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "read SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_tmp_dir/SVG_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rm skiabot/skia_tmp_dir/SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_svg/svgs" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_svg/svgs" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_svg/svgs" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_svg/svgs" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/svg", + "skiabot/skia_svg/svgs" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push svg to svgs" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/SVG_VERSION", + "skiabot/skia_tmp_dir/SVG_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_dm" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_dm" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_dm" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "skiabot/skia_tmp_dir/uninteresting_hashes.txt" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_run_skia", + "--dm", + "--undefok", + "--resourcePath", + "skiabot/skia_resources", + "--skps", + "skiabot/skia_skp/skps", + "--images", + "skiabot/skia_images/dm", + "--colorImages", + "skiabot/skia_images/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug", + "build_number", + "5", + "--svgs", + "skiabot/skia_svg/svgs", + "--key", + "arch", + "Arm7", + "compiler", + "Clang", + "configuration", + "Debug", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "SGX554", + "model", + "iPad4", + "os", + "iOS", + "--uninterestingHashesFile", + "skiabot/skia_tmp_dir/uninteresting_hashes.txt", + "--writePath", + "skiabot/skia_dm", + "--nocpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "gpu", + "skp", + "_", + "_", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "frame_larger_than_image.gif", + "_", + "image", + "gen_platf", + "inc0.png", + "_", + "image", + "gen_platf", + "inc1.png", + "_", + "image", + "gen_platf", + "inc2.png", + "_", + "image", + "gen_platf", + "inc3.png", + "_", + "image", + "gen_platf", + "inc4.png", + "_", + "image", + "gen_platf", + "inc5.png", + "_", + "image", + "gen_platf", + "inc6.png", + "_", + "image", + "gen_platf", + "inc7.png", + "_", + "image", + "gen_platf", + "inc8.png", + "_", + "image", + "gen_platf", + "inc9.png", + "_", + "image", + "gen_platf", + "inc10.png", + "_", + "image", + "gen_platf", + "inc11.png", + "_", + "image", + "gen_platf", + "inc12.png", + "_", + "image", + "gen_platf", + "inc13.png", + "_", + "image", + "gen_platf", + "inc14.png", + "_", + "test", + "_", + "GrShape", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "pic-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "dm" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_pull_if_needed", + "skiabot/skia_dm", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "pull skia_dm" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_restart" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "reboot" + }, + { + "cmd": [ + "sleep", + "20" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "wait for reboot" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/big_issue_number.json b/infra/bots/recipe_modules/sktest/example.expected/big_issue_number.json new file mode 100644 index 0000000000..528fd87285 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/big_issue_number.json @@ -0,0 +1,514 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]\\skia\\infra\\bots\\.recipe_deps\\build\\scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]\\tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]\\tmp\\uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]\\skia", + "env": { + "BUILDTYPE": "Release_x64", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]\\out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]\\out\\Release_x64\\dm", + "--undefok", + "--resourcePath", + "[START_DIR]\\skia\\resources", + "--skps", + "[START_DIR]\\skp", + "--images", + "[START_DIR]\\skimage\\dm", + "--colorImages", + "[START_DIR]\\skimage\\colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia.compile", + "builder", + "Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot", + "build_number", + "5", + "issue", + "2147533002", + "patchset", + "1", + "patch_storage", + "rietveld", + "--svgs", + "[START_DIR]\\svg", + "--key", + "arch", + "x86_64", + "compiler", + "MSVC", + "configuration", + "Release", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "model", + "ShuttleB", + "os", + "Win8", + "--uninterestingHashesFile", + "[START_DIR]\\tmp\\uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]\\dm", + "--nogpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "_", + "image", + "gen_platf", + "rle8-height-negative.bmp", + "_", + "image", + "gen_platf", + "rle4-height-negative.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2.bmp", + "_", + "image", + "gen_platf", + "pal8os2v2-16.bmp", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "gm", + "_", + "composeshader_bitmap", + "_", + "gm", + "_", + "fontscalerdistortable", + "_", + "svg", + "_", + "Nebraska-StateSeal.svg", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "serialize-8888", + "gm", + "_", + "verylargebitmap", + "serialize-8888", + "gm", + "_", + "verylarge_picture_image", + "pic-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "--noRAW_threading" + ], + "cwd": "[START_DIR]\\skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/failed_dm.json b/infra/bots/recipe_modules/sktest/example.expected/failed_dm.json new file mode 100644 index 0000000000..ae725b12b5 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/failed_dm.json @@ -0,0 +1,530 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "catchsegv", + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug", + "build_number", + "6", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86_64", + "compiler", + "GCC", + "configuration", + "Debug", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "model", + "GCE", + "os", + "Ubuntu", + "--uninterestingHashesFile", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "--nogpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "565", + "f16", + "sp-8888", + "2ndpic-8888", + "lite-8888", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "f16", + "_", + "_", + "dstreadshuffle", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "sp-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "drawfilter", + "2ndpic-8888", + "gm", + "_", + "drawfilter", + "lite-8888", + "gm", + "_", + "drawfilter", + "sp-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "sp-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "sp-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "sp-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "gamut", + "lite-8888", + "gm", + "_", + "gamut", + "2ndpic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "sp-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "lite-8888", + "gm", + "_", + "complexclip4_bw", + "2ndpic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "sp-8888", + "gm", + "_", + "complexclip4_aa", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "lite-8888", + "gm", + "_", + "complexclip4_aa", + "2ndpic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa" + ], + "cwd": "[START_DIR]/skia", + "name": "dm", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "name": "$result", + "reason": "Failed build steps: dm", + "recipe_result": null, + "status_code": 1 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/failed_get_hashes.json b/infra/bots/recipe_modules/sktest/example.expected/failed_get_hashes.json new file mode 100644 index 0000000000..8a36e6e907 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/failed_get_hashes.json @@ -0,0 +1,608 @@ +[ + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skia/resources", + "/sdcard/revenge_of_the_skiabot/resources" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/skps" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skp", + "/sdcard/revenge_of_the_skiabot/skps" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SKP_VERSION", + "/sdcard/revenge_of_the_skiabot/SKP_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/images" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/skimage", + "/sdcard/revenge_of_the_skiabot/images" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "cat", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-f", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n subprocess.check_call(['adb', 'push',\n os.path.realpath(os.path.join(host, p, f)),\n os.path.join(device, p, f)])\n", + "[START_DIR]/svg", + "/sdcard/revenge_of_the_skiabot/svgs" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@host = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@device = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@for d, _, fs in os.walk(host):@@@", + "@@@STEP_LOG_LINE@python.inline@ p = os.path.relpath(d, host)@@@", + "@@@STEP_LOG_LINE@python.inline@ if p != '.' and p.startswith('.'):@@@", + "@@@STEP_LOG_LINE@python.inline@ continue@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in fs:@@@", + "@@@STEP_LOG_LINE@python.inline@ print os.path.join(p,f)@@@", + "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['adb', 'push',@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.realpath(os.path.join(host, p, f)),@@@", + "@@@STEP_LOG_LINE@python.inline@ os.path.join(device, p, f)])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/SVG_VERSION", + "/sdcard/revenge_of_the_skiabot/SVG_VERSION" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "shell", + "rm", + "-rf", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "adb", + "shell", + "mkdir", + "-p", + "/sdcard/revenge_of_the_skiabot/dm_out" + ], + "cwd": "[START_DIR]/skia", + "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "get uninteresting hashes", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@", + "@@@STEP_EXCEPTION@@@" + ] + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/out/Debug/dm", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "set -x; /data/local/tmp/dm --undefok --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 master client.skia builder Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android build_number 6 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value Tegra3 extra_config GN_Android model Nexus7 os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --nocpu --config 8888 srgb gpu gpudft gpusrgb serialize-8888 tiles_rt-8888 pic-8888 --src tests gm image colorImage svg --blacklist gpusrgb image _ _ 8888 image _ _ _ test _ GrShape serialize-8888 gm _ bleed_image serialize-8888 gm _ c_gms serialize-8888 gm _ colortype serialize-8888 gm _ colortype_xfermodes serialize-8888 gm _ drawfilter serialize-8888 gm _ fontmgr_bounds_0.75_0 serialize-8888 gm _ fontmgr_bounds_1_-0.25 serialize-8888 gm _ fontmgr_bounds serialize-8888 gm _ fontmgr_match serialize-8888 gm _ fontmgr_iter serialize-8888 gm _ imagemasksubset serialize-8888 gm _ bitmapfilters serialize-8888 gm _ bitmapshaders serialize-8888 gm _ bleed serialize-8888 gm _ bleed_alpha_bmp serialize-8888 gm _ bleed_alpha_bmp_shader serialize-8888 gm _ convex_poly_clip serialize-8888 gm _ extractalpha serialize-8888 gm _ filterbitmap_checkerboard_32_32_g8 serialize-8888 gm _ filterbitmap_image_mandrill_64 serialize-8888 gm _ shadows serialize-8888 gm _ simpleaaclip_aaclip serialize-8888 gm _ composeshader_bitmap serialize-8888 gm _ scaled_tilemodes_npot serialize-8888 gm _ scaled_tilemodes serialize-8888 gm _ typefacerendering_pfaMac serialize-8888 gm _ parsedpaths serialize-8888 gm _ ImageGeneratorExternal_rect serialize-8888 gm _ ImageGeneratorExternal_shader serialize-8888 gm _ shadow_utils serialize-8888 gm _ bleed_alpha_image serialize-8888 gm _ bleed_alpha_image_shader serialize-8888 gm _ verylargebitmap serialize-8888 gm _ verylarge_picture_image pic-8888 gm _ drawfilter pic-8888 gm _ image-cacherator-from-picture serialize-8888 gm _ image-cacherator-from-picture pic-8888 gm _ image-cacherator-from-raster serialize-8888 gm _ image-cacherator-from-raster pic-8888 gm _ image-cacherator-from-ctable serialize-8888 gm _ image-cacherator-from-ctable pic-8888 gm _ gamut serialize-8888 gm _ gamut pic-8888 gm _ complexclip4_bw serialize-8888 gm _ complexclip4_bw pic-8888 gm _ complexclip4_aa serialize-8888 gm _ complexclip4_aa tiles_rt-8888 gm _ complexclip4_bw tiles_rt-8888 gm _ complexclip4_aa _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW; echo $? >/data/local/tmp/rc", + "[START_DIR]/tmp/dm.sh" + ], + "name": "write dm.sh" + }, + { + "cmd": [ + "adb", + "push", + "[START_DIR]/tmp/dm.sh", + "/data/local/tmp/" + ], + "cwd": "[START_DIR]/skia", + "name": "push dm.sh" + }, + { + "cmd": [ + "adb", + "logcat", + "-c" + ], + "cwd": "[START_DIR]/skia", + "name": "clear log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", + "/data/local/tmp/", + "dm.sh" + ], + "name": "dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',@@@", + "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", + "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "pull", + "/sdcard/revenge_of_the_skiabot/dm_out", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "cwd": "[START_DIR]/skia", + "name": "pull /sdcard/revenge_of_the_skiabot/dm_out [CUSTOM_[SWARM_OUT_DIR]]/dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n print line\n", + "[START_DIR]/out/Debug" + ], + "name": "dump log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['adb', 'logcat', '-d'])@@@", + "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", + "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", + "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", + "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", + "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", + "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", + "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", + "@@@STEP_LOG_LINE@python.inline@ print line@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "adb", + "kill-server" + ], + "cwd": "[START_DIR]/skia", + "name": "kill adb server" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/missing_SKP_VERSION_device.json b/infra/bots/recipe_modules/sktest/example.expected/missing_SKP_VERSION_device.json new file mode 100644 index 0000000000..2e340afdb7 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/missing_SKP_VERSION_device.json @@ -0,0 +1,992 @@ +[ + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_install" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "install iOSShell" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/skia/resources", + "skiabot/skia_resources" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push resources to skia_resources" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file", + "skiabot/skia_tmp_dir/SKP_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "read SKP_VERSION", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_EXCEPTION@@@" + ] + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_tmp_dir/SKP_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rm skiabot/skia_tmp_dir/SKP_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_skp/skps" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_skp/skps" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_skp/skps" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_skp/skps" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/skp", + "skiabot/skia_skp/skps" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push skp to skps" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/SKP_VERSION", + "skiabot/skia_tmp_dir/SKP_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file", + "skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "read SK_IMAGE_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rm skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_images" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_images" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_images" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_images" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/skimage", + "skiabot/skia_images" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push skimage to skia_images" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/SK_IMAGE_VERSION", + "skiabot/skia_tmp_dir/SK_IMAGE_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_cat_file", + "skiabot/skia_tmp_dir/SVG_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "read SVG_VERSION", + "stdout": "/path/to/tmp/" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_tmp_dir/SVG_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rm skiabot/skia_tmp_dir/SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_svg/svgs" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_svg/svgs" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_svg/svgs" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_svg/svgs" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_if_needed", + "[START_DIR]/svg", + "skiabot/skia_svg/svgs" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push svg to svgs" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/SVG_VERSION", + "skiabot/skia_tmp_dir/SVG_VERSION" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_rm", + "skiabot/skia_dm" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "rmdir skiabot/skia_dm" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_mkdir", + "skiabot/skia_dm" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "mkdir skiabot/skia_dm" + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_push_file", + "[START_DIR]/tmp/uninteresting_hashes.txt", + "skiabot/skia_tmp_dir/uninteresting_hashes.txt" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "push [START_DIR]/tmp/uninteresting_hashes.txt" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_run_skia", + "--dm", + "--undefok", + "--resourcePath", + "skiabot/skia_resources", + "--skps", + "skiabot/skia_skp/skps", + "--images", + "skiabot/skia_images/dm", + "--colorImages", + "skiabot/skia_images/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "client.skia", + "builder", + "Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug", + "build_number", + "6", + "--svgs", + "skiabot/skia_svg/svgs", + "--key", + "arch", + "Arm7", + "compiler", + "Clang", + "configuration", + "Debug", + "cpu_or_gpu", + "GPU", + "cpu_or_gpu_value", + "SGX554", + "model", + "iPad4", + "os", + "iOS", + "--uninterestingHashesFile", + "skiabot/skia_tmp_dir/uninteresting_hashes.txt", + "--writePath", + "skiabot/skia_dm", + "--nocpu", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "gpu", + "skp", + "_", + "_", + "_", + "image", + "gen_platf", + "rgba32abf.bmp", + "_", + "image", + "gen_platf", + "rgb24prof.bmp", + "_", + "image", + "gen_platf", + "rgb24lprof.bmp", + "_", + "image", + "gen_platf", + "8bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "4bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "32bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "24bpp-pixeldata-cropped.bmp", + "_", + "image", + "gen_platf", + "frame_larger_than_image.gif", + "_", + "image", + "gen_platf", + "inc0.png", + "_", + "image", + "gen_platf", + "inc1.png", + "_", + "image", + "gen_platf", + "inc2.png", + "_", + "image", + "gen_platf", + "inc3.png", + "_", + "image", + "gen_platf", + "inc4.png", + "_", + "image", + "gen_platf", + "inc5.png", + "_", + "image", + "gen_platf", + "inc6.png", + "_", + "image", + "gen_platf", + "inc7.png", + "_", + "image", + "gen_platf", + "inc8.png", + "_", + "image", + "gen_platf", + "inc9.png", + "_", + "image", + "gen_platf", + "inc10.png", + "_", + "image", + "gen_platf", + "inc11.png", + "_", + "image", + "gen_platf", + "inc12.png", + "_", + "image", + "gen_platf", + "inc13.png", + "_", + "image", + "gen_platf", + "inc14.png", + "_", + "test", + "_", + "GrShape", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "pic-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa", + "_", + "image", + "_", + "interlaced1.png", + "_", + "image", + "_", + "interlaced2.png", + "_", + "image", + "_", + "interlaced3.png", + "_", + "image", + "_", + ".arw", + "_", + "image", + "_", + ".cr2", + "_", + "image", + "_", + ".dng", + "_", + "image", + "_", + ".nef", + "_", + "image", + "_", + ".nrw", + "_", + "image", + "_", + ".orf", + "_", + "image", + "_", + ".raf", + "_", + "image", + "_", + ".rw2", + "_", + "image", + "_", + ".pef", + "_", + "image", + "_", + ".srw", + "_", + "image", + "_", + ".ARW", + "_", + "image", + "_", + ".CR2", + "_", + "image", + "_", + ".DNG", + "_", + "image", + "_", + ".NEF", + "_", + "image", + "_", + ".NRW", + "_", + "image", + "_", + ".ORF", + "_", + "image", + "_", + ".RAF", + "_", + "image", + "_", + ".RW2", + "_", + "image", + "_", + ".PEF", + "_", + "image", + "_", + ".SRW" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "dm" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_pull_if_needed", + "skiabot/skia_dm", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "pull skia_dm" + }, + { + "cmd": [ + "[START_DIR]/skia/platform_tools/ios/bin/ios_restart" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "reboot" + }, + { + "cmd": [ + "sleep", + "20" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out", + "XCODEBUILD": "[START_DIR]/xcodebuild" + }, + "name": "wait for reboot" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/nobuildbot.json b/infra/bots/recipe_modules/sktest/example.expected/nobuildbot.json new file mode 100644 index 0000000000..ea110357f8 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/nobuildbot.json @@ -0,0 +1,565 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" + ], + "name": "get swarming bot id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n" + ], + "name": "get swarming task id", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "catchsegv", + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "chromium.testing.master", + "builder", + "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot", + "build_number", + "571", + "issue", + "456789", + "patchset", + "12", + "patch_storage", + "gerrit", + "no_buildbot", + "True", + "swarming_bot_id", + "skia-bot-123", + "swarming_task_id", + "123456", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86", + "compiler", + "GCC", + "configuration", + "Debug", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "model", + "GCE", + "os", + "Ubuntu", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "--nogpu", + "--threads", + "4", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "565", + "f16", + "sp-8888", + "2ndpic-8888", + "lite-8888", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "f16", + "_", + "_", + "dstreadshuffle", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "sp-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "drawfilter", + "2ndpic-8888", + "gm", + "_", + "drawfilter", + "lite-8888", + "gm", + "_", + "drawfilter", + "sp-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "sp-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "sp-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "sp-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "gamut", + "lite-8888", + "gm", + "_", + "gamut", + "2ndpic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "sp-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "lite-8888", + "gm", + "_", + "complexclip4_bw", + "2ndpic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "sp-8888", + "gm", + "_", + "complexclip4_aa", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "lite-8888", + "gm", + "_", + "complexclip4_aa", + "2ndpic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa" + ], + "cwd": "[START_DIR]/skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.expected/recipe_with_gerrit_patch.json b/infra/bots/recipe_modules/sktest/example.expected/recipe_with_gerrit_patch.json new file mode 100644 index 0000000000..da52db91c1 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.expected/recipe_with_gerrit_patch.json @@ -0,0 +1,531 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp", + "511" + ], + "name": "makedirs tmp_dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SKP VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "name": "Get downloaded SVG VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm" + ], + "env": { + "PYTHONPATH": "[START_DIR]/skia/infra/bots/.recipe_deps/build/scripts" + }, + "name": "rmtree dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os, sys@@@", + "@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@", + "@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "511" + ], + "name": "makedirs dm", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = 'https://gold.skia.org/_/hashes'\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[1], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n print e\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print 'Retry in %d seconds.' % waittime\n time.sleep(waittime)\n", + "[START_DIR]/tmp/uninteresting_hashes.txt" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "get uninteresting hashes", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", + "@@@STEP_LOG_LINE@python.inline@import math@@@", + "@@@STEP_LOG_LINE@python.inline@import socket@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@HASHES_URL = 'https://gold.skia.org/_/hashes'@@@", + "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", + "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", + "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", + "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", + "@@@STEP_LOG_LINE@python.inline@ try:@@@", + "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", + "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", + "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", + "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[1], 'w') as f:@@@", + "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@", + "@@@STEP_LOG_LINE@python.inline@ print e@@@", + "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", + "@@@STEP_LOG_LINE@python.inline@ print 'Retry in %d seconds.' % waittime@@@", + "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "catchsegv", + "[START_DIR]/out/Debug/dm", + "--undefok", + "--resourcePath", + "[START_DIR]/skia/resources", + "--skps", + "[START_DIR]/skp", + "--images", + "[START_DIR]/skimage/dm", + "--colorImages", + "[START_DIR]/skimage/colorspace", + "--nameByHash", + "--properties", + "gitHash", + "abc123", + "master", + "chromium.testing.master", + "builder", + "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot", + "build_number", + "571", + "issue", + "456789", + "patchset", + "12", + "patch_storage", + "gerrit", + "--svgs", + "[START_DIR]/svg", + "--key", + "arch", + "x86", + "compiler", + "GCC", + "configuration", + "Debug", + "cpu_or_gpu", + "CPU", + "cpu_or_gpu_value", + "AVX2", + "model", + "GCE", + "os", + "Ubuntu", + "--writePath", + "[CUSTOM_[SWARM_OUT_DIR]]/dm", + "--nogpu", + "--threads", + "4", + "--config", + "8888", + "srgb", + "gpu", + "gpudft", + "gpusrgb", + "pdf", + "msaa16", + "565", + "f16", + "sp-8888", + "2ndpic-8888", + "lite-8888", + "serialize-8888", + "tiles_rt-8888", + "pic-8888", + "--src", + "tests", + "gm", + "image", + "colorImage", + "svg", + "--blacklist", + "f16", + "_", + "_", + "dstreadshuffle", + "gpusrgb", + "image", + "_", + "_", + "8888", + "image", + "_", + "_", + "serialize-8888", + "gm", + "_", + "bleed_image", + "serialize-8888", + "gm", + "_", + "c_gms", + "serialize-8888", + "gm", + "_", + "colortype", + "serialize-8888", + "gm", + "_", + "colortype_xfermodes", + "serialize-8888", + "gm", + "_", + "drawfilter", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_0.75_0", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds_1_-0.25", + "serialize-8888", + "gm", + "_", + "fontmgr_bounds", + "serialize-8888", + "gm", + "_", + "fontmgr_match", + "serialize-8888", + "gm", + "_", + "fontmgr_iter", + "serialize-8888", + "gm", + "_", + "imagemasksubset", + "serialize-8888", + "gm", + "_", + "bitmapfilters", + "serialize-8888", + "gm", + "_", + "bitmapshaders", + "serialize-8888", + "gm", + "_", + "bleed", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp", + "serialize-8888", + "gm", + "_", + "bleed_alpha_bmp_shader", + "serialize-8888", + "gm", + "_", + "convex_poly_clip", + "serialize-8888", + "gm", + "_", + "extractalpha", + "serialize-8888", + "gm", + "_", + "filterbitmap_checkerboard_32_32_g8", + "serialize-8888", + "gm", + "_", + "filterbitmap_image_mandrill_64", + "serialize-8888", + "gm", + "_", + "shadows", + "serialize-8888", + "gm", + "_", + "simpleaaclip_aaclip", + "serialize-8888", + "gm", + "_", + "composeshader_bitmap", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes_npot", + "serialize-8888", + "gm", + "_", + "scaled_tilemodes", + "serialize-8888", + "gm", + "_", + "typefacerendering_pfaMac", + "serialize-8888", + "gm", + "_", + "parsedpaths", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_rect", + "serialize-8888", + "gm", + "_", + "ImageGeneratorExternal_shader", + "serialize-8888", + "gm", + "_", + "shadow_utils", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image", + "serialize-8888", + "gm", + "_", + "bleed_alpha_image_shader", + "sp-8888", + "gm", + "_", + "drawfilter", + "pic-8888", + "gm", + "_", + "drawfilter", + "2ndpic-8888", + "gm", + "_", + "drawfilter", + "lite-8888", + "gm", + "_", + "drawfilter", + "sp-8888", + "gm", + "_", + "image-cacherator-from-picture", + "pic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-picture", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-picture", + "sp-8888", + "gm", + "_", + "image-cacherator-from-raster", + "pic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-raster", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-raster", + "sp-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "pic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "2ndpic-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "serialize-8888", + "gm", + "_", + "image-cacherator-from-ctable", + "sp-8888", + "gm", + "_", + "gamut", + "pic-8888", + "gm", + "_", + "gamut", + "lite-8888", + "gm", + "_", + "gamut", + "2ndpic-8888", + "gm", + "_", + "gamut", + "serialize-8888", + "gm", + "_", + "gamut", + "sp-8888", + "gm", + "_", + "complexclip4_bw", + "pic-8888", + "gm", + "_", + "complexclip4_bw", + "lite-8888", + "gm", + "_", + "complexclip4_bw", + "2ndpic-8888", + "gm", + "_", + "complexclip4_bw", + "serialize-8888", + "gm", + "_", + "complexclip4_bw", + "sp-8888", + "gm", + "_", + "complexclip4_aa", + "pic-8888", + "gm", + "_", + "complexclip4_aa", + "lite-8888", + "gm", + "_", + "complexclip4_aa", + "2ndpic-8888", + "gm", + "_", + "complexclip4_aa", + "serialize-8888", + "gm", + "_", + "complexclip4_aa", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_bw", + "tiles_rt-8888", + "gm", + "_", + "complexclip4_aa" + ], + "cwd": "[START_DIR]/skia", + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/sktest/example.py b/infra/bots/recipe_modules/sktest/example.py new file mode 100644 index 0000000000..c08832e042 --- /dev/null +++ b/infra/bots/recipe_modules/sktest/example.py @@ -0,0 +1,227 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Example recipe w/ coverage. + + +DEPS = [ + 'recipe_engine/path', + 'recipe_engine/platform', + 'recipe_engine/properties', + 'recipe_engine/raw_io', + 'sktest', +] + + +TEST_BUILDERS = { + 'client.skia': { + 'skiabot-linux-swarm-000': [ + 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android', + 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android', + 'Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android', + 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android', + 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android', + 'Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android', + 'Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android', + 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan', + 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android', + 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android', + ('Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-' + 'GN_Android_Vulkan'), + 'Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android', + 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug', + 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug', + 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer', + 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug', + 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug', + 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN', + 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN', + 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared', + 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN', + 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', + 'Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-ANGLE', + 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan', + 'Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan', + 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot', + 'Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE', + 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', + ], + }, +} + + +def RunSteps(api): + api.sktest.run() + + +def GenTests(api): + for mastername, slaves in TEST_BUILDERS.iteritems(): + for slavename, builders_by_slave in slaves.iteritems(): + for builder in builders_by_slave: + test = ( + api.test(builder) + + api.properties(buildername=builder, + mastername=mastername, + slavename=slavename, + buildnumber=5, + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.path.exists( + api.path['start_dir'].join('skia'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skimage', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skp', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'svg', 'VERSION'), + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + ) + if 'Trybot' in builder: + test += api.properties(issue=500, + patchset=1, + rietveld='https://codereview.chromium.org') + if 'Win' in builder: + test += api.platform('win', 64) + + + yield test + + builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug' + yield ( + api.test('failed_dm') + + api.properties(buildername=builder, + mastername='client.skia', + slavename='skiabot-linux-swarm-000', + buildnumber=6, + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.path.exists( + api.path['start_dir'].join('skia'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skimage', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skp', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'svg', 'VERSION'), + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + + api.step_data('dm', retcode=1) + ) + + builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android' + yield ( + api.test('failed_get_hashes') + + api.properties(buildername=builder, + mastername='client.skia', + slavename='skiabot-linux-swarm-000', + buildnumber=6, + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.path.exists( + api.path['start_dir'].join('skia'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skimage', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skp', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'svg', 'VERSION'), + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + + api.step_data('get uninteresting hashes', retcode=1) + ) + + builder = 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug' + yield ( + api.test('missing_SKP_VERSION_device') + + api.properties(buildername=builder, + mastername='client.skia', + slavename='skiabot-linux-swarm-000', + buildnumber=6, + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + + api.path.exists( + api.path['start_dir'].join('skia'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skimage', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skp', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'svg', 'VERSION'), + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + + api.step_data('read SKP_VERSION', retcode=1) + ) + + builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot' + yield ( + api.test('big_issue_number') + + api.properties(buildername=builder, + mastername='client.skia.compile', + slavename='skiabot-linux-swarm-000', + buildnumber=5, + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + rietveld='https://codereview.chromium.org', + patchset=1, + issue=2147533002L) + + api.path.exists( + api.path['start_dir'].join('skia'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skimage', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'skp', 'VERSION'), + api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', + 'svg', 'VERSION'), + api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') + ) + + api.platform('win', 64) + ) + + builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot' + yield ( + api.test('recipe_with_gerrit_patch') + + api.properties( + buildername=builder, + mastername='client.skia', + slavename='skiabot-linux-swarm-000', + buildnumber=5, + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + revision='abc123', + patch_storage='gerrit') + + api.properties.tryserver( + buildername=builder, + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + ) + + yield ( + api.test('nobuildbot') + + api.properties( + buildername=builder, + mastername='client.skia', + slavename='skiabot-linux-swarm-000', + buildnumber=5, + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + revision='abc123', + nobuildbot='True', + patch_storage='gerrit') + + api.properties.tryserver( + buildername=builder, + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + + api.step_data('get swarming bot id', + stdout=api.raw_io.output('skia-bot-123')) + + api.step_data('get swarming task id', stdout=api.raw_io.output('123456')) + ) diff --git a/infra/bots/recipe_modules/swarming/__init__.py b/infra/bots/recipe_modules/swarming/__init__.py new file mode 100644 index 0000000000..3e05b02b1f --- /dev/null +++ b/infra/bots/recipe_modules/swarming/__init__.py @@ -0,0 +1,18 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/file', + 'build/isolate', + 'build/swarming', + 'build/swarming_client', + 'depot_tools/depot_tools', + 'recipe_engine/json', + 'recipe_engine/path', + 'recipe_engine/properties', + 'recipe_engine/python', + 'recipe_engine/raw_io', + 'recipe_engine/step', + 'run', +] diff --git a/infra/bots/recipe_modules/swarming/api.py b/infra/bots/recipe_modules/swarming/api.py new file mode 100644 index 0000000000..0a2377fe7f --- /dev/null +++ b/infra/bots/recipe_modules/swarming/api.py @@ -0,0 +1,218 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +from recipe_engine import recipe_api +import shlex + + +DEFAULT_TASK_EXPIRATION = 20*60*60 +DEFAULT_TASK_TIMEOUT = 4*60*60 +DEFAULT_IO_TIMEOUT = 40*60 + +MILO_LOG_LINK = 'https://luci-milo.appspot.com/swarming/task/%s' + + +class SkiaSwarmingApi(recipe_api.RecipeApi): + """Provides steps to run Skia tasks on swarming bots.""" + + @property + def swarming_temp_dir(self): + """Path where artifacts like isolate file and json output will be stored.""" + return self.m.path['start_dir'].join('swarming_temp_dir') + + @property + def tasks_output_dir(self): + """Directory where the outputs of the swarming tasks will be stored.""" + return self.swarming_temp_dir.join('outputs') + + def isolated_file_path(self, task_name): + """Get the path to the given task's .isolated file.""" + return self.swarming_temp_dir.join('skia-task-%s.isolated' % task_name) + + def setup(self, luci_go_dir, swarming_rev=None): + """Performs setup steps for swarming.""" + self.m.swarming_client.checkout(revision=swarming_rev) + self.m.swarming.check_client_version(step_test_data=(0, 8, 6)) + self.setup_go_isolate(luci_go_dir) + self.m.swarming.add_default_tag('allow_milo:1') + + # TODO(rmistry): Remove once the Go binaries are moved to recipes or buildbot. + def setup_go_isolate(self, luci_go_dir): + """Generates and puts in place the isolate Go binary.""" + depot_tools_path = self.m.depot_tools.package_repo_resource() + env = {'PATH': self.m.path.pathsep.join([ + str(depot_tools_path), '%(PATH)s'])} + self.m.step('download luci-go linux', + ['download_from_google_storage', '--no_resume', + '--platform=linux*', '--no_auth', '--bucket', 'chromium-luci', + '-d', luci_go_dir.join('linux64')], + env=env) + self.m.step('download luci-go mac', + ['download_from_google_storage', '--no_resume', + '--platform=darwin', '--no_auth', '--bucket', 'chromium-luci', + '-d', luci_go_dir.join('mac64')], + env=env) + self.m.step('download luci-go win', + ['download_from_google_storage', '--no_resume', + '--platform=win32', '--no_auth', '--bucket', 'chromium-luci', + '-d', luci_go_dir.join('win64')], + env=env) + # Copy binaries to the expected location. + dest = self.m.path['start_dir'].join('luci-go') + self.m.run.rmtree(dest) + self.m.file.copytree('Copy Go binary', + source=luci_go_dir, + dest=dest) + + def create_isolated_gen_json(self, isolate_path, base_dir, os_type, + task_name, extra_variables, blacklist=None): + """Creates an isolated.gen.json file (used by the isolate recipe module). + + Args: + isolate_path: path obj. Path to the isolate file. + base_dir: path obj. Dir that is the base of all paths in the isolate file. + os_type: str. The OS type to use when archiving the isolate file. + Eg: linux. + task_name: str. The isolated.gen.json file will be suffixed by this str. + extra_variables: dict of str to str. The extra vars to pass to isolate. + Eg: {'SLAVE_NUM': '1', 'MASTER': 'ChromiumPerfFYI'} + blacklist: list of regular expressions indicating which files/directories + not to archive. + """ + self.m.file.makedirs('swarming tmp dir', self.swarming_temp_dir) + isolated_path = self.isolated_file_path(task_name) + isolate_args = [ + '--isolate', isolate_path, + '--isolated', isolated_path, + '--config-variable', 'OS', os_type, + ] + if blacklist: # pragma: no cover + for b in blacklist: + isolate_args.extend(['--blacklist', b]) + for k, v in extra_variables.iteritems(): + isolate_args.extend(['--extra-variable', k, v]) + isolated_gen_dict = { + 'version': 1, + 'dir': base_dir, + 'args': isolate_args, + } + isolated_gen_json = self.swarming_temp_dir.join( + '%s.isolated.gen.json' % task_name) + self.m.file.write( + 'Write %s.isolated.gen.json' % task_name, + isolated_gen_json, + self.m.json.dumps(isolated_gen_dict, indent=4), + ) + + def batcharchive(self, targets): + """Calls batcharchive on the skia.isolated.gen.json file. + + Args: + targets: list of str. The suffixes of the isolated.gen.json files to + archive. + + Returns: + list of tuples containing (task_name, swarming_hash). + """ + return self.m.isolate.isolate_tests( + verbose=True, # To avoid no output timeouts. + build_dir=self.swarming_temp_dir, + targets=targets).presentation.properties['swarm_hashes'].items() + + def trigger_swarming_tasks( + self, swarm_hashes, dimensions, idempotent=False, store_output=True, + extra_args=None, expiration=None, hard_timeout=None, io_timeout=None, + cipd_packages=None): + """Triggers swarming tasks using swarm hashes. + + Args: + swarm_hashes: list of str. List of swarm hashes from the isolate server. + dimensions: dict of str to str. The dimensions to run the task on. + Eg: {'os': 'Ubuntu', 'gpu': '10de', 'pool': 'Skia'} + idempotent: bool. Whether or not to de-duplicate tasks. + store_output: bool. Whether task output should be stored. + extra_args: list of str. Extra arguments to pass to the task. + expiration: int. Task will expire if not picked up within this time. + DEFAULT_TASK_EXPIRATION is used if this argument is None. + hard_timeout: int. Task will timeout if not completed within this time. + DEFAULT_TASK_TIMEOUT is used if this argument is None. + io_timeout: int. Task will timeout if there is no output within this time. + DEFAULT_IO_TIMEOUT is used if this argument is None. + cipd_packages: CIPD packages which these tasks depend on. + + Returns: + List of swarming.SwarmingTask instances. + """ + swarming_tasks = [] + for task_name, swarm_hash in swarm_hashes: + swarming_task = self.m.swarming.task( + title=task_name, + cipd_packages=cipd_packages, + isolated_hash=swarm_hash) + if store_output: + swarming_task.task_output_dir = self.tasks_output_dir.join(task_name) + swarming_task.dimensions = dimensions + swarming_task.idempotent = idempotent + swarming_task.priority = 90 + swarming_task.expiration = ( + expiration if expiration else DEFAULT_TASK_EXPIRATION) + swarming_task.hard_timeout = ( + hard_timeout if hard_timeout else DEFAULT_TASK_TIMEOUT) + swarming_task.io_timeout = ( + io_timeout if io_timeout else DEFAULT_IO_TIMEOUT) + if extra_args: # pragma: no cover + swarming_task.extra_args = extra_args + revision = self.m.properties.get('revision') + if revision: + swarming_task.tags.add('revision:%s' % revision) + swarming_tasks.append(swarming_task) + step_results = self.m.swarming.trigger(swarming_tasks) + for step_result in step_results: + self._add_log_links(step_result) + return swarming_tasks + + def collect_swarming_task(self, swarming_task): + """Collects the specified swarming task. + + Args: + swarming_task: An instance of swarming.SwarmingTask. + """ + try: + rv = self.m.swarming.collect_task(swarming_task) + except self.m.step.StepFailure as e: # pragma: no cover + step_result = self.m.step.active_result + # Change step result to Infra failure if the swarming task failed due to + # expiration, time outs, bot crashes or task cancelations. + # Infra failures have step.EXCEPTION. + states_infra_failure = ( + self.m.swarming.State.EXPIRED, self.m.swarming.State.TIMED_OUT, + self.m.swarming.State.BOT_DIED, self.m.swarming.State.CANCELED) + if step_result.json.output['shards'][0]['state'] in states_infra_failure: + step_result.presentation.status = self.m.step.EXCEPTION + raise self.m.step.InfraFailure(e.name, step_result) + raise + finally: + step_result = self.m.step.active_result + # Add log link. + self._add_log_links(step_result) + return rv + + def _add_log_links(self, step_result): + """Add Milo log links to all shards in the step.""" + ids = [] + shards = step_result.json.output.get('shards') + if shards: + for shard in shards: + ids.append(shard['id']) + else: + for _, task in step_result.json.output.get('tasks', {}).iteritems(): + ids.append(task['task_id']) + for idx, task_id in enumerate(ids): + link = MILO_LOG_LINK % task_id + k = 'view steps on Milo' + if len(ids) > 1: # pragma: nocover + k += ' (shard index %d, %d total)' % (idx, len(ids)) + step_result.presentation.links[k] = link + diff --git a/infra/bots/recipe_modules/upload_dm_results/__init__.py b/infra/bots/recipe_modules/upload_dm_results/__init__.py new file mode 100644 index 0000000000..df2e0054da --- /dev/null +++ b/infra/bots/recipe_modules/upload_dm_results/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/file', + 'recipe_engine/json', + 'recipe_engine/path', + 'recipe_engine/properties', + 'recipe_engine/shutil', + 'recipe_engine/step', + 'recipe_engine/time', +] diff --git a/infra/bots/recipe_modules/upload_dm_results/api.py b/infra/bots/recipe_modules/upload_dm_results/api.py new file mode 100644 index 0000000000..cc395fd722 --- /dev/null +++ b/infra/bots/recipe_modules/upload_dm_results/api.py @@ -0,0 +1,91 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Recipe for uploading DM results. + + + +import calendar + +from recipe_engine import recipe_api + + +DM_JSON = 'dm.json' +GS_BUCKET = 'gs://skia-infra-gm' +UPLOAD_ATTEMPTS = 5 +VERBOSE_LOG = 'verbose.log' + + +class UploadDmResultsApi(recipe_api.RecipeApi): + def cp(self, name, src, dst, extra_args=None): + cmd = ['gsutil', 'cp'] + if extra_args: + cmd.extend(extra_args) + cmd.extend([src, dst]) + + name = 'upload %s' % name + for i in xrange(UPLOAD_ATTEMPTS): + step_name = name + if i > 0: + step_name += ' (attempt %d)' % (i+1) + try: + self.m.step(step_name, cmd=cmd) + break + except self.m.step.StepFailure: + if i == UPLOAD_ATTEMPTS - 1: + raise + + def run(self): + builder_name = self.m.properties['buildername'] + revision = self.m.properties['revision'] + + results_dir = self.m.path['start_dir'].join('dm') + + # Move dm.json and verbose.log to their own directory. + json_file = results_dir.join(DM_JSON) + log_file = results_dir.join(VERBOSE_LOG) + tmp_dir = self.m.path['start_dir'].join('tmp_upload') + self.m.shutil.makedirs('tmp dir', tmp_dir, infra_step=True) + self.m.shutil.copy('copy dm.json', json_file, tmp_dir) + self.m.shutil.copy('copy verbose.log', log_file, tmp_dir) + self.m.shutil.remove('rm old dm.json', json_file) + self.m.shutil.remove('rm old verbose.log', log_file) + + # Upload the images. + image_dest_path = '/'.join((GS_BUCKET, 'dm-images-v1')) + files_to_upload = self.m.file.glob( + 'find images', + results_dir.join('*'), + test_data=['someimage.png'], + infra_step=True) + if len(files_to_upload) > 0: + self.cp('images', results_dir.join('*'), image_dest_path) + + # Upload the JSON summary and verbose.log. + now = self.m.time.utcnow() + summary_dest_path = '/'.join([ + 'dm-json-v1', + str(now.year ).zfill(4), + str(now.month).zfill(2), + str(now.day ).zfill(2), + str(now.hour ).zfill(2), + revision, + builder_name, + str(int(calendar.timegm(now.utctimetuple())))]) + + # Trybot results are further siloed by issue/patchset. + issue = str(self.m.properties.get('issue', '')) + patchset = str(self.m.properties.get('patchset', '')) + if self.m.properties.get('patch_storage', '') == 'gerrit': + issue = str(self.m.properties['patch_issue']) + patchset = str(self.m.properties['patch_set']) + if issue and patchset: + summary_dest_path = '/'.join(( + 'trybot', summary_dest_path, issue, patchset)) + + summary_dest_path = '/'.join((GS_BUCKET, summary_dest_path)) + + self.cp('JSON and logs', tmp_dir.join('*'), summary_dest_path, + ['-z', 'json,log']) diff --git a/infra/bots/recipe_modules/upload_dm_results/example.expected/failed_all.json b/infra/bots/recipe_modules/upload_dm_results/example.expected/failed_all.json new file mode 100644 index 0000000000..7ec0362e4d --- /dev/null +++ b/infra/bots/recipe_modules/upload_dm_results/example.expected/failed_all.json @@ -0,0 +1,157 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp_upload", + "511" + ], + "name": "makedirs tmp dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/dm.json", + "[START_DIR]/tmp_upload" + ], + "name": "copy dm.json" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/verbose.log", + "[START_DIR]/tmp_upload" + ], + "name": "copy verbose.log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/dm.json" + ], + "name": "rm old dm.json", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/verbose.log" + ], + "name": "rm old verbose.log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", + "/path/to/tmp/", + "[START_DIR]/dm/*" + ], + "name": "find images" + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images (attempt 2)", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images (attempt 3)", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images (attempt 4)", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images (attempt 5)", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "name": "$result", + "reason": "Step('upload images (attempt 5)') failed with return_code 1", + "recipe_result": null, + "status_code": 1 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/upload_dm_results/example.expected/failed_once.json b/infra/bots/recipe_modules/upload_dm_results/example.expected/failed_once.json new file mode 100644 index 0000000000..b6ed1fe3a9 --- /dev/null +++ b/infra/bots/recipe_modules/upload_dm_results/example.expected/failed_once.json @@ -0,0 +1,124 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp_upload", + "511" + ], + "name": "makedirs tmp dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/dm.json", + "[START_DIR]/tmp_upload" + ], + "name": "copy dm.json" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/verbose.log", + "[START_DIR]/tmp_upload" + ], + "name": "copy verbose.log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/dm.json" + ], + "name": "rm old dm.json", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/verbose.log" + ], + "name": "rm old verbose.log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", + "/path/to/tmp/", + "[START_DIR]/dm/*" + ], + "name": "find images" + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images", + "~followup_annotations": [ + "step returned non-zero exit code: 1", + "@@@STEP_FAILURE@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images (attempt 2)" + }, + { + "cmd": [ + "gsutil", + "cp", + "-z", + "json,log", + "[START_DIR]/tmp_upload/*", + "gs://skia-infra-gm/dm-json-v1/2012/05/14/12/abc123/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001" + ], + "name": "upload JSON and logs" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/upload_dm_results/example.expected/normal_bot.json b/infra/bots/recipe_modules/upload_dm_results/example.expected/normal_bot.json new file mode 100644 index 0000000000..9ea0d30397 --- /dev/null +++ b/infra/bots/recipe_modules/upload_dm_results/example.expected/normal_bot.json @@ -0,0 +1,111 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp_upload", + "511" + ], + "name": "makedirs tmp dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/dm.json", + "[START_DIR]/tmp_upload" + ], + "name": "copy dm.json" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/verbose.log", + "[START_DIR]/tmp_upload" + ], + "name": "copy verbose.log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/dm.json" + ], + "name": "rm old dm.json", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/verbose.log" + ], + "name": "rm old verbose.log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", + "/path/to/tmp/", + "[START_DIR]/dm/*" + ], + "name": "find images" + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images" + }, + { + "cmd": [ + "gsutil", + "cp", + "-z", + "json,log", + "[START_DIR]/tmp_upload/*", + "gs://skia-infra-gm/dm-json-v1/2012/05/14/12/abc123/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001" + ], + "name": "upload JSON and logs" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/upload_dm_results/example.expected/recipe_with_gerrit_patch.json b/infra/bots/recipe_modules/upload_dm_results/example.expected/recipe_with_gerrit_patch.json new file mode 100644 index 0000000000..03bb50541a --- /dev/null +++ b/infra/bots/recipe_modules/upload_dm_results/example.expected/recipe_with_gerrit_patch.json @@ -0,0 +1,111 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp_upload", + "511" + ], + "name": "makedirs tmp dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/dm.json", + "[START_DIR]/tmp_upload" + ], + "name": "copy dm.json" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/verbose.log", + "[START_DIR]/tmp_upload" + ], + "name": "copy verbose.log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/dm.json" + ], + "name": "rm old dm.json", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/verbose.log" + ], + "name": "rm old verbose.log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", + "/path/to/tmp/", + "[START_DIR]/dm/*" + ], + "name": "find images" + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images" + }, + { + "cmd": [ + "gsutil", + "cp", + "-z", + "json,log", + "[START_DIR]/tmp_upload/*", + "gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/abc123/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/1337000001/456789/12" + ], + "name": "upload JSON and logs" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/upload_dm_results/example.expected/trybot.json b/infra/bots/recipe_modules/upload_dm_results/example.expected/trybot.json new file mode 100644 index 0000000000..3ebc3fa0af --- /dev/null +++ b/infra/bots/recipe_modules/upload_dm_results/example.expected/trybot.json @@ -0,0 +1,111 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n", + "[START_DIR]/tmp_upload", + "511" + ], + "name": "makedirs tmp dir", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import sys, os@@@", + "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@", + "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/dm.json", + "[START_DIR]/tmp_upload" + ], + "name": "copy dm.json" + }, + { + "cmd": [ + "python", + "-u", + "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", + "[START_DIR]/dm/verbose.log", + "[START_DIR]/tmp_upload" + ], + "name": "copy verbose.log" + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/dm.json" + ], + "name": "rm old dm.json", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport sys\nos.remove(sys.argv[1])\n", + "[START_DIR]/dm/verbose.log" + ], + "name": "rm old verbose.log", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@os.remove(sys.argv[1])@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", + "/path/to/tmp/", + "[START_DIR]/dm/*" + ], + "name": "find images" + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images" + }, + { + "cmd": [ + "gsutil", + "cp", + "-z", + "json,log", + "[START_DIR]/tmp_upload/*", + "gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/abc123/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/1337000001/12345/1002" + ], + "name": "upload JSON and logs" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/upload_dm_results/example.py b/infra/bots/recipe_modules/upload_dm_results/example.py new file mode 100644 index 0000000000..54448458ab --- /dev/null +++ b/infra/bots/recipe_modules/upload_dm_results/example.py @@ -0,0 +1,70 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Example recipe w/ coverage. + + +DEPS = [ + 'upload_dm_results', + 'recipe_engine/properties', +] + + +def RunSteps(api): + api.upload_dm_results.run() + + +def GenTests(api): + builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug' + yield ( + api.test('normal_bot') + + api.properties(buildername=builder, + revision='abc123', + path_config='kitchen') + ) + + yield ( + api.test('failed_once') + + api.properties(buildername=builder, + revision='abc123', + path_config='kitchen') + + api.step_data('upload images', retcode=1) + ) + + yield ( + api.test('failed_all') + + api.properties(buildername=builder, + revision='abc123', + path_config='kitchen') + + api.step_data('upload images', retcode=1) + + api.step_data('upload images (attempt 2)', retcode=1) + + api.step_data('upload images (attempt 3)', retcode=1) + + api.step_data('upload images (attempt 4)', retcode=1) + + api.step_data('upload images (attempt 5)', retcode=1) + ) + + builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot' + yield ( + api.test('trybot') + + api.properties(buildername=builder, + revision='abc123', + path_config='kitchen', + issue='12345', + patchset='1002') + ) + + yield ( + api.test('recipe_with_gerrit_patch') + + api.properties( + buildername=builder, + revision='abc123', + path_config='kitchen', + patch_storage='gerrit') + + api.properties.tryserver( + buildername=builder, + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + ) diff --git a/infra/bots/recipe_modules/upload_nano_results/__init__.py b/infra/bots/recipe_modules/upload_nano_results/__init__.py new file mode 100644 index 0000000000..eac65b7336 --- /dev/null +++ b/infra/bots/recipe_modules/upload_nano_results/__init__.py @@ -0,0 +1,11 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'build/file', + 'recipe_engine/path', + 'recipe_engine/properties', + 'recipe_engine/step', + 'recipe_engine/time', +] diff --git a/infra/bots/recipe_modules/upload_nano_results/api.py b/infra/bots/recipe_modules/upload_nano_results/api.py new file mode 100644 index 0000000000..515c982527 --- /dev/null +++ b/infra/bots/recipe_modules/upload_nano_results/api.py @@ -0,0 +1,49 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Recipe for uploading nanobench results. + + +from recipe_engine import recipe_api + + +class UploadNanoResultsApi(recipe_api.RecipeApi): + def run(self): + # Upload the nanobench resuls. + builder_name = self.m.properties['buildername'] + + now = self.m.time.utcnow() + src_path = self.m.path['start_dir'].join( + 'perfdata', builder_name, 'data') + results = self.m.file.glob( + 'find results', + '*.json', + cwd=src_path, + test_data=['nanobench_abc123.json'], + infra_step=True) + if len(results) != 1: # pragma: nocover + raise Exception('Unable to find nanobench or skpbench JSON file!') + + src = src_path.join(results[0]) + basename = self.m.path.basename(src) + gs_path = '/'.join(( + 'nano-json-v1', str(now.year).zfill(4), + str(now.month).zfill(2), str(now.day).zfill(2), str(now.hour).zfill(2), + builder_name)) + + issue = str(self.m.properties.get('issue', '')) + patchset = str(self.m.properties.get('patchset', '')) + if self.m.properties.get('patch_storage', '') == 'gerrit': + issue = str(self.m.properties['patch_issue']) + patchset = str(self.m.properties['patch_set']) + if issue and patchset: + gs_path = '/'.join(('trybot', gs_path, issue, patchset)) + + dst = '/'.join(('gs://skia-perf', gs_path, basename)) + + self.m.step( + 'upload', + cmd=['gsutil', 'cp', '-a', 'public-read', '-z', 'json', src, dst], + infra_step=True) diff --git a/infra/bots/recipe_modules/upload_nano_results/example.expected/normal_bot.json b/infra/bots/recipe_modules/upload_nano_results/example.expected/normal_bot.json new file mode 100644 index 0000000000..e004853974 --- /dev/null +++ b/infra/bots/recipe_modules/upload_nano_results/example.expected/normal_bot.json @@ -0,0 +1,31 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", + "/path/to/tmp/", + "*.json" + ], + "cwd": "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug/data", + "name": "find results" + }, + { + "cmd": [ + "gsutil", + "cp", + "-a", + "public-read", + "-z", + "json", + "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug/data/nanobench_abc123.json", + "gs://skia-perf/nano-json-v1/2012/05/14/12/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug/nanobench_abc123.json" + ], + "name": "upload" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/upload_nano_results/example.expected/recipe_with_gerrit_patch.json b/infra/bots/recipe_modules/upload_nano_results/example.expected/recipe_with_gerrit_patch.json new file mode 100644 index 0000000000..f55491cf7a --- /dev/null +++ b/infra/bots/recipe_modules/upload_nano_results/example.expected/recipe_with_gerrit_patch.json @@ -0,0 +1,31 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", + "/path/to/tmp/", + "*.json" + ], + "cwd": "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data", + "name": "find results" + }, + { + "cmd": [ + "gsutil", + "cp", + "-a", + "public-read", + "-z", + "json", + "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data/nanobench_abc123.json", + "gs://skia-perf/trybot/nano-json-v1/2012/05/14/12/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/456789/12/nanobench_abc123.json" + ], + "name": "upload" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/upload_nano_results/example.expected/trybot.json b/infra/bots/recipe_modules/upload_nano_results/example.expected/trybot.json new file mode 100644 index 0000000000..dd71c716cb --- /dev/null +++ b/infra/bots/recipe_modules/upload_nano_results/example.expected/trybot.json @@ -0,0 +1,31 @@ +[ + { + "cmd": [ + "python", + "-u", + "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", + "/path/to/tmp/", + "*.json" + ], + "cwd": "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data", + "name": "find results" + }, + { + "cmd": [ + "gsutil", + "cp", + "-a", + "public-read", + "-z", + "json", + "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data/nanobench_abc123.json", + "gs://skia-perf/trybot/nano-json-v1/2012/05/14/12/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/12345/1002/nanobench_abc123.json" + ], + "name": "upload" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/upload_nano_results/example.py b/infra/bots/recipe_modules/upload_nano_results/example.py new file mode 100644 index 0000000000..f97cac86f2 --- /dev/null +++ b/infra/bots/recipe_modules/upload_nano_results/example.py @@ -0,0 +1,50 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# Example recipe w/ coverage. + + +DEPS = [ + 'recipe_engine/properties', + 'upload_nano_results', +] + + +def RunSteps(api): + api.upload_nano_results.run() + + +def GenTests(api): + builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug' + yield ( + api.test('normal_bot') + + api.properties(buildername=builder, + revision='abc123', + path_config='kitchen') + ) + + builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot' + yield ( + api.test('trybot') + + api.properties(buildername=builder, + revision='abc123', + path_config='kitchen', + issue='12345', + patchset='1002') + ) + + yield ( + api.test('recipe_with_gerrit_patch') + + api.properties( + buildername=builder, + revision='abc123', + path_config='kitchen', + patch_storage='gerrit') + + api.properties.tryserver( + buildername=builder, + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + ) diff --git a/infra/bots/recipe_modules/vars/__init__.py b/infra/bots/recipe_modules/vars/__init__.py new file mode 100644 index 0000000000..e74431efac --- /dev/null +++ b/infra/bots/recipe_modules/vars/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +DEPS = [ + 'builder_name_schema', + 'recipe_engine/json', + 'recipe_engine/path', + 'recipe_engine/properties', + 'recipe_engine/python', + 'recipe_engine/raw_io', + 'recipe_engine/step', +] diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py new file mode 100644 index 0000000000..faba0ad5c0 --- /dev/null +++ b/infra/bots/recipe_modules/vars/api.py @@ -0,0 +1,213 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +# pylint: disable=W0201 + + +from recipe_engine import recipe_api + + +CONFIG_DEBUG = 'Debug' +CONFIG_RELEASE = 'Release' + + +class SkiaVarsApi(recipe_api.RecipeApi): + + def make_path(self, *path): + """Return a Path object for the given path.""" + key = 'custom_%s' % '_'.join(path) + self.m.path.c.base_paths[key] = tuple(path) + return self.m.path[key] + + def setup(self): + """Prepare the variables.""" + # Setup + self.builder_name = self.m.properties['buildername'] + self.master_name = self.m.properties['mastername'] + self.slave_name = self.m.properties['slavename'] + self.build_number = self.m.properties['buildnumber'] + + self.slave_dir = self.m.path['start_dir'] + self.checkout_root = self.slave_dir + self.default_env = {} + self.gclient_env = {} + self.is_compile_bot = self.builder_name.startswith('Build-') + self.no_buildbot = self.m.properties.get('nobuildbot', '') == 'True' + self.skia_task_id = self.m.properties.get('skia_task_id', None) + + self.default_env['CHROME_HEADLESS'] = '1' + # The 'depot_tools' directory comes from recipe DEPS and isn't provided by + # default. We have to set it manually. + self.m.path.c.base_paths['depot_tools'] = ( + self.m.path.c.base_paths['start_dir'] + + ('skia', 'infra', 'bots', '.recipe_deps', 'depot_tools')) + if 'Win' in self.builder_name: + self.m.path.c.base_paths['depot_tools'] = ( + 'c:\\', 'Users', 'chrome-bot', 'depot_tools') + + # Compile bots keep a persistent checkout. + self.persistent_checkout = (self.is_compile_bot or + 'RecreateSKPs' in self.builder_name or + '-CT_' in self.builder_name or + 'Presubmit' in self.builder_name or + 'InfraTests' in self.builder_name or + self.builder_name == "Housekeeper-PerCommit") + if self.persistent_checkout: + if 'Win' in self.builder_name: + self.checkout_root = self.make_path('C:\\', 'b', 'work') + self.gclient_cache = self.make_path('C:\\', 'b', 'cache') + else: + self.checkout_root = self.make_path('/', 'b', 'work') + self.gclient_cache = self.make_path('/', 'b', 'cache') + + # got_revision is filled in after checkout steps. + self.got_revision = None + else: + # If there's no persistent checkout, then we have to asume we got the + # correct revision of the files from isolate. + self.got_revision = self.m.properties['revision'] + + # Some bots also require a checkout of PDFium; in this case we use the + # checkout of Skia obtained through DEPS in pdfium/third_party/skia. + self.need_pdfium_checkout = 'PDFium' in self.builder_name + + self.skia_dir = self.checkout_root.join('skia') + if self.need_pdfium_checkout: + self.skia_dir = self.checkout_root.join('pdfium', 'third_party', 'skia') + if not self.persistent_checkout: + self.m.path['checkout'] = self.skia_dir + + self.infrabots_dir = self.skia_dir.join('infra', 'bots') + self.resource_dir = self.skia_dir.join('resources') + self.images_dir = self.slave_dir.join('skimage') + self.skia_out = self.skia_dir.join('out', self.builder_name) + self.swarming_out_dir = self.make_path(self.m.properties['swarm_out_dir']) + self.local_skp_dir = self.slave_dir.join('skp') + self.local_svg_dir = self.slave_dir.join('svg') + if not self.is_compile_bot: + self.skia_out = self.slave_dir.join('out') + self.tmp_dir = self.m.path['start_dir'].join('tmp') + + # Some bots also require a checkout of chromium. + self.need_chromium_checkout = False + if 'CommandBuffer' in self.builder_name: + self.need_chromium_checkout = True + self.gclient_env['GYP_CHROMIUM_NO_ACTION'] = '0' + if 'RecreateSKPs' in self.builder_name: # pragma: no cover + self.need_chromium_checkout = True + self.gclient_env['CPPFLAGS'] = ( + '-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1') + + self.builder_cfg = self.m.builder_name_schema.DictForBuilderName( + self.builder_name) + self.role = self.builder_cfg['role'] + if self.role == self.m.builder_name_schema.BUILDER_ROLE_HOUSEKEEPER: + self.configuration = CONFIG_RELEASE + else: + self.configuration = self.builder_cfg.get('configuration', CONFIG_DEBUG) + arch = (self.builder_cfg.get('arch') or self.builder_cfg.get('target_arch')) + if ('Win' in self.builder_cfg.get('os', '') and arch == 'x86_64'): + self.configuration += '_x64' + + self.default_env.update({'SKIA_OUT': self.skia_out, + 'BUILDTYPE': self.configuration}) + + self.patch_storage = self.m.properties.get('patch_storage', 'rietveld') + self.issue = None + self.patchset = None + if self.no_buildbot: + self.is_trybot = False + if (self.m.properties.get('issue', '') and + self.m.properties.get('patchset', '')): + self.is_trybot = True + self.issue = self.m.properties['issue'] + self.patchset = self.m.properties['patchset'] + elif (self.m.properties.get('patch_issue', '') and + self.m.properties.get('patch_set', '')): + self.is_trybot = True + self.issue = self.m.properties['patch_issue'] + self.patchset = self.m.properties['patch_set'] + else: + self.is_trybot = self.builder_cfg['is_trybot'] + if self.is_trybot: + if self.patch_storage == 'gerrit': + self.issue = self.m.properties['patch_issue'] + self.patchset = self.m.properties['patch_set'] + else: + self.issue = self.m.properties['issue'] + self.patchset = self.m.properties['patchset'] + + self.dm_dir = self.m.path.join( + self.swarming_out_dir, 'dm') + self.perf_data_dir = self.m.path.join(self.swarming_out_dir, + 'perfdata', self.builder_name, 'data') + self._swarming_bot_id = None + self._swarming_task_id = None + + # Data should go under in _data_dir, which may be preserved across runs. + self.android_data_dir = '/sdcard/revenge_of_the_skiabot/' + # Executables go under _bin_dir, which, well, allows executable files. + self.android_bin_dir = '/data/local/tmp/' + + @property + def upload_dm_results(self): + # TODO(borenet): Move this into the swarm_test recipe. + skip_upload_bots = [ + 'ASAN', + 'Coverage', + 'MSAN', + 'TSAN', + 'UBSAN', + 'Valgrind', + ] + upload_dm_results = True + for s in skip_upload_bots: + if s in self.m.properties['buildername']: + upload_dm_results = False + break + return upload_dm_results + + @property + def upload_perf_results(self): + # TODO(borenet): Move this into the swarm_perf recipe. + if 'Release' not in self.m.properties['buildername']: + return False + skip_upload_bots = [ + 'ASAN', + 'Coverage', + 'MSAN', + 'TSAN', + 'UBSAN', + 'Valgrind', + ] + upload_perf_results = True + for s in skip_upload_bots: + if s in self.m.properties['buildername']: + upload_perf_results = False + break + return upload_perf_results + + @property + def swarming_bot_id(self): + if not self._swarming_bot_id: + self._swarming_bot_id = self.m.python.inline( + name='get swarming bot id', + program='''import os +print os.environ.get('SWARMING_BOT_ID', '') +''', + stdout=self.m.raw_io.output()).stdout.rstrip() + return self._swarming_bot_id + + @property + def swarming_task_id(self): + if not self._swarming_task_id: + self._swarming_task_id = self.m.python.inline( + name='get swarming task id', + program='''import os +print os.environ.get('SWARMING_TASK_ID', '') +''', + stdout=self.m.raw_io.output()).stdout.rstrip() + return self._swarming_task_id + diff --git a/infra/bots/recipes/swarm_RecreateSKPs.py b/infra/bots/recipes/swarm_RecreateSKPs.py index 577385e395..af4a387db7 100644 --- a/infra/bots/recipes/swarm_RecreateSKPs.py +++ b/infra/bots/recipes/swarm_RecreateSKPs.py @@ -14,9 +14,9 @@ DEPS = [ 'recipe_engine/python', 'recipe_engine/raw_io', 'recipe_engine/step', - 'skia-recipes/core', - 'skia-recipes/infra', - 'skia-recipes/vars', + 'core', + 'infra', + 'vars', ] diff --git a/infra/bots/recipes/swarm_compile.py b/infra/bots/recipes/swarm_compile.py index 4217354a50..cbf21f40dc 100644 --- a/infra/bots/recipes/swarm_compile.py +++ b/infra/bots/recipes/swarm_compile.py @@ -10,7 +10,7 @@ DEPS = [ 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', - 'skia-recipes/compile', + 'compile', ] diff --git a/infra/bots/recipes/swarm_ct_skps.py b/infra/bots/recipes/swarm_ct_skps.py index 5c5db2703d..298c67da76 100644 --- a/infra/bots/recipes/swarm_ct_skps.py +++ b/infra/bots/recipes/swarm_ct_skps.py @@ -14,12 +14,12 @@ DEPS = [ 'recipe_engine/properties', 'recipe_engine/step', 'recipe_engine/time', - 'skia-recipes/core', - 'skia-recipes/ct', - 'skia-recipes/flavor', - 'skia-recipes/run', - 'skia-recipes/swarming', - 'skia-recipes/vars', + 'core', + 'ct', + 'flavor', + 'run', + 'swarming', + 'vars', ] diff --git a/infra/bots/recipes/swarm_housekeeper.expected/Housekeeper-PerCommit-Trybot.json b/infra/bots/recipes/swarm_housekeeper.expected/Housekeeper-PerCommit-Trybot.json index 93d92cba4d..bce287b8e7 100644 --- a/infra/bots/recipes/swarm_housekeeper.expected/Housekeeper-PerCommit-Trybot.json +++ b/infra/bots/recipes/swarm_housekeeper.expected/Housekeeper-PerCommit-Trybot.json @@ -104,7 +104,7 @@ { "cmd": [ "python", - "RECIPE_MODULE[skia-recipes::core]/resources/run_binary_size_analysis.py", + "RECIPE_MODULE[skia::core]/resources/run_binary_size_analysis.py", "--library", "[START_DIR]/out/Release/lib/libskia.so", "--githash", diff --git a/infra/bots/recipes/swarm_housekeeper.expected/Housekeeper-PerCommit.json b/infra/bots/recipes/swarm_housekeeper.expected/Housekeeper-PerCommit.json index f3a42d372f..9b861b9500 100644 --- a/infra/bots/recipes/swarm_housekeeper.expected/Housekeeper-PerCommit.json +++ b/infra/bots/recipes/swarm_housekeeper.expected/Housekeeper-PerCommit.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "RECIPE_MODULE[skia-recipes::core]/resources/generate_and_upload_doxygen.py" + "RECIPE_MODULE[skia::core]/resources/generate_and_upload_doxygen.py" ], "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { @@ -114,7 +114,7 @@ { "cmd": [ "python", - "RECIPE_MODULE[skia-recipes::core]/resources/run_binary_size_analysis.py", + "RECIPE_MODULE[skia::core]/resources/run_binary_size_analysis.py", "--library", "[START_DIR]/out/Release/lib/libskia.so", "--githash", diff --git a/infra/bots/recipes/swarm_housekeeper.py b/infra/bots/recipes/swarm_housekeeper.py index 630ef45b90..cd7ef3d5ff 100644 --- a/infra/bots/recipes/swarm_housekeeper.py +++ b/infra/bots/recipes/swarm_housekeeper.py @@ -10,9 +10,9 @@ DEPS = [ 'recipe_engine/properties', 'recipe_engine/python', 'recipe_engine/step', - 'skia-recipes/core', - 'skia-recipes/run', - 'skia-recipes/vars', + 'core', + 'run', + 'vars', ] diff --git a/infra/bots/recipes/swarm_infra.py b/infra/bots/recipes/swarm_infra.py index bdd5bfc8ac..3a57055f0e 100644 --- a/infra/bots/recipes/swarm_infra.py +++ b/infra/bots/recipes/swarm_infra.py @@ -10,10 +10,10 @@ DEPS = [ 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/step', - 'skia-recipes/core', - 'skia-recipes/infra', - 'skia-recipes/run', - 'skia-recipes/vars', + 'core', + 'infra', + 'run', + 'vars', ] diff --git a/infra/bots/recipes/swarm_perf.py b/infra/bots/recipes/swarm_perf.py index 53ae799198..b6b876f22c 100644 --- a/infra/bots/recipes/swarm_perf.py +++ b/infra/bots/recipes/swarm_perf.py @@ -11,7 +11,7 @@ DEPS = [ 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/raw_io', - 'skia-recipes/perf', + 'perf', ] diff --git a/infra/bots/recipes/swarm_presubmit.py b/infra/bots/recipes/swarm_presubmit.py index e3a98a6b37..6a3f52bfa5 100644 --- a/infra/bots/recipes/swarm_presubmit.py +++ b/infra/bots/recipes/swarm_presubmit.py @@ -12,8 +12,8 @@ DEPS = [ 'recipe_engine/properties', 'recipe_engine/step', 'recipe_engine/uuid', - 'skia-recipes/core', - 'skia-recipes/vars', + 'core', + 'vars', ] diff --git a/infra/bots/recipes/swarm_skpbench.py b/infra/bots/recipes/swarm_skpbench.py index 453a74ec58..4561f61dc1 100644 --- a/infra/bots/recipes/swarm_skpbench.py +++ b/infra/bots/recipes/swarm_skpbench.py @@ -10,7 +10,7 @@ DEPS = [ 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/raw_io', - 'skia-recipes/skpbench', + 'skpbench', ] diff --git a/infra/bots/recipes/swarm_test.py b/infra/bots/recipes/swarm_test.py index 58bae30117..2e101ae31c 100644 --- a/infra/bots/recipes/swarm_test.py +++ b/infra/bots/recipes/swarm_test.py @@ -11,7 +11,7 @@ DEPS = [ 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/raw_io', - 'skia-recipes/sktest', + 'sktest', ] diff --git a/infra/bots/recipes/upload_dm_results.py b/infra/bots/recipes/upload_dm_results.py index bd635ef1fa..866c8e22f6 100644 --- a/infra/bots/recipes/upload_dm_results.py +++ b/infra/bots/recipes/upload_dm_results.py @@ -8,7 +8,7 @@ DEPS = [ 'recipe_engine/properties', - 'skia-recipes/upload_dm_results', + 'upload_dm_results', ] diff --git a/infra/bots/recipes/upload_nano_results.py b/infra/bots/recipes/upload_nano_results.py index 037edb18c7..26fe666722 100644 --- a/infra/bots/recipes/upload_nano_results.py +++ b/infra/bots/recipes/upload_nano_results.py @@ -8,7 +8,7 @@ DEPS = [ 'recipe_engine/properties', - 'skia-recipes/upload_nano_results', + 'upload_nano_results', ] diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg index 2520732255..64a3c644e2 100644 --- a/infra/config/recipes.cfg +++ b/infra/config/recipes.cfg @@ -19,9 +19,3 @@ deps { branch: "master" revision: "b120624b72ec851b0d9f2accccf58e525555be25" } -deps { - project_id: "skia-recipes" - url: "https://skia.googlesource.com/skia-recipes.git" - branch: "master" - revision: "1fa59ca74c06de1bf216dfef64f8ced04fddde9d" -} |