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

Side by Side Diff: tools/testing/perf_testing/run_perf_tests.py

Issue 10826125: Properly update chromedriver. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | tools/testing/webdriver_test_setup.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/python
2 2
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 6
7 import datetime 7 import datetime
8 import math 8 import math
9 import optparse 9 import optparse
10 import os 10 import os
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 if not self.test.is_valid_combination(browser, version_name): 720 if not self.test.is_valid_combination(browser, version_name):
721 continue 721 continue
722 version = DromaeoTest.DromaeoPerfTester.get_dromaeo_url_query( 722 version = DromaeoTest.DromaeoPerfTester.get_dromaeo_url_query(
723 browser, version_name) 723 browser, version_name)
724 self.test.trace_file = os.path.join( 724 self.test.trace_file = os.path.join(
725 'tools', 'testing', 'perf_testing', self.test.result_folder_name, 725 'tools', 'testing', 'perf_testing', self.test.result_folder_name,
726 'dromaeo-%s-%s-%s' % (self.test.cur_time, browser, version_name)) 726 'dromaeo-%s-%s-%s' % (self.test.cur_time, browser, version_name))
727 self.add_svn_revision_to_trace(self.test.trace_file, browser) 727 self.add_svn_revision_to_trace(self.test.trace_file, browser)
728 file_path = '"%s"' % os.path.join(os.getcwd(), dromaeo_path, 728 file_path = '"%s"' % os.path.join(os.getcwd(), dromaeo_path,
729 'index-js.html?%s' % version) 729 'index-js.html?%s' % version)
730 if platform.system() == 'Windows':
731 file_path = file_path.replace('&', '^&')
732 file_path = file_path.replace('?', '^?')
733 file_path = file_path.replace('|', '^|')
730 self.test.test_runner.run_cmd( 734 self.test.test_runner.run_cmd(
731 ['python', os.path.join('tools', 'testing', 'run_selenium.py'), 735 ['python', os.path.join('tools', 'testing', 'run_selenium.py'),
732 '--out', file_path, '--browser', browser, 736 '--out', file_path, '--browser', browser,
733 '--timeout', '900', '--mode', 'dromaeo'], self.test.trace_file, 737 '--timeout', '900', '--mode', 'dromaeo'], self.test.trace_file,
734 append=True) 738 append=True)
735 # Put default Chromedriver back in. 739 # Put default Chromedriver back in.
736 self.move_chrome_driver_if_needed('chrome') 740 self.move_chrome_driver_if_needed('chrome')
737 741
738 @staticmethod 742 @staticmethod
739 def get_dromaeo_url_query(browser, version): 743 def get_dromaeo_url_query(browser, version):
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 """Update the set of CLs that do not need additional performance runs. 1075 """Update the set of CLs that do not need additional performance runs.
1072 Args: 1076 Args:
1073 revision_num: an additional number to be added to the 'done set' 1077 revision_num: an additional number to be added to the 'done set'
1074 """ 1078 """
1075 filename = os.path.join(dirname(abspath(__file__)), 'cached_results.txt') 1079 filename = os.path.join(dirname(abspath(__file__)), 'cached_results.txt')
1076 if not os.path.exists(filename): 1080 if not os.path.exists(filename):
1077 f = open(filename, 'w') 1081 f = open(filename, 'w')
1078 results = set() 1082 results = set()
1079 pickle.dump(results, f) 1083 pickle.dump(results, f)
1080 f.close() 1084 f.close()
1081 f = open(filename) 1085 f = open(filename, '+r')
1082 result_set = pickle.load(f) 1086 result_set = pickle.load(f)
1083 if revision_num: 1087 if revision_num:
1084 f.seek(0) 1088 f.seek(0)
1085 result_set.add(revision_num) 1089 result_set.add(revision_num)
1086 pickle.dump(result_set, f) 1090 pickle.dump(result_set, f)
1087 f.close() 1091 f.close()
1088 return result_set 1092 return result_set
1089 1093
1090 def main(): 1094 def main():
1091 runner = TestRunner() 1095 runner = TestRunner()
(...skipping 23 matching lines...) Expand all
1115 variant = a_test.values_dict[platform_name].keys()[0] 1119 variant = a_test.values_dict[platform_name].keys()[0]
1116 number_of_results = post_results.get_num_results(benchmark_name, 1120 number_of_results = post_results.get_num_results(benchmark_name,
1117 platform_name, variant, revision_num, 1121 platform_name, variant, revision_num,
1118 a_test.file_processor.get_score_type(benchmark_name)) 1122 a_test.file_processor.get_score_type(benchmark_name))
1119 if number_of_results < 10 and number_of_results >= 0: 1123 if number_of_results < 10 and number_of_results >= 0:
1120 run = runner.run_test_sequence(revision_num=str(revision_num), 1124 run = runner.run_test_sequence(revision_num=str(revision_num),
1121 num_reruns=(10-number_of_results)) 1125 num_reruns=(10-number_of_results))
1122 if run == 0: 1126 if run == 0:
1123 has_run_extra = True 1127 has_run_extra = True
1124 results_set = update_set_of_done_cls(revision_num) 1128 results_set = update_set_of_done_cls(revision_num)
1125 elif run == -1:
1126 # This revision is a broken build. Don't try to run it again.
1127 results_set = update_set_of_done_cls(revision_num)
1128 revision_num -= 1 1129 revision_num -= 1
1129 # No more extra back-runs to do (for now). Wait for new code. 1130 # No more extra back-runs to do (for now). Wait for new code.
1130 time.sleep(200) 1131 time.sleep(200)
1131 else: 1132 else:
1132 runner.run_test_sequence() 1133 runner.run_test_sequence()
1133 1134
1134 if __name__ == '__main__': 1135 if __name__ == '__main__':
1135 main() 1136 main()
OLDNEW
« no previous file with comments | « no previous file | tools/testing/webdriver_test_setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698