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

Side by Side Diff: tools/test.py

Issue 9695053: Fix test.py for Python 2.7. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | 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 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 prev_error_mode = ctypes.windll.kernel32.SetErrorMode(mode) 465 prev_error_mode = ctypes.windll.kernel32.SetErrorMode(mode)
466 except ImportError: 466 except ImportError:
467 pass 467 pass
468 return prev_error_mode 468 return prev_error_mode
469 469
470 def RunProcess(context, timeout, args, **rest): 470 def RunProcess(context, timeout, args, **rest):
471 if context.verbose: print "#", " ".join(args) 471 if context.verbose: print "#", " ".join(args)
472 popen_args = args 472 popen_args = args
473 prev_error_mode = SEM_INVALID_VALUE 473 prev_error_mode = SEM_INVALID_VALUE
474 if utils.IsWindows(): 474 if utils.IsWindows():
475 popen_args = '"' + subprocess.list2cmdline(args) + '"' 475 popen_args = subprocess.list2cmdline(args)
476 if context.suppress_dialogs: 476 if context.suppress_dialogs:
477 # Try to change the error mode to avoid dialogs on fatal errors. Don't 477 # Try to change the error mode to avoid dialogs on fatal errors. Don't
478 # touch any existing error mode flags by merging the existing error mode. 478 # touch any existing error mode flags by merging the existing error mode.
479 # See http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx. 479 # See http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx.
480 error_mode = SEM_NOGPFAULTERRORBOX 480 error_mode = SEM_NOGPFAULTERRORBOX
481 prev_error_mode = Win32SetErrorMode(error_mode) 481 prev_error_mode = Win32SetErrorMode(error_mode)
482 Win32SetErrorMode(error_mode | prev_error_mode) 482 Win32SetErrorMode(error_mode | prev_error_mode)
483 process = subprocess.Popen( 483 process = subprocess.Popen(
484 shell = utils.IsWindows(), 484 shell = utils.IsWindows(),
485 args = popen_args, 485 args = popen_args,
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 for entry in timed_tests[:20]: 1557 for entry in timed_tests[:20]:
1558 t = FormatTime(entry.duration) 1558 t = FormatTime(entry.duration)
1559 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) 1559 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel()))
1560 index += 1 1560 index += 1
1561 1561
1562 return result 1562 return result
1563 1563
1564 1564
1565 if __name__ == '__main__': 1565 if __name__ == '__main__':
1566 sys.exit(Main()) 1566 sys.exit(Main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698