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

Side by Side Diff: mojo/tools/mojob.py

Issue 726313007: Add the ability to upload sky_tests to the flakiness dashboard. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove build-name argument. Created 6 years, 1 month 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
« no previous file with comments | « no previous file | sky/tools/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 # This a simple script to make building/testing Mojo components easier. 6 # This a simple script to make building/testing Mojo components easier.
7 7
8 import argparse 8 import argparse
9 import os 9 import os
10 import platform 10 import platform
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 command = [] 126 command = []
127 command.append('./testing/xvfb.py') 127 command.append('./testing/xvfb.py')
128 command.append(out_dir) 128 command.append(out_dir)
129 command.append('sky/tools/test_sky') 129 command.append('sky/tools/test_sky')
130 command.append('-t') 130 command.append('-t')
131 command.append('Debug' if args.debug else 'Release') 131 command.append('Debug' if args.debug else 'Release')
132 command.append('--no-new-test-results') 132 command.append('--no-new-test-results')
133 command.append('--no-show-results') 133 command.append('--no-show-results')
134 command.append('--verbose') 134 command.append('--verbose')
135
136 if args.builder_name:
137 command.append('--builder-name')
138 command.append(args.builder_name)
139
140 if args.build_number:
141 command.append('--build-number')
142 command.append(args.build_number)
143
144 if args.master_name:
145 command.append('--master-name')
146 command.append(args.master_name)
147
148 if args.test_results_server:
149 command.append('--test-results-server')
150 command.append(args.test_results_server)
151
135 return subprocess.call(command) 152 return subprocess.call(command)
136 153
137 154
138 def run_pytests(args): 155 def run_pytests(args):
139 out_dir = get_out_dir(args) 156 out_dir = get_out_dir(args)
140 print 'Running python tests in %s ...' % out_dir 157 print 'Running python tests in %s ...' % out_dir
141 command = ['python'] 158 command = ['python']
142 command.append(os.path.join('mojo', 'tools', 'run_mojo_python_tests.py')) 159 command.append(os.path.join('mojo', 'tools', 'run_mojo_python_tests.py'))
143 exit_code = subprocess.call(command) 160 exit_code = subprocess.call(command)
144 if exit_code: 161 if exit_code:
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 dest='goma', action='store_false') 253 dest='goma', action='store_false')
237 254
238 build_parser = subparsers.add_parser('build', parents=[parent_parser], 255 build_parser = subparsers.add_parser('build', parents=[parent_parser],
239 help='Build') 256 help='Build')
240 build_parser.set_defaults(func=build) 257 build_parser.set_defaults(func=build)
241 258
242 test_parser = subparsers.add_parser('test', parents=[parent_parser], 259 test_parser = subparsers.add_parser('test', parents=[parent_parser],
243 help='Run unit tests (does not build).') 260 help='Run unit tests (does not build).')
244 test_parser.set_defaults(func=test) 261 test_parser.set_defaults(func=test)
245 262
263 # Arguments required for uploading to the flakiness dashboard.
264 test_parser.add_argument('--master-name',
265 help='The name of the buildbot master.')
266 test_parser.add_argument('--builder-name',
267 help=('The name of the builder shown on the waterfall running '
268 'this script e.g. Mojo Linux.'))
269 test_parser.add_argument('--build-number',
270 help='The build number of the builder running this script.')
271 test_parser.add_argument('--test-results-server',
272 help='Upload results json files to this appengine server.')
273
246 perftest_parser = subparsers.add_parser('perftest', parents=[parent_parser], 274 perftest_parser = subparsers.add_parser('perftest', parents=[parent_parser],
247 help='Run perf tests (does not build).') 275 help='Run perf tests (does not build).')
248 perftest_parser.set_defaults(func=perftest) 276 perftest_parser.set_defaults(func=perftest)
249 277
250 pytest_parser = subparsers.add_parser('pytest', parents=[parent_parser], 278 pytest_parser = subparsers.add_parser('pytest', parents=[parent_parser],
251 help='Run Python unit tests (does not build).') 279 help='Run Python unit tests (does not build).')
252 pytest_parser.set_defaults(func=pytest) 280 pytest_parser.set_defaults(func=pytest)
253 281
254 darttest_parser = subparsers.add_parser('darttest', parents=[parent_parser], 282 darttest_parser = subparsers.add_parser('darttest', parents=[parent_parser],
255 help='Run Dart unit tests (does not build).') 283 help='Run Dart unit tests (does not build).')
256 darttest_parser.set_defaults(func=darttest) 284 darttest_parser.set_defaults(func=darttest)
257 285
258 args = parser.parse_args() 286 args = parser.parse_args()
259 287
260 # Android always wants GCC. 288 # Android always wants GCC.
261 if args.android: 289 if args.android:
262 args.clang = False 290 args.clang = False
263 291
264 if platform.system() == 'Windows': 292 if platform.system() == 'Windows':
265 args.clang = False 293 args.clang = False
266 294
267 return args.func(args) 295 return args.func(args)
268 296
269 297
270 if __name__ == '__main__': 298 if __name__ == '__main__':
271 sys.exit(main()) 299 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | sky/tools/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698