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

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

Issue 1125283009: Run nacltest steps in mojob.py test (on linux) (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: exclude asan Created 5 years, 7 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
« no previous file with comments | « mojo/tools/get_test_list.py ('k') | no next file » | 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 """A simple script to make building/testing Mojo components easier.""" 6 """A simple script to make building/testing Mojo components easier."""
7 7
8 import argparse 8 import argparse
9 from copy import deepcopy 9 from copy import deepcopy
10 import logging 10 import logging
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 def _perftest(config): 193 def _perftest(config):
194 _logger.debug('_perftest()') 194 _logger.debug('_perftest()')
195 return _run_tests(config, [Config.TEST_TYPE_PERF]) 195 return _run_tests(config, [Config.TEST_TYPE_PERF])
196 196
197 197
198 def _pytest(config): 198 def _pytest(config):
199 _logger.debug('_pytest()') 199 _logger.debug('_pytest()')
200 return _run_tests(config, ['python']) 200 return _run_tests(config, ['python'])
201 201
202 202
203 def _nacltest(config):
204 _logger.debug('_nacltest()')
205 return _run_tests(config, ['nacl'])
206
207
208 def main(): 203 def main():
209 os.chdir(Paths().src_root) 204 os.chdir(Paths().src_root)
210 205
211 parser = argparse.ArgumentParser(description='A script to make building' 206 parser = argparse.ArgumentParser(description='A script to make building'
212 '/testing Mojo components easier.') 207 '/testing Mojo components easier.')
213 208
214 parent_parser = argparse.ArgumentParser(add_help=False) 209 parent_parser = argparse.ArgumentParser(add_help=False)
215 210
216 parent_parser.add_argument('--verbose', 211 parent_parser.add_argument('--verbose',
217 help='Be verbose (multiple times for more)', 212 help='Be verbose (multiple times for more)',
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 perftest_parser = subparsers.add_parser('perftest', parents=[parent_parser], 280 perftest_parser = subparsers.add_parser('perftest', parents=[parent_parser],
286 help='Run perf tests (does not build).') 281 help='Run perf tests (does not build).')
287 perftest_parser.set_defaults(func=_perftest) 282 perftest_parser.set_defaults(func=_perftest)
288 283
289 pytest_parser = subparsers.add_parser('pytest', parents=[parent_parser], 284 pytest_parser = subparsers.add_parser('pytest', parents=[parent_parser],
290 help='Run Python unit tests (does not build).') 285 help='Run Python unit tests (does not build).')
291 pytest_parser.set_defaults(func=_pytest) 286 pytest_parser.set_defaults(func=_pytest)
292 287
293 nacltest_parser = subparsers.add_parser('nacltest', parents=[parent_parser], 288 nacltest_parser = subparsers.add_parser('nacltest', parents=[parent_parser],
294 help='Run NaCl unit tests (does not build).') 289 help='Run NaCl unit tests (does not build).')
295 nacltest_parser.set_defaults(func=_nacltest) 290 nacltest_parser.set_defaults(func=lambda config: 0)
296 291
297 args = parser.parse_args() 292 args = parser.parse_args()
298 global _verbose_count 293 global _verbose_count
299 _verbose_count = args.verbose_count 294 _verbose_count = args.verbose_count
300 InitLogging(_verbose_count) 295 InitLogging(_verbose_count)
301 296
302 return args.func(_args_to_config(args)) 297 return args.func(_args_to_config(args))
303 298
304 299
305 if __name__ == '__main__': 300 if __name__ == '__main__':
306 sys.exit(main()) 301 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/tools/get_test_list.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698