| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2008 the V8 project authors. All rights reserved. | 3 # Copyright 2008 the V8 project authors. All rights reserved. |
| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 pass | 380 pass |
| 381 | 381 |
| 382 def AfterRun(self, result): | 382 def AfterRun(self, result): |
| 383 pass | 383 pass |
| 384 | 384 |
| 385 def GetCustomFlags(self, mode): | 385 def GetCustomFlags(self, mode): |
| 386 return None | 386 return None |
| 387 | 387 |
| 388 def Run(self): | 388 def Run(self): |
| 389 self.BeforeRun() | 389 self.BeforeRun() |
| 390 result = None; | 390 result = None |
| 391 try: | 391 try: |
| 392 result = self.RunCommand(self.GetCommand()) | 392 result = self.RunCommand(self.GetCommand()) |
| 393 except: | 393 except: |
| 394 self.terminate = True; | 394 self.terminate = True |
| 395 raise BreakNowException("Used pressed CTRL+C or IO went wrong") | 395 raise BreakNowException("Used pressed CTRL+C or IO went wrong") |
| 396 finally: | 396 finally: |
| 397 self.AfterRun(result) | 397 self.AfterRun(result) |
| 398 return result | 398 return result |
| 399 | 399 |
| 400 def Cleanup(self): | 400 def Cleanup(self): |
| 401 return | 401 return |
| 402 | 402 |
| 403 | 403 |
| 404 class TestOutput(object): | 404 class TestOutput(object): |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 | 706 |
| 707 def GetTimeout(self, testcase, mode): | 707 def GetTimeout(self, testcase, mode): |
| 708 result = self.timeout * TIMEOUT_SCALEFACTOR[mode] | 708 result = self.timeout * TIMEOUT_SCALEFACTOR[mode] |
| 709 if '--stress-opt' in self.GetVmFlags(testcase, mode): | 709 if '--stress-opt' in self.GetVmFlags(testcase, mode): |
| 710 return result * 2 | 710 return result * 2 |
| 711 else: | 711 else: |
| 712 return result | 712 return result |
| 713 | 713 |
| 714 def RunTestCases(cases_to_run, progress, tasks): | 714 def RunTestCases(cases_to_run, progress, tasks): |
| 715 progress = PROGRESS_INDICATORS[progress](cases_to_run) | 715 progress = PROGRESS_INDICATORS[progress](cases_to_run) |
| 716 result = 0; | 716 result = 0 |
| 717 try: | 717 try: |
| 718 result = progress.Run(tasks) | 718 result = progress.Run(tasks) |
| 719 except Exception, e: | 719 except Exception, e: |
| 720 print "\n", e | 720 print "\n", e |
| 721 return result | 721 return result |
| 722 | 722 |
| 723 | 723 |
| 724 def BuildRequirements(context, requirements, mode, scons_flags): | 724 def BuildRequirements(context, requirements, mode, scons_flags): |
| 725 command_line = (['scons', '-Y', context.workspace, 'mode=' + ",".join(mode)] | 725 command_line = (['scons', '-Y', context.workspace, 'mode=' + ",".join(mode)] |
| 726 + requirements | 726 + requirements |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 for entry in timed_tests[:20]: | 1497 for entry in timed_tests[:20]: |
| 1498 t = FormatTime(entry.duration) | 1498 t = FormatTime(entry.duration) |
| 1499 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) | 1499 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) |
| 1500 index += 1 | 1500 index += 1 |
| 1501 | 1501 |
| 1502 return result | 1502 return result |
| 1503 | 1503 |
| 1504 | 1504 |
| 1505 if __name__ == '__main__': | 1505 if __name__ == '__main__': |
| 1506 sys.exit(Main()) | 1506 sys.exit(Main()) |
| OLD | NEW |