| 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 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 # Then this run did not complete. Ignore this tracefile. | 496 # Then this run did not complete. Ignore this tracefile. |
| 497 return True | 497 return True |
| 498 | 498 |
| 499 line = lines[i] | 499 line = lines[i] |
| 500 i += 1 | 500 i += 1 |
| 501 results = [] | 501 results = [] |
| 502 if line.find('<br>') > -1: | 502 if line.find('<br>') > -1: |
| 503 results = line.split('<br>') | 503 results = line.split('<br>') |
| 504 else: | 504 else: |
| 505 results = line.split('<br />') | 505 results = line.split('<br />') |
| 506 if results == []: |
| 507 return True |
| 506 upload_success = True | 508 upload_success = True |
| 507 for result in results: | 509 for result in results: |
| 508 name_and_score = result.split(':') | 510 name_and_score = result.split(':') |
| 509 if len(name_and_score) < 2: | 511 if len(name_and_score) < 2: |
| 510 break | 512 break |
| 511 name = name_and_score[0].strip() | 513 name = name_and_score[0].strip() |
| 512 score = name_and_score[1].strip() | 514 score = name_and_score[1].strip() |
| 513 if version == 'js' or version == 'v8': | 515 if version == 'js' or version == 'v8': |
| 514 version = 'js' | 516 version = 'js' |
| 515 upload_success = upload_success and self.report_results( | 517 upload_success = upload_success and self.report_results( |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 | 691 |
| 690 f.close() | 692 f.close() |
| 691 return upload_success | 693 return upload_success |
| 692 | 694 |
| 693 | 695 |
| 694 class DromaeoSizeTest(Test): | 696 class DromaeoSizeTest(Test): |
| 695 """Run tests to determine the compiled file output size of Dromaeo.""" | 697 """Run tests to determine the compiled file output size of Dromaeo.""" |
| 696 def __init__(self, test_runner): | 698 def __init__(self, test_runner): |
| 697 super(DromaeoSizeTest, self).__init__( | 699 super(DromaeoSizeTest, self).__init__( |
| 698 self.name(), | 700 self.name(), |
| 699 ['browser'], ['dart', 'frog_dom', 'frog_html', 'frog_htmlidiomatic'], | 701 ['commandline'], ['dart', 'frog_dom', 'frog_html', |
| 702 'frog_htmlidiomatic'], |
| 700 DromaeoTester.DROMAEO_BENCHMARKS.keys(), test_runner, | 703 DromaeoTester.DROMAEO_BENCHMARKS.keys(), test_runner, |
| 701 self.DromaeoSizeTester(self), | 704 self.DromaeoSizeTester(self), |
| 702 self.DromaeoSizeProcessor(self)) | 705 self.DromaeoSizeProcessor(self)) |
| 703 | 706 |
| 704 @staticmethod | 707 @staticmethod |
| 705 def name(): | 708 def name(): |
| 706 return 'dromaeo-size' | 709 return 'dromaeo-size' |
| 707 | 710 |
| 708 | 711 |
| 709 class DromaeoSizeTester(DromaeoTester): | 712 class DromaeoSizeTester(DromaeoTester): |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 while True: | 938 while True: |
| 936 if runner.has_new_code(): | 939 if runner.has_new_code(): |
| 937 runner.run_test_sequence() | 940 runner.run_test_sequence() |
| 938 else: | 941 else: |
| 939 time.sleep(200) | 942 time.sleep(200) |
| 940 else: | 943 else: |
| 941 runner.run_test_sequence() | 944 runner.run_test_sequence() |
| 942 | 945 |
| 943 if __name__ == '__main__': | 946 if __name__ == '__main__': |
| 944 main() | 947 main() |
| OLD | NEW |