OLD | NEW |
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 Loading... |
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) |
OLD | NEW |