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

Side by Side Diff: tools/run-bisect-perf-regression.py

Issue 511043002: Rename run-bisect-perf-regression.cfg -> auto_bisect/bisect.cfg (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix PRESUBMIT.py so that it checks for the config file in its new location. Created 6 years, 3 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 | « tools/run-bisect-perf-regression.cfg ('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 (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 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 """Run Performance Test Bisect Tool 6 """Run Performance Test Bisect Tool
7 7
8 This script is used by a try bot to run the src/tools/bisect-perf-regression.py 8 This script is used by a try bot to run the src/tools/bisect-perf-regression.py
9 script with the parameters specified in run-bisect-perf-regression.cfg. It will 9 script with the parameters specified in src/tools/auto_bisect/bisect.cfg.
10 check out a copy of the depot in a subdirectory 'bisect' of the working 10 It will check out a copy of the depot in a subdirectory 'bisect' of the working
11 directory provided, and run the bisect-perf-regression.py script there. 11 directory provided, and run the bisect-perf-regression.py script there.
12
13 """ 12 """
14 13
15 import imp 14 import imp
16 import optparse 15 import optparse
17 import os 16 import os
18 import platform 17 import platform
19 import subprocess 18 import subprocess
20 import sys 19 import sys
21 import traceback 20 import traceback
22 21
23 from auto_bisect import bisect_utils 22 from auto_bisect import bisect_utils
24 from auto_bisect import math_utils 23 from auto_bisect import math_utils
25 24
26 bisect = imp.load_source('bisect-perf-regression', 25 bisect = imp.load_source('bisect-perf-regression',
27 os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 26 os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])),
28 'bisect-perf-regression.py')) 27 'bisect-perf-regression.py'))
29 28
30 29
31 CROS_BOARD_ENV = 'BISECT_CROS_BOARD' 30 CROS_BOARD_ENV = 'BISECT_CROS_BOARD'
32 CROS_IP_ENV = 'BISECT_CROS_IP' 31 CROS_IP_ENV = 'BISECT_CROS_IP'
33 32
34 # Default config file names. 33 # Default config file paths, relative to this script.
35 BISECT_REGRESSION_CONFIG = 'run-bisect-perf-regression.cfg' 34 BISECT_REGRESSION_CONFIG = os.path.join('auto_bisect', 'bisect.cfg')
36 RUN_TEST_CONFIG = 'run-perf-test.cfg' 35 RUN_TEST_CONFIG = 'run-perf-test.cfg'
37 WEBKIT_RUN_TEST_CONFIG = os.path.join( 36 WEBKIT_RUN_TEST_CONFIG = os.path.join(
38 '..', 'third_party', 'WebKit', 'Tools', 'run-perf-test.cfg') 37 '..', 'third_party', 'WebKit', 'Tools', 'run-perf-test.cfg')
39 38
39
40 class Goma(object): 40 class Goma(object):
41 41
42 def __init__(self, path_to_goma): 42 def __init__(self, path_to_goma):
43 self._abs_path_to_goma = None 43 self._abs_path_to_goma = None
44 self._abs_path_to_goma_file = None 44 self._abs_path_to_goma_file = None
45 if not path_to_goma: 45 if not path_to_goma:
46 return 46 return
47 self._abs_path_to_goma = os.path.abspath(path_to_goma) 47 self._abs_path_to_goma = os.path.abspath(path_to_goma)
48 filename = 'goma_ctl.bat' if os.name == 'nt' else 'goma_ctl.sh' 48 filename = 'goma_ctl.bat' if os.name == 'nt' else 'goma_ctl.sh'
49 self._abs_path_to_goma_file = os.path.join(self._abs_path_to_goma, filename) 49 self._abs_path_to_goma_file = os.path.join(self._abs_path_to_goma, filename)
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 for k, v in config.iteritems(): 478 for k, v in config.iteritems():
479 print ' %s : %s' % (k, v) 479 print ' %s : %s' % (k, v)
480 print 480 print
481 bisect_utils.OutputAnnotationStepClosed() 481 bisect_utils.OutputAnnotationStepClosed()
482 482
483 483
484 def _OptionParser(): 484 def _OptionParser():
485 """Returns the options parser for run-bisect-perf-regression.py.""" 485 """Returns the options parser for run-bisect-perf-regression.py."""
486 usage = ('%prog [options] [-- chromium-options]\n' 486 usage = ('%prog [options] [-- chromium-options]\n'
487 'Used by a try bot to run the bisection script using the parameters' 487 'Used by a try bot to run the bisection script using the parameters'
488 ' provided in the run-bisect-perf-regression.cfg file.') 488 ' provided in the auto_bisect/bisect.cfg file.')
489 parser = optparse.OptionParser(usage=usage) 489 parser = optparse.OptionParser(usage=usage)
490 parser.add_option('-w', '--working_directory', 490 parser.add_option('-w', '--working_directory',
491 type='str', 491 type='str',
492 help='A working directory to supply to the bisection ' 492 help='A working directory to supply to the bisection '
493 'script, which will use it as the location to checkout ' 493 'script, which will use it as the location to checkout '
494 'a copy of the chromium depot.') 494 'a copy of the chromium depot.')
495 parser.add_option('-p', '--path_to_goma', 495 parser.add_option('-p', '--path_to_goma',
496 type='str', 496 type='str',
497 help='Path to goma directory. If this is supplied, goma ' 497 help='Path to goma directory. If this is supplied, goma '
498 'builds will be enabled.') 498 'builds will be enabled.')
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 current_perf_cfg_file) 559 current_perf_cfg_file)
560 560
561 config = _LoadConfigFile(path_to_perf_cfg) 561 config = _LoadConfigFile(path_to_perf_cfg)
562 config_is_valid = _ValidatePerfConfigFile(config) 562 config_is_valid = _ValidatePerfConfigFile(config)
563 563
564 if config and config_is_valid: 564 if config and config_is_valid:
565 return _SetupAndRunPerformanceTest( 565 return _SetupAndRunPerformanceTest(
566 config, current_dir, opts.path_to_goma) 566 config, current_dir, opts.path_to_goma)
567 567
568 print ('Error: Could not load config file. Double check your changes to ' 568 print ('Error: Could not load config file. Double check your changes to '
569 'run-bisect-perf-regression.cfg or run-perf-test.cfg for syntax ' 569 'auto_bisect/bisect.cfg or run-perf-test.cfg for syntax '
570 'errors.\n') 570 'errors.\n')
571 return 1 571 return 1
572 572
573 573
574 if __name__ == '__main__': 574 if __name__ == '__main__':
575 sys.exit(main()) 575 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/run-bisect-perf-regression.cfg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698