Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: build/android/buildbot/bb_host_steps.py

Issue 18323020: Updates the test runner script exit codes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Temporarily copies buildbot_report.py to buildbot Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import sys 7 import sys
8 8
9 import bb_utils 9 import bb_utils
10 import buildbot_report
10 11
11 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) 12 sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
12 from pylib import buildbot_report
13 from pylib import constants 13 from pylib import constants
14 14
15 15
16 SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave') 16 SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave')
17 VALID_HOST_TESTS = set(['check_webview_licenses', 'findbugs']) 17 VALID_HOST_TESTS = set(['check_webview_licenses', 'findbugs'])
18 EXPERIMENTAL_TARGETS = ['android_experimental'] 18 EXPERIMENTAL_TARGETS = ['android_experimental']
19 19
20 # Short hand for RunCmd which is used extensively in this file. 20 # Short hand for RunCmd which is used extensively in this file.
21 RunCmd = bb_utils.RunCmd 21 RunCmd = bb_utils.RunCmd
22 22
23 23
24 def SrcPath(*path): 24 def SrcPath(*path):
25 return os.path.join(constants.DIR_SOURCE_ROOT, *path) 25 return os.path.join(constants.DIR_SOURCE_ROOT, *path)
26 26
27 27
28 def CheckWebViewLicenses(_): 28 def CheckWebViewLicenses(_):
29 buildbot_report.PrintNamedStep('check_licenses') 29 buildbot_report.PrintNamedStep('check_licenses')
30 RunCmd([SrcPath('android_webview', 'tools', 'webview_licenses.py'), 'scan'], 30 RunCmd([SrcPath('android_webview', 'tools', 'webview_licenses.py'), 'scan'],
31 warning_code=1) 31 flunk_on_failure=False)
32 32
33 33
34 def RunHooks(build_type): 34 def RunHooks(build_type):
35 RunCmd([SrcPath('build', 'landmines.py')]) 35 RunCmd([SrcPath('build', 'landmines.py')])
36 build_path = SrcPath('out', build_type) 36 build_path = SrcPath('out', build_type)
37 landmine_path = os.path.join(build_path, '.landmines_triggered') 37 landmine_path = os.path.join(build_path, '.landmines_triggered')
38 clobber_env = os.environ.get('BUILDBOT_CLOBBER') 38 clobber_env = os.environ.get('BUILDBOT_CLOBBER')
39 if clobber_env or os.path.isfile(landmine_path): 39 if clobber_env or os.path.isfile(landmine_path):
40 buildbot_report.PrintNamedStep('Clobber') 40 buildbot_report.PrintNamedStep('Clobber')
41 if not clobber_env: 41 if not clobber_env:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 '--exclude-files', 'lib.target,gen,android_webview,jingle_unittests'] 74 '--exclude-files', 'lib.target,gen,android_webview,jingle_unittests']
75 + bb_utils.EncodeProperties(options)) 75 + bb_utils.EncodeProperties(options))
76 76
77 77
78 def ExtractBuild(options): 78 def ExtractBuild(options):
79 buildbot_report.PrintNamedStep('extract_build') 79 buildbot_report.PrintNamedStep('extract_build')
80 RunCmd( 80 RunCmd(
81 [os.path.join(SLAVE_SCRIPTS_DIR, 'extract_build.py'), 81 [os.path.join(SLAVE_SCRIPTS_DIR, 'extract_build.py'),
82 '--build-dir', SrcPath('build'), '--build-output-dir', 82 '--build-dir', SrcPath('build'), '--build-output-dir',
83 SrcPath('out')] + bb_utils.EncodeProperties(options), 83 SrcPath('out')] + bb_utils.EncodeProperties(options),
84 warning_code=1) 84 flunk_on_failure=False)
85 85
86 86
87 def FindBugs(options): 87 def FindBugs(options):
88 buildbot_report.PrintNamedStep('findbugs') 88 buildbot_report.PrintNamedStep('findbugs')
89 build_type = [] 89 build_type = []
90 if options.target == 'Release': 90 if options.target == 'Release':
91 build_type = ['--release-build'] 91 build_type = ['--release-build']
92 RunCmd([SrcPath('build', 'android', 'findbugs_diff.py')] + build_type) 92 RunCmd([SrcPath('build', 'android', 'findbugs_diff.py')] + build_type)
93 RunCmd([SrcPath( 93 RunCmd([SrcPath(
94 'tools', 'android', 'findbugs_plugin', 'test', 94 'tools', 'android', 'findbugs_plugin', 'test',
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 return sys.exit('Unused args %s' % args) 133 return sys.exit('Unused args %s' % args)
134 134
135 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) 135 setattr(options, 'target', options.factory_properties.get('target', 'Debug'))
136 136
137 if options.steps: 137 if options.steps:
138 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options) 138 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options)
139 139
140 140
141 if __name__ == '__main__': 141 if __name__ == '__main__':
142 sys.exit(main(sys.argv)) 142 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698