| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged | 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 self._webkit_finder = WebKitFinder(port.host.filesystem) | 94 self._webkit_finder = WebKitFinder(port.host.filesystem) |
| 95 self._runner = LayoutTestRunner(self._options, self._port, self._printer
, self._results_directory, self._test_is_slow) | 95 self._runner = LayoutTestRunner(self._options, self._port, self._printer
, self._results_directory, self._test_is_slow) |
| 96 | 96 |
| 97 def run(self, args): | 97 def run(self, args): |
| 98 """Run the tests and return a RunDetails object with the results.""" | 98 """Run the tests and return a RunDetails object with the results.""" |
| 99 start_time = time.time() | 99 start_time = time.time() |
| 100 self._printer.write_update("Collecting tests ...") | 100 self._printer.write_update("Collecting tests ...") |
| 101 running_all_tests = False | 101 running_all_tests = False |
| 102 | 102 |
| 103 self._printer.write_update('Generating MANIFEST.json for web-platform-te
sts ...') | 103 self._printer.write_update('Generating MANIFEST.json for web-platform-te
sts ...') |
| 104 WPTManifest.ensure_manifest(self._port.host) | 104 |
| 105 try: |
| 106 _log.info('run-webkit-tests - calling ensure_manifest') |
| 107 WPTManifest.ensure_manifest(self._port.host) |
| 108 finally: |
| 109 _log.info('run-webkit-tests - completed ensure_manfiest') |
| 105 | 110 |
| 106 try: | 111 try: |
| 107 paths, all_test_names, running_all_tests = self._collect_tests(args) | 112 paths, all_test_names, running_all_tests = self._collect_tests(args) |
| 108 except IOError: | 113 except IOError: |
| 109 # This is raised if --test-list doesn't exist | 114 # This is raised if --test-list doesn't exist |
| 110 return test_run_results.RunDetails(exit_code=exit_codes.NO_TESTS_EXI
T_STATUS) | 115 return test_run_results.RunDetails(exit_code=exit_codes.NO_TESTS_EXI
T_STATUS) |
| 111 | 116 |
| 112 # Create a sorted list of test files so the subset chunk, | 117 # Create a sorted list of test files so the subset chunk, |
| 113 # if used, contains alphabetically consecutive tests. | 118 # if used, contains alphabetically consecutive tests. |
| 114 if self._options.order == 'natural': | 119 if self._options.order == 'natural': |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 555 |
| 551 stats = {} | 556 stats = {} |
| 552 for result in initial_results.results_by_name.values(): | 557 for result in initial_results.results_by_name.values(): |
| 553 if result.type != test_expectations.SKIP: | 558 if result.type != test_expectations.SKIP: |
| 554 stats[result.test_name] = {'results': (_worker_number(result.wor
ker_name), result.test_number, result.pid, int( | 559 stats[result.test_name] = {'results': (_worker_number(result.wor
ker_name), result.test_number, result.pid, int( |
| 555 result.test_run_time * 1000), int(result.total_run_time * 10
00))} | 560 result.test_run_time * 1000), int(result.total_run_time * 10
00))} |
| 556 stats_trie = {} | 561 stats_trie = {} |
| 557 for name, value in stats.iteritems(): | 562 for name, value in stats.iteritems(): |
| 558 json_results_generator.add_path_to_trie(name, value, stats_trie) | 563 json_results_generator.add_path_to_trie(name, value, stats_trie) |
| 559 return stats_trie | 564 return stats_trie |
| OLD | NEW |