Chromium Code Reviews| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 self._delete_dirs(results_directories[:-self.ARCHIVED_RESULTS_LIMIT]) | 325 self._delete_dirs(results_directories[:-self.ARCHIVED_RESULTS_LIMIT]) |
| 326 | 326 |
| 327 def _set_up_run(self, test_names): | 327 def _set_up_run(self, test_names): |
| 328 self._printer.write_update("Checking build ...") | 328 self._printer.write_update("Checking build ...") |
| 329 if self._options.build: | 329 if self._options.build: |
| 330 exit_code = self._port.check_build(self._needs_servers(test_names), self._printer) | 330 exit_code = self._port.check_build(self._needs_servers(test_names), self._printer) |
| 331 if exit_code: | 331 if exit_code: |
| 332 _log.error("Build check failed") | 332 _log.error("Build check failed") |
| 333 return exit_code | 333 return exit_code |
| 334 | 334 |
| 335 self._port.setup_test_run() | |
|
qyearsley
2017/04/14 18:25:40
I moved this line here so that it happens before t
Dirk Pranke
2017/04/14 21:44:08
I think moving the order of the calls is fine, but
qyearsley
2017/04/18 17:58:35
Done.
| |
| 336 | |
| 335 # Check that the system dependencies (themes, fonts, ...) are correct. | 337 # Check that the system dependencies (themes, fonts, ...) are correct. |
| 336 if not self._options.nocheck_sys_deps: | 338 if not self._options.nocheck_sys_deps: |
| 337 self._printer.write_update("Checking system dependencies ...") | 339 self._printer.write_update("Checking system dependencies ...") |
| 338 exit_code = self._port.check_sys_deps(self._needs_servers(test_names )) | 340 exit_code = self._port.check_sys_deps(self._needs_servers(test_names )) |
| 339 if exit_code: | 341 if exit_code: |
| 340 return exit_code | 342 return exit_code |
| 341 | 343 |
| 342 if self._options.clobber_old_results: | 344 if self._options.clobber_old_results: |
| 343 self._clobber_old_results() | 345 self._clobber_old_results() |
| 344 elif self._filesystem.exists(self._results_directory): | 346 elif self._filesystem.exists(self._results_directory): |
| 345 self._limit_archived_results_count() | 347 self._limit_archived_results_count() |
| 346 # Rename the existing results folder for archiving. | 348 # Rename the existing results folder for archiving. |
| 347 self._rename_results_folder() | 349 self._rename_results_folder() |
| 348 | 350 |
| 349 # Create the output directory if it doesn't already exist. | 351 # Create the output directory if it doesn't already exist. |
| 350 self._port.host.filesystem.maybe_make_directory(self._results_directory) | 352 self._port.host.filesystem.maybe_make_directory(self._results_directory) |
| 351 | 353 |
| 352 self._port.setup_test_run() | |
| 353 return exit_codes.OK_EXIT_STATUS | 354 return exit_codes.OK_EXIT_STATUS |
| 354 | 355 |
| 355 def _run_tests(self, tests_to_run, tests_to_skip, repeat_each, iterations, | 356 def _run_tests(self, tests_to_run, tests_to_skip, repeat_each, iterations, |
| 356 num_workers, retry_attempt=0): | 357 num_workers, retry_attempt=0): |
| 357 | 358 |
| 358 test_inputs = [] | 359 test_inputs = [] |
| 359 for _ in xrange(iterations): | 360 for _ in xrange(iterations): |
| 360 for test in tests_to_run: | 361 for test in tests_to_run: |
| 361 for _ in xrange(repeat_each): | 362 for _ in xrange(repeat_each): |
| 362 test_inputs.append(self._test_input_for_file(test)) | 363 test_inputs.append(self._test_input_for_file(test)) |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 549 | 550 |
| 550 stats = {} | 551 stats = {} |
| 551 for result in initial_results.results_by_name.values(): | 552 for result in initial_results.results_by_name.values(): |
| 552 if result.type != test_expectations.SKIP: | 553 if result.type != test_expectations.SKIP: |
| 553 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int( | 554 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int( |
| 554 result.test_run_time * 1000), int(result.total_run_time * 10 00))} | 555 result.test_run_time * 1000), int(result.total_run_time * 10 00))} |
| 555 stats_trie = {} | 556 stats_trie = {} |
| 556 for name, value in stats.iteritems(): | 557 for name, value in stats.iteritems(): |
| 557 json_results_generator.add_path_to_trie(name, value, stats_trie) | 558 json_results_generator.add_path_to_trie(name, value, stats_trie) |
| 558 return stats_trie | 559 return stats_trie |
| OLD | NEW |