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

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

Issue 10224006: Make get_drt.py work in Windows. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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
« tools/get_drt.py ('K') | « tools/get_drt.py ('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/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2011, 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 optparse 8 import optparse
9 import os 9 import os
10 from os.path import dirname, abspath 10 from os.path import dirname, abspath
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 if platform.system() == 'Windows': 394 if platform.system() == 'Windows':
395 browsers += ['ie'] 395 browsers += ['ie']
396 has_shell = True 396 has_shell = True
397 if 'dartium' in browsers: 397 if 'dartium' in browsers:
398 # Fetch it if necessary. 398 # Fetch it if necessary.
399 get_dartium = ['python', 399 get_dartium = ['python',
400 os.path.join(DART_INSTALL_LOCATION, 'tools', 'get_drt.py'), 400 os.path.join(DART_INSTALL_LOCATION, 'tools', 'get_drt.py'),
401 '--dartium'] 401 '--dartium']
402 # TODO(vsm): It's inconvenient that run_cmd isn't in scope here. 402 # TODO(vsm): It's inconvenient that run_cmd isn't in scope here.
403 # Perhaps there is a better place to put that or this. 403 # Perhaps there is a better place to put that or this.
404 subprocess.Popen(get_dartium, shell=has_shell) 404 subprocess.call(get_dartium, shell=has_shell)
Emily Fortuna 2012/04/25 18:38:58 How about: p = subprocess.Popen(cmd_list, stdout=s
405 return browsers 405 return browsers
406 406
407 407
408 class CommonBrowserTest(RuntimePerformanceTest): 408 class CommonBrowserTest(RuntimePerformanceTest):
409 """Runs this basic performance tests (Benchpress, some V8 benchmarks) in the 409 """Runs this basic performance tests (Benchpress, some V8 benchmarks) in the
410 browser.""" 410 browser."""
411 411
412 def __init__(self, test_runner): 412 def __init__(self, test_runner):
413 """Args: 413 """Args:
414 test_runner: Reference to the object that notifies us when to run.""" 414 test_runner: Reference to the object that notifies us when to run."""
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 browser, version_name) 610 browser, version_name)
611 self.test.trace_file = os.path.join( 611 self.test.trace_file = os.path.join(
612 'tools', 'testing', 'perf_testing', self.test.result_folder_name, 612 'tools', 'testing', 'perf_testing', self.test.result_folder_name,
613 'dromaeo-%s-%s-%s' % (self.test.cur_time, browser, version_name)) 613 'dromaeo-%s-%s-%s' % (self.test.cur_time, browser, version_name))
614 self.add_svn_revision_to_trace(self.test.trace_file, browser) 614 self.add_svn_revision_to_trace(self.test.trace_file, browser)
615 file_path = '"%s"' % os.path.join(os.getcwd(), dromaeo_path, 615 file_path = '"%s"' % os.path.join(os.getcwd(), dromaeo_path,
616 'index-js.html?%s' % version) 616 'index-js.html?%s' % version)
617 self.test.test_runner.run_cmd( 617 self.test.test_runner.run_cmd(
618 ['python', os.path.join('tools', 'testing', 'run_selenium.py'), 618 ['python', os.path.join('tools', 'testing', 'run_selenium.py'),
619 '--out', file_path, '--browser', browser, 619 '--out', file_path, '--browser', browser,
620 '--timeout', '600', '--mode', 'dromaeo'], self.test.trace_file, 620 '--timeout', '900', '--mode', 'dromaeo'], self.test.trace_file,
621 append=True) 621 append=True)
622 622
623 @staticmethod 623 @staticmethod
624 def get_dromaeo_url_query(browser, version): 624 def get_dromaeo_url_query(browser, version):
625 if browser == 'dartium': 625 if browser == 'dartium':
626 version = version.replace('frog', 'dart') 626 version = version.replace('frog', 'dart')
627 version = version.replace('_','&') 627 version = version.replace('_','&')
628 tags = DromaeoTester.get_valid_dromaeo_tags() 628 tags = DromaeoTester.get_valid_dromaeo_tags()
629 return '|'.join([ '%s&%s' % (version, tag) for tag in tags]) 629 return '|'.join([ '%s&%s' % (version, tag) for tag in tags])
630 630
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 while True: 921 while True:
922 if runner.has_new_code(): 922 if runner.has_new_code():
923 runner.run_test_sequence() 923 runner.run_test_sequence()
924 else: 924 else:
925 time.sleep(200) 925 time.sleep(200)
926 else: 926 else:
927 runner.run_test_sequence() 927 runner.run_test_sequence()
928 928
929 if __name__ == '__main__': 929 if __name__ == '__main__':
930 main() 930 main()
OLDNEW
« tools/get_drt.py ('K') | « tools/get_drt.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698