| Index: scripts/slave/recipe_modules/recipe_tryjob/test_api.py
|
| diff --git a/scripts/slave/recipe_modules/recipe_tryjob/test_api.py b/scripts/slave/recipe_modules/recipe_tryjob/test_api.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7d7c5d49be06e307eab511bb2bf260eda0db0a48
|
| --- /dev/null
|
| +++ b/scripts/slave/recipe_modules/recipe_tryjob/test_api.py
|
| @@ -0,0 +1,29 @@
|
| +# 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_test_api
|
| +
|
| +
|
| +class RecipeTryjobTestApi(recipe_test_api.RecipeTestApi):
|
| + def make_recipe_config(self, name, deps=None):
|
| + if not deps:
|
| + deps = []
|
| +
|
| + # Deps should be a list of project ids
|
| + config = [
|
| + 'api_version: 1',
|
| + 'project_id: "%s"' % name,
|
| + 'recipes_path: ""',
|
| + '',
|
| + ]
|
| + for dep in deps:
|
| + config += [
|
| + 'deps {',
|
| + ' project_id: "%s"' % dep,
|
| + ' url: "https://repo.url/foo.git"',
|
| + ' branch: "master"',
|
| + ' revision: "deadbeef"',
|
| + '}',
|
| + ]
|
| + return '\n'.join(config)
|
|
|