Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(757)

Side by Side Diff: tools/test.py

Issue 6677076: Merge up to bleeding_edge r7201 to isolates branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Fix lint. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/linux-tick-processor ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 full_command, 367 full_command,
368 output, 368 output,
369 self.context.store_unexpected_output) 369 self.context.store_unexpected_output)
370 370
371 def BeforeRun(self): 371 def BeforeRun(self):
372 pass 372 pass
373 373
374 def AfterRun(self, result): 374 def AfterRun(self, result):
375 pass 375 pass
376 376
377 def GetCustomFlags(self, mode):
378 return None
379
377 def Run(self): 380 def Run(self):
378 self.BeforeRun() 381 self.BeforeRun()
379 try: 382 try:
380 result = self.RunCommand(self.GetCommand()) 383 result = self.RunCommand(self.GetCommand())
381 finally: 384 finally:
382 self.AfterRun(result) 385 self.AfterRun(result)
383 return result 386 return result
384 387
385 def Cleanup(self): 388 def Cleanup(self):
386 return 389 return
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 def GetVm(self, mode): 678 def GetVm(self, mode):
676 name = self.vm_root + SUFFIX[mode] 679 name = self.vm_root + SUFFIX[mode]
677 if utils.IsWindows() and not name.endswith('.exe'): 680 if utils.IsWindows() and not name.endswith('.exe'):
678 name = name + '.exe' 681 name = name + '.exe'
679 return name 682 return name
680 683
681 def GetVmCommand(self, testcase, mode): 684 def GetVmCommand(self, testcase, mode):
682 return [self.GetVm(mode)] + self.GetVmFlags(testcase, mode) 685 return [self.GetVm(mode)] + self.GetVmFlags(testcase, mode)
683 686
684 def GetVmFlags(self, testcase, mode): 687 def GetVmFlags(self, testcase, mode):
685 return testcase.variant_flags + FLAGS[mode] 688 flags = testcase.GetCustomFlags(mode)
689 if flags is None:
690 flags = FLAGS[mode]
691 return testcase.variant_flags + flags
686 692
687 def GetTimeout(self, testcase, mode): 693 def GetTimeout(self, testcase, mode):
688 result = self.timeout * TIMEOUT_SCALEFACTOR[mode] 694 result = self.timeout * TIMEOUT_SCALEFACTOR[mode]
689 if '--stress-opt' in self.GetVmFlags(testcase, mode): 695 if '--stress-opt' in self.GetVmFlags(testcase, mode):
690 return result * 2 696 return result * 2
691 else: 697 else:
692 return result 698 return result
693 699
694 def RunTestCases(cases_to_run, progress, tasks): 700 def RunTestCases(cases_to_run, progress, tasks):
695 progress = PROGRESS_INDICATORS[progress](cases_to_run) 701 progress = PROGRESS_INDICATORS[progress](cases_to_run)
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 for entry in timed_tests[:20]: 1481 for entry in timed_tests[:20]:
1476 t = FormatTime(entry.duration) 1482 t = FormatTime(entry.duration)
1477 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) 1483 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel()))
1478 index += 1 1484 index += 1
1479 1485
1480 return result 1486 return result
1481 1487
1482 1488
1483 if __name__ == '__main__': 1489 if __name__ == '__main__':
1484 sys.exit(Main()) 1490 sys.exit(Main())
OLDNEW
« no previous file with comments | « tools/linux-tick-processor ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698