| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 # correct. | 57 # correct. |
| 58 if dep_output.exit_code != 0: | 58 if dep_output.exit_code != 0: |
| 59 return (job.id, dep_output, time.time() - start_time) | 59 return (job.id, dep_output, time.time() - start_time) |
| 60 output = commands.Execute(job.command, job.verbose, job.timeout) | 60 output = commands.Execute(job.command, job.verbose, job.timeout) |
| 61 return (job.id, output, time.time() - start_time) | 61 return (job.id, output, time.time() - start_time) |
| 62 | 62 |
| 63 class Runner(object): | 63 class Runner(object): |
| 64 | 64 |
| 65 def __init__(self, suites, progress_indicator, context): | 65 def __init__(self, suites, progress_indicator, context): |
| 66 self.datapath = os.path.join("out", "testrunner_data") | 66 self.datapath = os.path.join("out", "testrunner_data") |
| 67 self.perf_data_manager = perfdata.PerfDataManager(self.datapath) | 67 self.perf_data_manager = perfdata.GetPerfDataManager( |
| 68 context, self.datapath) |
| 68 self.perfdata = self.perf_data_manager.GetStore(context.arch, context.mode) | 69 self.perfdata = self.perf_data_manager.GetStore(context.arch, context.mode) |
| 69 self.perf_failures = False | 70 self.perf_failures = False |
| 70 self.printed_allocations = False | 71 self.printed_allocations = False |
| 71 self.tests = [ t for s in suites for t in s.tests ] | 72 self.tests = [ t for s in suites for t in s.tests ] |
| 72 if not context.no_sorting: | 73 if not context.no_sorting: |
| 73 for t in self.tests: | 74 for t in self.tests: |
| 74 t.duration = self.perfdata.FetchPerfData(t) or 1.0 | 75 t.duration = self.perfdata.FetchPerfData(t) or 1.0 |
| 75 slow_key = lambda t: statusfile.IsSlow(t.outcomes) | 76 slow_key = lambda t: statusfile.IsSlow(t.outcomes) |
| 76 self.tests.sort(key=slow_key, reverse=True) | 77 self.tests.sort(key=slow_key, reverse=True) |
| 77 self.tests.sort(key=lambda t: t.duration, reverse=True) | 78 self.tests.sort(key=lambda t: t.duration, reverse=True) |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 test.suite.GetFlagsForTestCase(test, self.context) + | 292 test.suite.GetFlagsForTestCase(test, self.context) + |
| 292 self.context.extra_flags) | 293 self.context.extra_flags) |
| 293 return cmd | 294 return cmd |
| 294 | 295 |
| 295 | 296 |
| 296 class BreakNowException(Exception): | 297 class BreakNowException(Exception): |
| 297 def __init__(self, value): | 298 def __init__(self, value): |
| 298 self.value = value | 299 self.value = value |
| 299 def __str__(self): | 300 def __str__(self): |
| 300 return repr(self.value) | 301 return repr(self.value) |
| OLD | NEW |