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 | |
26 yield ( | 22 yield ( |
27 api.test('basic') | 23 api.test('basic') |
28 + api.step_data( | 24 + api.step_data( |
29 'reading gatekeeper_trees.json', | 25 'reading gatekeeper_trees.json', |
30 api.gatekeeper.fake_test_data(), | 26 api.gatekeeper.fake_test_data(), |
31 ) | 27 ) |
32 ) | 28 ) |
33 | 29 |
34 yield ( | 30 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 | |
44 yield ( | |
45 api.test('keep_going') | 31 api.test('keep_going') |
46 + api.step_data( | 32 + api.step_data( |
47 'reading gatekeeper_trees.json', | 33 'reading gatekeeper_trees.json', |
48 api.gatekeeper.fake_test_data(), | 34 api.gatekeeper.fake_test_data(), |
49 ) | 35 ) |
50 + api.step_data('gatekeeper: chromium', retcode=1) | 36 + api.step_data('gatekeeper: chromium', retcode=1) |
51 ) | 37 ) |
OLD | NEW |