aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules
diff options
context:
space:
mode:
Diffstat (limited to 'infra/bots/recipe_modules')
-rw-r--r--infra/bots/recipe_modules/core/api.py23
-rw-r--r--infra/bots/recipe_modules/core/examples/full.expected/cross_repo_trybot.json15
-rw-r--r--infra/bots/recipe_modules/core/examples/full.expected/flutter_trybot.json15
-rw-r--r--infra/bots/recipe_modules/core/examples/full.expected/no_persistent_checkout.json22
-rw-r--r--infra/bots/recipe_modules/core/examples/full.py27
5 files changed, 39 insertions, 63 deletions
diff --git a/infra/bots/recipe_modules/core/api.py b/infra/bots/recipe_modules/core/api.py
index 77934c7ec7..e293c96ee9 100644
--- a/infra/bots/recipe_modules/core/api.py
+++ b/infra/bots/recipe_modules/core/api.py
@@ -17,24 +17,6 @@ from recipe_engine import config_types
class SkiaApi(recipe_api.RecipeApi):
- def setup(self, bot_update=True):
- """Prepare the bot to run."""
- # Setup dependencies.
- self.m.vars.setup()
-
- # Check out the Skia code.
- if bot_update:
- self.checkout_bot_update()
- else:
- self.checkout_git()
-
- if not self.m.path.exists(self.m.vars.tmp_dir):
- self.m.run.run_once(self.m.file.ensure_directory,
- 'makedirs tmp_dir',
- self.m.vars.tmp_dir)
-
- self.m.flavor.setup()
-
def patch_ref(self, issue, patchset):
"""Build a ref for the given issue and patchset."""
return 'refs/changes/%s/%s/%s' % (issue[-2:], issue, patchset)
@@ -54,11 +36,6 @@ class SkiaApi(recipe_api.RecipeApi):
"""Run the steps to obtain a checkout using bot_update."""
cfg_kwargs = {}
is_parent_revision = 'ParentRevision' in self.m.vars.extra_tokens
- if not self.m.vars.persistent_checkout:
- assert not is_parent_revision
- # 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
diff --git a/infra/bots/recipe_modules/core/examples/full.expected/cross_repo_trybot.json b/infra/bots/recipe_modules/core/examples/full.expected/cross_repo_trybot.json
index 4399b6cde2..30f707cec4 100644
--- a/infra/bots/recipe_modules/core/examples/full.expected/cross_repo_trybot.json
+++ b/infra/bots/recipe_modules/core/examples/full.expected/cross_repo_trybot.json
@@ -98,6 +98,21 @@
]
},
{
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "ensure-directory",
+ "--mode",
+ "0777",
+ "[START_DIR]/tmp"
+ ],
+ "infra_step": true,
+ "name": "makedirs tmp_dir"
+ },
+ {
"name": "$result",
"recipe_result": null,
"status_code": 0
diff --git a/infra/bots/recipe_modules/core/examples/full.expected/flutter_trybot.json b/infra/bots/recipe_modules/core/examples/full.expected/flutter_trybot.json
index c73455d175..33a1934e45 100644
--- a/infra/bots/recipe_modules/core/examples/full.expected/flutter_trybot.json
+++ b/infra/bots/recipe_modules/core/examples/full.expected/flutter_trybot.json
@@ -115,6 +115,21 @@
]
},
{
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "ensure-directory",
+ "--mode",
+ "0777",
+ "[START_DIR]/tmp"
+ ],
+ "infra_step": true,
+ "name": "makedirs tmp_dir"
+ },
+ {
"name": "$result",
"recipe_result": null,
"status_code": 0
diff --git a/infra/bots/recipe_modules/core/examples/full.expected/no_persistent_checkout.json b/infra/bots/recipe_modules/core/examples/full.expected/no_persistent_checkout.json
deleted file mode 100644
index f710ace525..0000000000
--- a/infra/bots/recipe_modules/core/examples/full.expected/no_persistent_checkout.json
+++ /dev/null
@@ -1,22 +0,0 @@
-[
- {
- "cmd": [
- "python",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[START_DIR]/tmp"
- ],
- "infra_step": true,
- "name": "makedirs tmp_dir"
- },
- {
- "name": "$result",
- "recipe_result": null,
- "status_code": 0
- }
-] \ No newline at end of file
diff --git a/infra/bots/recipe_modules/core/examples/full.py b/infra/bots/recipe_modules/core/examples/full.py
index 4718ddf72e..f3cfb29ca7 100644
--- a/infra/bots/recipe_modules/core/examples/full.py
+++ b/infra/bots/recipe_modules/core/examples/full.py
@@ -5,16 +5,24 @@
DEPS = [
'core',
+ 'recipe_engine/file',
'recipe_engine/path',
'recipe_engine/properties',
+ 'run',
+ 'vars',
]
def RunSteps(api):
+ api.vars.setup()
bot_update = True
if 'NoDEPS' in api.properties['buildername']:
bot_update = False
- api.core.setup(bot_update=bot_update)
+ if bot_update:
+ api.core.checkout_bot_update()
+ else:
+ api.core.checkout_git()
+ api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
def GenTests(api):
@@ -61,23 +69,6 @@ def GenTests(api):
)
)
- buildername = ('Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-' +
- 'Debug-All-ANGLE')
- yield (
- api.test('no_persistent_checkout') +
- api.properties(buildername=buildername,
- repository='https://skia.googlesource.com/skia.git',
- revision='abc123',
- path_config='kitchen',
- swarm_out_dir='[SWARM_OUT_DIR]') +
- api.properties(patch_storage='gerrit') +
- api.properties.tryserver(
- buildername=buildername,
- gerrit_project='skia',
- gerrit_url='https://skia-review.googlesource.com/',
- )
- )
-
buildername = 'Build-Debian9-GCC-x86_64-Release-Flutter_Android'
yield (
api.test('flutter_trybot') +