| OLD | NEW |
| 1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 try: | 223 try: |
| 224 queue.append([self._GetJob(test)]) | 224 queue.append([self._GetJob(test)]) |
| 225 except Exception, e: | 225 except Exception, e: |
| 226 # If this failed, save the exception and re-raise it later (after | 226 # If this failed, save the exception and re-raise it later (after |
| 227 # all other tests have had a chance to run). | 227 # all other tests have had a chance to run). |
| 228 queued_exception = e | 228 queued_exception = e |
| 229 continue | 229 continue |
| 230 try: | 230 try: |
| 231 it = pool.imap_unordered(RunTest, queue) | 231 it = pool.imap_unordered(RunTest, queue) |
| 232 for result in it: | 232 for result in it: |
| 233 test = test_map[result[0]] | 233 if result.heartbeat: |
| 234 self.indicator.Heartbeat() |
| 235 continue |
| 236 test = test_map[result.value[0]] |
| 234 if self.context.predictable: | 237 if self.context.predictable: |
| 235 update_perf = self._ProcessTestPredictable(test, result, pool) | 238 update_perf = self._ProcessTestPredictable(test, result.value, pool) |
| 236 else: | 239 else: |
| 237 update_perf = self._ProcessTestNormal(test, result, pool) | 240 update_perf = self._ProcessTestNormal(test, result.value, pool) |
| 238 if update_perf: | 241 if update_perf: |
| 239 self._RunPerfSafe(lambda: self.perfdata.UpdatePerfData(test)) | 242 self._RunPerfSafe(lambda: self.perfdata.UpdatePerfData(test)) |
| 240 finally: | 243 finally: |
| 241 pool.terminate() | 244 pool.terminate() |
| 242 self._RunPerfSafe(lambda: self.perf_data_manager.close()) | 245 self._RunPerfSafe(lambda: self.perf_data_manager.close()) |
| 243 if self.perf_failures: | 246 if self.perf_failures: |
| 244 # Nuke perf data in case of failures. This might not work on windows as | 247 # Nuke perf data in case of failures. This might not work on windows as |
| 245 # some files might still be open. | 248 # some files might still be open. |
| 246 print "Deleting perf test data due to db corruption." | 249 print "Deleting perf test data due to db corruption." |
| 247 shutil.rmtree(self.datapath) | 250 shutil.rmtree(self.datapath) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 265 test.suite.GetFlagsForTestCase(test, self.context) + | 268 test.suite.GetFlagsForTestCase(test, self.context) + |
| 266 self.context.extra_flags) | 269 self.context.extra_flags) |
| 267 return cmd | 270 return cmd |
| 268 | 271 |
| 269 | 272 |
| 270 class BreakNowException(Exception): | 273 class BreakNowException(Exception): |
| 271 def __init__(self, value): | 274 def __init__(self, value): |
| 272 self.value = value | 275 self.value = value |
| 273 def __str__(self): | 276 def __str__(self): |
| 274 return repr(self.value) | 277 return repr(self.value) |
| OLD | NEW |