aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/build/examples
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2018-05-18 07:36:55 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-18 11:58:14 +0000
commit72f6668eb73405874155b7b03077230559ee681e (patch)
tree4dc8de37518a9e442ac8ec15f727fd32c6b312a4 /infra/bots/recipe_modules/build/examples
parent50edafacc8ea56bdc13fd2234618fe06094eec0e (diff)
[recipes] Move a lot of logic out of vars module
In general, vars should only contain variables which are the same for all tasks. Variables specific to compilation belong in the build module (or compile recipe), and those specific to running tests belong in the flavor module, or the individual recipe which uses them. Bug: skia:6473 Change-Id: Ifd55a57118c5801e6f4934a6b5de9d1567415b9a Reviewed-on: https://skia-review.googlesource.com/128545 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/build/examples')
-rw-r--r--infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json14
-rw-r--r--infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-GCC-x86_64-Release-Flutter_Android.json4
-rw-r--r--infra/bots/recipe_modules/build/examples/full.py23
3 files changed, 21 insertions, 20 deletions
diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json
index 762dc757d5..f98a77e515 100644
--- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json
+++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json
@@ -142,20 +142,6 @@
]
},
{
- "cmd": [
- "python",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "copy",
- "[START_DIR]/cache/work/skia/infra/cts/whitelist_devices.json",
- "[START_DIR]/[SWARM_OUT_DIR]/out/devrel"
- ],
- "infra_step": true,
- "name": "copy whitelist"
- },
- {
"name": "$result",
"recipe_result": null,
"status_code": 0
diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-GCC-x86_64-Release-Flutter_Android.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-GCC-x86_64-Release-Flutter_Android.json
index 3be7441907..90d0df0f2d 100644
--- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-GCC-x86_64-Release-Flutter_Android.json
+++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-GCC-x86_64-Release-Flutter_Android.json
@@ -30,7 +30,7 @@
"cmd": [
"ninja",
"-C",
- "out/android_release",
+ "[START_DIR]/cache/work/flutter/src/out/android_release",
"-j100"
],
"cwd": "[START_DIR]/cache/work/flutter/src",
@@ -45,7 +45,7 @@
"python",
"-u",
"import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['bookmaker', 'dm', 'dm.exe', 'dm.app', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skiaserve', 'lib/*.so', 'run_testlab', 'skqp-universal-debug.apk', 'whitelist_devices.json']\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]/cache/work/flutter/src/third_party/skia/out/Build-Debian9-GCC-x86_64-Release-Flutter_Android/Release",
+ "[START_DIR]/cache/work/flutter/src/out/android_release",
"[START_DIR]/[SWARM_OUT_DIR]/out/Release"
],
"infra_step": true,
diff --git a/infra/bots/recipe_modules/build/examples/full.py b/infra/bots/recipe_modules/build/examples/full.py
index 8b801410f5..aca20a6195 100644
--- a/infra/bots/recipe_modules/build/examples/full.py
+++ b/infra/bots/recipe_modules/build/examples/full.py
@@ -5,6 +5,7 @@
DEPS = [
'build',
+ 'recipe_engine/path',
'recipe_engine/properties',
'recipe_engine/raw_io',
'run',
@@ -15,10 +16,24 @@ DEPS = [
def RunSteps(api):
api.vars.setup()
- api.build()
- api.build.copy_build_products(
- api.vars.swarming_out_dir.join(
- 'out', api.vars.configuration))
+ # Hackery to avoid changing expectations.
+ checkout_root = api.vars.cache_dir.join('work')
+ out_dir = checkout_root.join(
+ 'skia', 'out', api.vars.builder_name, api.vars.configuration)
+ if ('CheckGeneratedFiles' in api.vars.builder_name or
+ '-CT_' in api.vars.builder_name):
+ out_dir = api.vars.build_dir.join('out', api.vars.configuration)
+ elif 'NoDEPS' in api.vars.builder_name:
+ checkout_root = api.path['start_dir']
+ out_dir = checkout_root.join(
+ 'skia', 'out', api.vars.builder_name, api.vars.configuration)
+ elif 'Flutter' in api.vars.builder_name:
+ checkout_root = checkout_root.join('flutter')
+ out_dir = checkout_root.join('src', 'out', 'android_release')
+
+ api.build(checkout_root=checkout_root, out_dir=out_dir)
+ dst = api.vars.swarming_out_dir.join('out', api.vars.configuration)
+ api.build.copy_build_products(out_dir=out_dir, dst=dst)
api.run.check_failure()