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

Side by Side Diff: tools/valgrind/chrome_tests.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « tools/valgrind/asan/chrome_tests.py ('k') | tools/valgrind/common.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/python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 # chrome_tests.py
7
8 ''' Runs various chrome tests through valgrind_test.py.''' 6 ''' Runs various chrome tests through valgrind_test.py.'''
9 7
10 import glob 8 import glob
11 import logging 9 import logging
12 import optparse 10 import optparse
13 import os 11 import os
14 import stat 12 import stat
15 import sys 13 import sys
16 14
17 import logging_utils 15 import logging_utils
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 "test_shell": TestTestShell, "test_shell_tests": TestTestShell, 450 "test_shell": TestTestShell, "test_shell_tests": TestTestShell,
453 "ui": TestUI, "ui_tests": TestUI, 451 "ui": TestUI, "ui_tests": TestUI,
454 "unit": TestUnit, "unit_tests": TestUnit, 452 "unit": TestUnit, "unit_tests": TestUnit,
455 "sql": TestSql, "sql_unittests": TestSql, 453 "sql": TestSql, "sql_unittests": TestSql,
456 "ui_unit": TestUIUnit, "ui_unittests": TestUIUnit, 454 "ui_unit": TestUIUnit, "ui_unittests": TestUIUnit,
457 "gfx": TestGfx, "gfx_unittests": TestGfx, 455 "gfx": TestGfx, "gfx_unittests": TestGfx,
458 "gpu": TestGPU, "gpu_unittests": TestGPU, 456 "gpu": TestGPU, "gpu_unittests": TestGPU,
459 "views": TestViews, "views_unittests": TestViews, 457 "views": TestViews, "views_unittests": TestViews,
460 } 458 }
461 459
462 def _main(_): 460
461 def _main():
463 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " 462 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> "
464 "[-t <test> ...]") 463 "[-t <test> ...]")
465 parser.disable_interspersed_args() 464 parser.disable_interspersed_args()
466 parser.add_option("-b", "--build_dir", 465 parser.add_option("-b", "--build_dir",
467 help="the location of the compiler output") 466 help="the location of the compiler output")
468 parser.add_option("-t", "--test", action="append", default=[], 467 parser.add_option("-t", "--test", action="append", default=[],
469 help="which test to run, supports test:gtest_filter format " 468 help="which test to run, supports test:gtest_filter format "
470 "as well.") 469 "as well.")
471 parser.add_option("", "--baseline", action="store_true", default=False, 470 parser.add_option("", "--baseline", action="store_true", default=False,
472 help="generate baseline data instead of validating") 471 help="generate baseline data instead of validating")
(...skipping 29 matching lines...) Expand all
502 parser.error("--gtest_filter and multiple tests don't make sense together") 501 parser.error("--gtest_filter and multiple tests don't make sense together")
503 502
504 for t in options.test: 503 for t in options.test:
505 tests = ChromeTests(options, args, t) 504 tests = ChromeTests(options, args, t)
506 ret = tests.Run() 505 ret = tests.Run()
507 if ret: return ret 506 if ret: return ret
508 return 0 507 return 0
509 508
510 509
511 if __name__ == "__main__": 510 if __name__ == "__main__":
512 ret = _main(sys.argv) 511 sys.exit(_main())
513 sys.exit(ret)
OLDNEW
« no previous file with comments | « tools/valgrind/asan/chrome_tests.py ('k') | tools/valgrind/common.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698