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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 """Return True if the test needs to be locked when | 131 """Return True if the test needs to be locked when |
132 running multiple copies of NRWTs. Perf tests are locked | 132 running multiple copies of NRWTs. Perf tests are locked |
133 because heavy load caused by running other tests in parallel | 133 because heavy load caused by running other tests in parallel |
134 might cause some of them to timeout.""" | 134 might cause some of them to timeout.""" |
135 return self._is_http_test(test_file) or self._is_perf_test(test_file) | 135 return self._is_http_test(test_file) or self._is_perf_test(test_file) |
136 | 136 |
137 def _test_is_slow(self, test_file): | 137 def _test_is_slow(self, test_file): |
138 return self._expectations.has_modifier(test_file, test_expectations.SLOW
) | 138 return self._expectations.has_modifier(test_file, test_expectations.SLOW
) |
139 | 139 |
140 def needs_servers(self, test_names): | 140 def needs_servers(self, test_names): |
141 return any(self._test_requires_lock(test_name) for test_name in test_nam
es) and self._options.http | 141 return any(self._test_requires_lock(test_name) for test_name in test_nam
es) |
142 | 142 |
143 def _set_up_run(self, test_names): | 143 def _set_up_run(self, test_names): |
144 self._printer.write_update("Checking build ...") | 144 self._printer.write_update("Checking build ...") |
145 if not self._port.check_build(self.needs_servers(test_names)): | 145 if not self._port.check_build(self.needs_servers(test_names)): |
146 _log.error("Build check failed") | 146 _log.error("Build check failed") |
147 return False | 147 return False |
148 | 148 |
149 # This must be started before we check the system dependencies, | 149 # This must be started before we check the system dependencies, |
150 # since the helper may do things to make the setup correct. | 150 # since the helper may do things to make the setup correct. |
151 if self._options.pixel_tests: | 151 if self._options.pixel_tests: |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 return int(worker_name.split('/')[1]) if worker_name else -1 | 390 return int(worker_name.split('/')[1]) if worker_name else -1 |
391 | 391 |
392 stats = {} | 392 stats = {} |
393 for result in initial_results.results_by_name.values(): | 393 for result in initial_results.results_by_name.values(): |
394 if result.type != test_expectations.SKIP: | 394 if result.type != test_expectations.SKIP: |
395 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))} | 395 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))} |
396 stats_trie = {} | 396 stats_trie = {} |
397 for name, value in stats.iteritems(): | 397 for name, value in stats.iteritems(): |
398 json_results_generator.add_path_to_trie(name, value, stats_trie) | 398 json_results_generator.add_path_to_trie(name, value, stats_trie) |
399 return stats_trie | 399 return stats_trie |
OLD | NEW |