blob: 6124819cb5c4bea3d68e3e6fb0417b2abb0b881a [file] [log] [blame]
[email protected]4f35c8b2012-12-10 12:49:271#!/usr/bin/env python
2#
3# Copyright (c) 2012 The Chromium Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
[email protected]4f188992013-08-14 22:06:417"""DEPRECATED!
8TODO(bulach): remove me once all other repositories reference
9'test_runner.py perf' directly.
[email protected]4f35c8b2012-12-10 12:49:2710"""
11
[email protected]4f35c8b2012-12-10 12:49:2712import optparse
[email protected]4f35c8b2012-12-10 12:49:2713import os
[email protected]4f35c8b2012-12-10 12:49:2714import sys
15
[email protected]4f35c8b2012-12-10 12:49:2716from pylib import cmd_helper
[email protected]4f35c8b2012-12-10 12:49:2717
18
19def main(argv):
20 parser = optparse.OptionParser()
21 parser.add_option('-s', '--steps',
22 help='A JSON file containing all the steps to be '
23 'sharded.')
[email protected]ef715b02013-02-26 19:43:3124 parser.add_option('--flaky_steps',
25 help='A JSON file containing steps that are flaky and '
26 'will have its exit code ignored.')
[email protected]4f35c8b2012-12-10 12:49:2727 parser.add_option('-p', '--print_results',
28 help='Only prints the results for the previously '
29 'executed step, do not run it again.')
30 options, urls = parser.parse_args(argv)
31 if options.print_results:
[email protected]4f188992013-08-14 22:06:4132 return cmd_helper.RunCmd(['build/android/test_runner.py', 'perf',
33 '--print-step', options.print_results])
34 flaky_options = []
[email protected]ef715b02013-02-26 19:43:3135 if options.flaky_steps:
[email protected]4f188992013-08-14 22:06:4136 flaky_options = ['--flaky-steps', options.flaky_steps]
[email protected]5b97ce52013-08-19 11:06:0937 return cmd_helper.RunCmd(['build/android/test_runner.py', 'perf', '-v',
[email protected]4f188992013-08-14 22:06:4138 '--steps', options.steps] + flaky_options)
[email protected]4f35c8b2012-12-10 12:49:2739
40
41if __name__ == '__main__':
42 sys.exit(main(sys.argv))