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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 for failure in result.failures: | 439 for failure in result.failures: |
440 if not isinstance(failure, test_failures.FailureCrash): | 440 if not isinstance(failure, test_failures.FailureCrash): |
441 continue | 441 continue |
442 if failure.has_log: | 442 if failure.has_log: |
443 continue | 443 continue |
444 crashed_processes.append([test, failure.process_name, failure.pi
d]) | 444 crashed_processes.append([test, failure.process_name, failure.pi
d]) |
445 | 445 |
446 sample_files = self._port.look_for_new_samples(crashed_processes, start_
time) | 446 sample_files = self._port.look_for_new_samples(crashed_processes, start_
time) |
447 if sample_files: | 447 if sample_files: |
448 for test, sample_file in sample_files.iteritems(): | 448 for test, sample_file in sample_files.iteritems(): |
449 writer = TestResultWriter(self._port._filesystem, self._port, se
lf._port.results_directory(), test) | 449 writer = TestResultWriter(self._filesystem, self._port, self._po
rt.results_directory(), test) |
450 writer.copy_sample_file(sample_file) | 450 writer.copy_sample_file(sample_file) |
451 | 451 |
452 crash_logs = self._port.look_for_new_crash_logs(crashed_processes, start
_time) | 452 crash_logs = self._port.look_for_new_crash_logs(crashed_processes, start
_time) |
453 if crash_logs: | 453 if crash_logs: |
454 for test, crash_log in crash_logs.iteritems(): | 454 for test, crash_log in crash_logs.iteritems(): |
455 writer = TestResultWriter(self._port._filesystem, self._port, se
lf._port.results_directory(), test) | 455 writer = TestResultWriter(self._filesystem, self._port, self._po
rt.results_directory(), test) |
456 writer.write_crash_log(crash_log) | 456 writer.write_crash_log(crash_log) |
457 | 457 |
458 def _clobber_old_results(self): | 458 def _clobber_old_results(self): |
459 dir_above_results_path = self._filesystem.dirname(self._results_director
y) | 459 dir_above_results_path = self._filesystem.dirname(self._results_director
y) |
460 self._printer.write_update("Clobbering old results in %s" % dir_above_re
sults_path) | 460 self._printer.write_update("Clobbering old results in %s" % dir_above_re
sults_path) |
461 if not self._filesystem.exists(dir_above_results_path): | 461 if not self._filesystem.exists(dir_above_results_path): |
462 return | 462 return |
463 file_list = self._filesystem.listdir(dir_above_results_path) | 463 file_list = self._filesystem.listdir(dir_above_results_path) |
464 results_directories = [] | 464 results_directories = [] |
465 for dir in file_list: | 465 for dir in file_list: |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 555 |
556 stats = {} | 556 stats = {} |
557 for result in initial_results.results_by_name.values(): | 557 for result in initial_results.results_by_name.values(): |
558 if result.type != test_expectations.SKIP: | 558 if result.type != test_expectations.SKIP: |
559 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( |
560 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))} |
561 stats_trie = {} | 561 stats_trie = {} |
562 for name, value in stats.iteritems(): | 562 for name, value in stats.iteritems(): |
563 json_results_generator.add_path_to_trie(name, value, stats_trie) | 563 json_results_generator.add_path_to_trie(name, value, stats_trie) |
564 return stats_trie | 564 return stats_trie |
OLD | NEW |