OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from recipe_engine import recipe_test_api |
| 6 |
| 7 |
| 8 class RecipeTryjobTestApi(recipe_test_api.RecipeTestApi): |
| 9 def make_recipe_config(self, name, deps=None): |
| 10 if not deps: |
| 11 deps = [] |
| 12 |
| 13 # Deps should be a list of project ids |
| 14 config = [ |
| 15 'api_version: 1', |
| 16 'project_id: "%s"' % name, |
| 17 'recipes_path: ""', |
| 18 '', |
| 19 ] |
| 20 for dep in deps: |
| 21 config += [ |
| 22 'deps {', |
| 23 ' project_id: "%s"' % dep, |
| 24 ' url: "https://repo.url/foo.git"', |
| 25 ' branch: "master"', |
| 26 ' revision: "deadbeef"', |
| 27 '}', |
| 28 ] |
| 29 return '\n'.join(config) |
OLD | NEW |