OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 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 DEPS = ['step', 'chromium', 'step_history', 'path', 'gclient', 'rietveld', | 5 DEPS = [ |
6 'properties', 'json'] | 6 'chromium', |
| 7 'gclient', |
| 8 'json', |
| 9 'path', |
| 10 'properties', |
| 11 'python', |
| 12 'rietveld', |
| 13 'step', |
| 14 'step_history', |
| 15 ] |
7 | 16 |
8 def GenSteps(api): | 17 def GenSteps(api): |
9 api.chromium.set_config('blink') | 18 api.chromium.set_config('blink', GIT_MODE=True) |
10 api.chromium.apply_config('trybot_flavor') | 19 api.chromium.apply_config('trybot_flavor') |
11 api.step.auto_resolve_conflicts = True | 20 api.step.auto_resolve_conflicts = True |
12 | 21 |
13 webkit_lint = api.path.build('scripts', 'slave', 'chromium', | 22 webkit_lint = api.path.build('scripts', 'slave', 'chromium', |
14 'lint_test_files_wrapper.py') | 23 'lint_test_files_wrapper.py') |
15 | 24 |
16 def BlinkTestsStep(with_patch): | 25 def BlinkTestsStep(with_patch): |
17 name = 'webkit_tests (with%s patch)' % ('' if with_patch else 'out') | 26 name = 'webkit_tests (with%s patch)' % ('' if with_patch else 'out') |
18 test = api.path.build('scripts', 'slave', 'chromium', | 27 test = api.path.build('scripts', 'slave', 'chromium', |
19 'layout_test_wrapper.py') | 28 'layout_test_wrapper.py') |
20 args = ['--target', api.chromium.c.BUILD_CONFIG, | 29 args = ['--target', api.chromium.c.BUILD_CONFIG, |
21 '-o', api.path.slave_build('layout-test-results'), | 30 '-o', api.path.slave_build('layout-test-results'), |
22 '--build-dir', api.path.checkout(api.chromium.c.build_dir), | 31 '--build-dir', api.path.checkout(api.chromium.c.build_dir), |
23 api.json.output()] | 32 api.json.output()] |
24 return api.chromium.runtests(test, args, name=name, can_fail_build=False) | 33 return api.chromium.runtests(test, args, name=name, can_fail_build=False) |
25 | 34 |
26 yield ( | 35 yield ( |
27 api.gclient.checkout(), | 36 api.gclient.checkout(), |
28 api.rietveld.apply_issue('third_party', 'WebKit'), | 37 api.rietveld.apply_issue('third_party', 'WebKit'), |
29 api.chromium.runhooks(), | 38 api.chromium.runhooks(), |
30 api.chromium.compile(), | 39 api.chromium.compile(), |
31 api.chromium.runtests('webkit_unit_tests'), | 40 api.chromium.runtests('webkit_unit_tests'), |
32 api.step('webkit_lint', [ | 41 api.python('webkit_lint', webkit_lint, [ |
33 'python', webkit_lint, '--build-dir', api.path.checkout('out'), | 42 '--build-dir', api.path.checkout('out'), |
34 '--target', api.properties['build_config']]), | 43 '--target', api.properties['build_config']]) |
35 ) | 44 ) |
36 | 45 |
37 yield BlinkTestsStep(with_patch=True) | 46 yield BlinkTestsStep(with_patch=True) |
38 if api.step_history.last_step().retcode == 0: | 47 if api.step_history.last_step().retcode == 0: |
39 yield api.step('webkit_tests', ['python', '-c', 'print "ALL IS WELL"']) | 48 yield api.python.inline('webkit_tests', 'print "ALL IS WELL"') |
40 return | 49 return |
41 | 50 |
42 failing_tests = api.step_history.last_step().json.output | 51 failing_tests = api.step_history.last_step().json.output |
43 | 52 |
44 yield ( | 53 yield ( |
45 api.gclient.revert(), | 54 api.gclient.revert(), |
46 api.chromium.runhooks(), | 55 api.chromium.runhooks(), |
47 api.chromium.compile(), | 56 api.chromium.compile(), |
48 BlinkTestsStep(with_patch=False), | 57 BlinkTestsStep(with_patch=False), |
49 ) | 58 ) |
50 base_failing_tests = api.step_history.last_step().json.output | 59 base_failing_tests = api.step_history.last_step().json.output |
51 | 60 |
52 final_script = ['python', | 61 yield api.python( |
| 62 'webkit_tests', |
53 api.path.checkout('third_party', 'WebKit', 'Tools', 'Scripts', | 63 api.path.checkout('third_party', 'WebKit', 'Tools', 'Scripts', |
54 'print-json-test-results'), | 64 'print-json-test-results'), |
55 '--ignored-failures-path', api.json.input(base_failing_tests), | 65 ['--ignored-failures-path', api.json.input(base_failing_tests), |
56 api.json.input(failing_tests), | 66 api.json.input(failing_tests)] |
57 ] | 67 ) |
58 yield api.step('webkit_tests', final_script) | |
59 | 68 |
60 | 69 |
61 def GenTests(api): | 70 def GenTests(api): |
62 SUCCESS_DATA = lambda: {} | 71 SUCCESS_DATA = lambda: {} |
63 | 72 |
64 FAIL_DATA = lambda: { | 73 FAIL_DATA = lambda: { |
65 'webkit_tests (with patch)': { | 74 'webkit_tests (with patch)': { |
66 'json': {'output': {'crazy': ['data', 'format']}}, | 75 'json': {'output': {'crazy': ['data', 'format']}}, |
67 '$R': 1 | 76 '$R': 1 |
68 }, | 77 }, |
(...skipping 12 matching lines...) Expand all Loading... |
81 config_name='blink', | 90 config_name='blink', |
82 root='src/third_party/WebKit', | 91 root='src/third_party/WebKit', |
83 ), | 92 ), |
84 'step_mocks': step_mocks(), | 93 'step_mocks': step_mocks(), |
85 'mock': { | 94 'mock': { |
86 'platform': { | 95 'platform': { |
87 'name': plat | 96 'name': plat |
88 } | 97 } |
89 } | 98 } |
90 } | 99 } |
OLD | NEW |