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

Side by Side Diff: tools/utils.py

Issue 11098046: Move a helper function to find out Dart binary into utils.py (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/test.py ('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 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 # This file contains a set of utilities functions used by other Python-based 5 # This file contains a set of utilities functions used by other Python-based
6 # scripts. 6 # scripts.
7 7
8 import commands 8 import commands
9 import os 9 import os
10 import platform 10 import platform
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 if IsCrashExitCode(exit_code): 290 if IsCrashExitCode(exit_code):
291 sys.stderr.write('Command: %s\nCRASHED with exit code %d (0x%x)\n' % ( 291 sys.stderr.write('Command: %s\nCRASHED with exit code %d (0x%x)\n' % (
292 ' '.join(command), exit_code, exit_code & 0xffffffff)) 292 ' '.join(command), exit_code, exit_code & 0xffffffff))
293 293
294 294
295 def Touch(name): 295 def Touch(name):
296 with file(name, 'a'): 296 with file(name, 'a'):
297 os.utime(name, None) 297 os.utime(name, None)
298 298
299 299
300 def DartBinary():
301 tools_dir = os.path.dirname(os.path.realpath(__file__))
302 dart_binary_prefix = os.path.join(tools_dir, 'testing', 'bin')
303 if IsWindows():
304 return os.path.join(dart_binary_prefix, 'windows', 'dart.exe')
305 else:
306 return os.path.join(dart_binary_prefix, GuessOS(), 'dart')
307
308
300 if __name__ == "__main__": 309 if __name__ == "__main__":
301 import sys 310 import sys
302 Main(sys.argv) 311 Main(sys.argv)
OLDNEW
« no previous file with comments | « tools/test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698