| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Launches the gatekeeper.""" | 5 """Launches the gatekeeper.""" |
| 6 | 6 |
| 7 | 7 |
| 8 DEPS = [ | 8 DEPS = [ |
| 9 'gatekeeper', | 9 'gatekeeper', |
| 10 'path', | 10 'path', |
| 11 ] | 11 ] |
| 12 | 12 |
| 13 | 13 |
| 14 def RunSteps(api): | 14 def RunSteps(api): |
| 15 api.gatekeeper( | 15 api.gatekeeper( |
| 16 api.path['build'].join('scripts', 'slave', 'gatekeeper.json'), | 16 api.path['build'].join('scripts', 'slave', 'gatekeeper.json'), |
| 17 api.path['build'].join('scripts', 'slave', 'gatekeeper_trees.json'), | 17 api.path['build'].join('scripts', 'slave', 'gatekeeper_trees.json'), |
| 18 ) | 18 ) |
| 19 | 19 |
| 20 | 20 |
| 21 def GenTests(api): | 21 def GenTests(api): |
| 22 # It is okay to use os here because we are reading the file immediately |
| 23 # on the simulating machine. |
| 24 import os |
| 25 |
| 22 yield ( | 26 yield ( |
| 23 api.test('basic') | 27 api.test('basic') |
| 24 + api.step_data( | 28 + api.step_data( |
| 25 'reading gatekeeper_trees.json', | 29 'reading gatekeeper_trees.json', |
| 26 api.gatekeeper.fake_test_data(), | 30 api.gatekeeper.fake_test_data(), |
| 27 ) | 31 ) |
| 28 ) | 32 ) |
| 29 | 33 |
| 34 yield ( |
| 35 api.test('real') |
| 36 + api.step_data( |
| 37 'reading gatekeeper_trees.json', |
| 38 api.gatekeeper.read_real_config( |
| 39 os.path.join('scripts', 'slave', 'gatekeeper_trees.json') |
| 40 ), |
| 41 ) |
| 42 ) |
| 43 |
| 30 yield ( | 44 yield ( |
| 31 api.test('keep_going') | 45 api.test('keep_going') |
| 32 + api.step_data( | 46 + api.step_data( |
| 33 'reading gatekeeper_trees.json', | 47 'reading gatekeeper_trees.json', |
| 34 api.gatekeeper.fake_test_data(), | 48 api.gatekeeper.fake_test_data(), |
| 35 ) | 49 ) |
| 36 + api.step_data('gatekeeper: chromium', retcode=1) | 50 + api.step_data('gatekeeper: chromium', retcode=1) |
| 37 ) | 51 ) |
| OLD | NEW |