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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 | 704 |
705 def GetVmFlags(self, testcase, mode): | 705 def GetVmFlags(self, testcase, mode): |
706 flags = testcase.GetCustomFlags(mode) | 706 flags = testcase.GetCustomFlags(mode) |
707 if flags is None: | 707 if flags is None: |
708 flags = FLAGS[mode] | 708 flags = FLAGS[mode] |
709 return testcase.variant_flags + flags | 709 return testcase.variant_flags + flags |
710 | 710 |
711 def GetTimeout(self, testcase, mode): | 711 def GetTimeout(self, testcase, mode): |
712 result = self.timeout * TIMEOUT_SCALEFACTOR[mode] | 712 result = self.timeout * TIMEOUT_SCALEFACTOR[mode] |
713 if '--stress-opt' in self.GetVmFlags(testcase, mode): | 713 if '--stress-opt' in self.GetVmFlags(testcase, mode): |
714 return result * 2 | 714 return result * 4 |
715 else: | 715 else: |
716 return result | 716 return result |
717 | 717 |
718 def RunTestCases(cases_to_run, progress, tasks): | 718 def RunTestCases(cases_to_run, progress, tasks): |
719 progress = PROGRESS_INDICATORS[progress](cases_to_run) | 719 progress = PROGRESS_INDICATORS[progress](cases_to_run) |
720 result = 0 | 720 result = 0 |
721 try: | 721 try: |
722 result = progress.Run(tasks) | 722 result = progress.Run(tasks) |
723 except Exception, e: | 723 except Exception, e: |
724 print "\n", e | 724 print "\n", e |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1532 for entry in timed_tests[:20]: | 1532 for entry in timed_tests[:20]: |
1533 t = FormatTime(entry.duration) | 1533 t = FormatTime(entry.duration) |
1534 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) | 1534 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) |
1535 index += 1 | 1535 index += 1 |
1536 | 1536 |
1537 return result | 1537 return result |
1538 | 1538 |
1539 | 1539 |
1540 if __name__ == '__main__': | 1540 if __name__ == '__main__': |
1541 sys.exit(Main()) | 1541 sys.exit(Main()) |
OLD | NEW |