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

Side by Side Diff: build/android/test_runner.py

Issue 23082003: Android perf tests: always return 0 on the sharding stage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Runs all types of tests from one unified interface. 7 """Runs all types of tests from one unified interface.
8 8
9 TODO(gkanwar): 9 TODO(gkanwar):
10 * Add options to run Monkey tests. 10 * Add options to run Monkey tests.
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 595
596 def _RunPerfTests(options, error_func): 596 def _RunPerfTests(options, error_func):
597 """Subcommand of RunTestsCommands which runs perf tests.""" 597 """Subcommand of RunTestsCommands which runs perf tests."""
598 perf_options = ProcessPerfTestOptions(options, error_func) 598 perf_options = ProcessPerfTestOptions(options, error_func)
599 # Just print the results from a single previously executed step. 599 # Just print the results from a single previously executed step.
600 if perf_options.print_step: 600 if perf_options.print_step:
601 return perf_test_runner.PrintTestOutput(perf_options.print_step) 601 return perf_test_runner.PrintTestOutput(perf_options.print_step)
602 602
603 runner_factory, tests = perf_setup.Setup(perf_options) 603 runner_factory, tests = perf_setup.Setup(perf_options)
604 604
605 results, exit_code = test_dispatcher.RunTests( 605 results, _ = test_dispatcher.RunTests(
606 tests, runner_factory, False, None, shard=True, test_timeout=None) 606 tests, runner_factory, False, None, shard=True, test_timeout=None)
607 607
608 report_results.LogFull( 608 report_results.LogFull(
609 results=results, 609 results=results,
610 test_type='Perf', 610 test_type='Perf',
611 test_package='Perf', 611 test_package='Perf',
612 build_type=options.build_type) 612 build_type=options.build_type)
613 613 # Always return 0 on the sharding stage. Individual tests exit_code
614 return exit_code 614 # will be returned on the print_step stage.
615 return 0
615 616
616 617
617 def RunTestsCommand(command, options, args, option_parser): 618 def RunTestsCommand(command, options, args, option_parser):
618 """Checks test type and dispatches to the appropriate function. 619 """Checks test type and dispatches to the appropriate function.
619 620
620 Args: 621 Args:
621 command: String indicating the command that was received to trigger 622 command: String indicating the command that was received to trigger
622 this function. 623 this function.
623 options: optparse options dictionary. 624 options: optparse options dictionary.
624 args: List of extra args from optparse. 625 args: List of extra args from optparse.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 option_parser.error('Invalid command.') 750 option_parser.error('Invalid command.')
750 command = argv[1] 751 command = argv[1]
751 VALID_COMMANDS[command].add_options_func(option_parser) 752 VALID_COMMANDS[command].add_options_func(option_parser)
752 options, args = option_parser.parse_args(argv) 753 options, args = option_parser.parse_args(argv)
753 return VALID_COMMANDS[command].run_command_func( 754 return VALID_COMMANDS[command].run_command_func(
754 command, options, args, option_parser) 755 command, options, args, option_parser)
755 756
756 757
757 if __name__ == '__main__': 758 if __name__ == '__main__':
758 sys.exit(main(sys.argv)) 759 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698