OLD | NEW |
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 math | 8 import math |
9 from matplotlib.font_manager import FontProperties | 9 from matplotlib.font_manager import FontProperties |
10 import matplotlib.pyplot as plt | 10 import matplotlib.pyplot as plt |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 suffix = '' | 504 suffix = '' |
505 if platform.system() == 'Windows': | 505 if platform.system() == 'Windows': |
506 suffix = '.exe' | 506 suffix = '.exe' |
507 for browser in get_browsers(): | 507 for browser in get_browsers(): |
508 current_file = 'correctness%s-%s' % (self.cur_time, browser) | 508 current_file = 'correctness%s-%s' % (self.cur_time, browser) |
509 self.trace_file = os.path.join('tools', 'testing', | 509 self.trace_file = os.path.join('tools', 'testing', |
510 'perf_testing', self.result_folder_name, current_file) | 510 'perf_testing', self.result_folder_name, current_file) |
511 self.add_svn_revision_to_trace(self.trace_file) | 511 self.add_svn_revision_to_trace(self.trace_file) |
512 dart_sdk = os.path.join(os.getcwd(), utils.GetBuildRoot(utils.GuessOS(), | 512 dart_sdk = os.path.join(os.getcwd(), utils.GetBuildRoot(utils.GuessOS(), |
513 'release', 'ia32'), 'dart-sdk') | 513 'release', 'ia32'), 'dart-sdk') |
| 514 #TODO(efortuna): Ensure that the frog and froglib flags work when they get |
| 515 # implemented in test.dart (Bug #1046) |
514 run_cmd([os.path.join('.', 'tools', 'testing', 'bin', system, | 516 run_cmd([os.path.join('.', 'tools', 'testing', 'bin', system, |
515 'dart' + suffix), os.path.join('tools', 'test.dart'), | 517 'dart' + suffix), os.path.join('tools', 'test.dart'), |
516 '--component=webdriver', '--flag=%s,--frog=%s,--froglib=%s' % \ | 518 '--component=webdriver', |
517 (browser, os.path.join(dart_sdk, 'bin', 'frogc'), | 519 '--browser=%s' % browser, '--frog=%s' % os.path.join(dart_sdk, 'bin', |
518 os.path.join(dart_sdk, 'lib')), '--report', | 520 'frogc'), '--froglib=%s' % os.path.join(dart_sdk, 'lib')), '--report', |
519 '--timeout=20', '--progress=color', '--mode=release', '-j1', | 521 '--timeout=20', '--progress=color', '--mode=release', '-j1', |
520 self.test_type], self.trace_file, append=True) | 522 self.test_type], self.trace_file, append=True) |
521 | 523 |
522 def process_file(self, afile): | 524 def process_file(self, afile): |
523 """Given a trace file, extract all the relevant information out of it to | 525 """Given a trace file, extract all the relevant information out of it to |
524 determine the number of correctly passing tests. | 526 determine the number of correctly passing tests. |
525 | 527 |
526 Arguments: | 528 Arguments: |
527 afile the filename string""" | 529 afile the filename string""" |
528 browser = afile.rpartition('-')[2] | 530 browser = afile.rpartition('-')[2] |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 if has_new_code(): | 724 if has_new_code(): |
723 run_test_sequence(cl, size, language, perf) | 725 run_test_sequence(cl, size, language, perf) |
724 else: | 726 else: |
725 time.sleep(SLEEP_TIME) | 727 time.sleep(SLEEP_TIME) |
726 else: | 728 else: |
727 run_test_sequence(cl, size, language, perf) | 729 run_test_sequence(cl, size, language, perf) |
728 | 730 |
729 if __name__ == '__main__': | 731 if __name__ == '__main__': |
730 main() | 732 main() |
731 | 733 |
OLD | NEW |