| OLD | NEW |
| 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2011, 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 else: | 263 else: |
| 264 return exit_code < 0 | 264 return exit_code < 0 |
| 265 | 265 |
| 266 | 266 |
| 267 def DiagnoseExitCode(exit_code, command): | 267 def DiagnoseExitCode(exit_code, command): |
| 268 if IsCrashExitCode(exit_code): | 268 if IsCrashExitCode(exit_code): |
| 269 sys.stderr.write('Command: %s\nCRASHED with exit code %d (0x%x)\n' % ( | 269 sys.stderr.write('Command: %s\nCRASHED with exit code %d (0x%x)\n' % ( |
| 270 ' '.join(command), exit_code, exit_code & 0xffffffff)) | 270 ' '.join(command), exit_code, exit_code & 0xffffffff)) |
| 271 | 271 |
| 272 | 272 |
| 273 def Touch(name): |
| 274 with file(name, 'a'): |
| 275 os.utime(name, None) |
| 276 |
| 277 |
| 273 if __name__ == "__main__": | 278 if __name__ == "__main__": |
| 274 import sys | 279 import sys |
| 275 Main(sys.argv) | 280 Main(sys.argv) |
| OLD | NEW |