| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 _log.debug("looking for new crash logs") | 240 _log.debug("looking for new crash logs") |
| 241 self._look_for_new_crash_logs(initial_results, start_time) | 241 self._look_for_new_crash_logs(initial_results, start_time) |
| 242 if retry_results: | 242 if retry_results: |
| 243 self._look_for_new_crash_logs(retry_results, start_time) | 243 self._look_for_new_crash_logs(retry_results, start_time) |
| 244 | 244 |
| 245 _log.debug("summarizing results") | 245 _log.debug("summarizing results") |
| 246 summarized_full_results = test_run_results.summarize_results(self._port,
self._expectations, initial_results, retry_results, enabled_pixel_tests_in_retr
y) | 246 summarized_full_results = test_run_results.summarize_results(self._port,
self._expectations, initial_results, retry_results, enabled_pixel_tests_in_retr
y) |
| 247 summarized_failing_results = test_run_results.summarize_results(self._po
rt, self._expectations, initial_results, retry_results, enabled_pixel_tests_in_r
etry, only_include_failing=True) | 247 summarized_failing_results = test_run_results.summarize_results(self._po
rt, self._expectations, initial_results, retry_results, enabled_pixel_tests_in_r
etry, only_include_failing=True) |
| 248 | 248 |
| 249 exit_code = summarized_failing_results['num_regressions'] | 249 exit_code = summarized_failing_results['num_regressions'] |
| 250 results_path = "" |
| 250 if not self._options.dry_run: | 251 if not self._options.dry_run: |
| 251 self._write_json_files(summarized_full_results, summarized_failing_r
esults, initial_results) | 252 self._write_json_files(summarized_full_results, summarized_failing_r
esults, initial_results) |
| 252 self._upload_json_files() | 253 self._upload_json_files() |
| 253 | 254 |
| 254 results_path = self._filesystem.join(self._results_directory, "resul
ts.html") | 255 results_path = self._filesystem.join(self._results_directory, "resul
ts.html") |
| 255 self._copy_results_html_file(results_path) | 256 self._copy_results_html_file(results_path) |
| 256 if initial_results.keyboard_interrupted: | 257 if initial_results.keyboard_interrupted: |
| 257 exit_code = INTERRUPTED_EXIT_STATUS | 258 exit_code = INTERRUPTED_EXIT_STATUS |
| 258 else: | 259 else: |
| 259 if self._options.show_results and (exit_code or (self._options.f
ull_results_html and initial_results.total_failures)): | 260 if self._options.show_results and (exit_code or (self._options.f
ull_results_html and initial_results.total_failures)): |
| 260 self._port.show_results_html_file(results_path) | 261 self._port.show_results_html_file(results_path) |
| 261 self._printer.print_results(time.time() - start_time, initial_re
sults, summarized_failing_results) | 262 self._printer.print_results(time.time() - start_time, initial_re
sults, summarized_failing_results) |
| 262 return test_run_results.RunDetails(exit_code, summarized_full_results, s
ummarized_failing_results, initial_results, retry_results, enabled_pixel_tests_i
n_retry) | 263 return test_run_results.RunDetails(exit_code, summarized_full_results, s
ummarized_failing_results, initial_results, retry_results, enabled_pixel_tests_i
n_retry, results_path) |
| 263 | 264 |
| 264 def _run_tests(self, tests_to_run, tests_to_skip, repeat_each, iterations, n
um_workers, retrying): | 265 def _run_tests(self, tests_to_run, tests_to_skip, repeat_each, iterations, n
um_workers, retrying): |
| 265 | 266 |
| 266 test_inputs = [] | 267 test_inputs = [] |
| 267 for _ in xrange(iterations): | 268 for _ in xrange(iterations): |
| 268 for test in tests_to_run: | 269 for test in tests_to_run: |
| 269 for _ in xrange(repeat_each): | 270 for _ in xrange(repeat_each): |
| 270 test_inputs.append(self._test_input_for_file(test)) | 271 test_inputs.append(self._test_input_for_file(test)) |
| 271 return self._runner.run_tests(self._expectations, test_inputs, tests_to_
skip, num_workers, retrying) | 272 return self._runner.run_tests(self._expectations, test_inputs, tests_to_
skip, num_workers, retrying) |
| 272 | 273 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 return int(worker_name.split('/')[1]) if worker_name else -1 | 422 return int(worker_name.split('/')[1]) if worker_name else -1 |
| 422 | 423 |
| 423 stats = {} | 424 stats = {} |
| 424 for result in initial_results.results_by_name.values(): | 425 for result in initial_results.results_by_name.values(): |
| 425 if result.type != test_expectations.SKIP: | 426 if result.type != test_expectations.SKIP: |
| 426 stats[result.test_name] = {'results': (_worker_number(result.wor
ker_name), result.test_number, result.pid, int(result.test_run_time * 1000), int
(result.total_run_time * 1000))} | 427 stats[result.test_name] = {'results': (_worker_number(result.wor
ker_name), result.test_number, result.pid, int(result.test_run_time * 1000), int
(result.total_run_time * 1000))} |
| 427 stats_trie = {} | 428 stats_trie = {} |
| 428 for name, value in stats.iteritems(): | 429 for name, value in stats.iteritems(): |
| 429 json_results_generator.add_path_to_trie(name, value, stats_trie) | 430 json_results_generator.add_path_to_trie(name, value, stats_trie) |
| 430 return stats_trie | 431 return stats_trie |
| OLD | NEW |