| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 # Returns the path to the Dart test runner (executes the .dart file). | 112 # Returns the path to the Dart test runner (executes the .dart file). |
| 113 def GetDartRunner(mode, arch, component): | 113 def GetDartRunner(mode, arch, component): |
| 114 build_root = GetBuildRoot(GuessOS(), mode, arch) | 114 build_root = GetBuildRoot(GuessOS(), mode, arch) |
| 115 if component == 'dartc': | 115 if component == 'dartc': |
| 116 return os.path.join(build_root, 'compiler', 'bin', 'dartc_test') | 116 return os.path.join(build_root, 'compiler', 'bin', 'dartc_test') |
| 117 elif component == 'frog': | 117 elif component == 'frog': |
| 118 return os.path.join(build_root, 'frog', 'bin', 'frog') | 118 return os.path.join(build_root, 'frog', 'bin', 'frog') |
| 119 elif component == 'frogsh': | 119 elif component == 'frogsh': |
| 120 return os.path.join(build_root, 'frog', 'bin', 'frogsh') | 120 return os.path.join(build_root, 'frog', 'bin', 'frogsh') |
| 121 else: | 121 else: |
| 122 return os.path.join(build_root, 'dart') | 122 suffix = '' |
| 123 if IsWindows(): |
| 124 suffix = '.exe' |
| 125 return os.path.join(build_root, 'dart') + suffix |
| 123 | 126 |
| 124 | 127 |
| 125 # Mapping table between build mode and build configuration. | 128 # Mapping table between build mode and build configuration. |
| 126 BUILD_MODES = { | 129 BUILD_MODES = { |
| 127 'debug': 'Debug', | 130 'debug': 'Debug', |
| 128 'release': 'Release', | 131 'release': 'Release', |
| 129 } | 132 } |
| 130 | 133 |
| 131 | 134 |
| 132 # Mapping table between OS and build output location. | 135 # Mapping table between OS and build output location. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 def __init__(self, value): | 260 def __init__(self, value): |
| 258 self.value = value | 261 self.value = value |
| 259 | 262 |
| 260 def __str__(self): | 263 def __str__(self): |
| 261 return repr(self.value) | 264 return repr(self.value) |
| 262 | 265 |
| 263 | 266 |
| 264 if __name__ == "__main__": | 267 if __name__ == "__main__": |
| 265 import sys | 268 import sys |
| 266 Main(sys.argv) | 269 Main(sys.argv) |
| OLD | NEW |