| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 setattr(parser.values, option.dest, value) | 107 setattr(parser.values, option.dest, value) |
| 108 | 108 |
| 109 | 109 |
| 110 # Returns the path to the Dart test runner (executes the .dart file). | 110 # Returns the path to the Dart test runner (executes the .dart file). |
| 111 def GetDartRunner(mode, arch, component): | 111 def GetDartRunner(mode, arch, component): |
| 112 build_root = GetBuildRoot(GuessOS(), mode, arch) | 112 build_root = GetBuildRoot(GuessOS(), mode, arch) |
| 113 if component == 'dartc': | 113 if component == 'dartc': |
| 114 return os.path.join(build_root, 'compiler', 'bin', 'dartc_test') | 114 return os.path.join(build_root, 'compiler', 'bin', 'dartc_test') |
| 115 elif component == 'frog': | 115 elif component == 'frog': |
| 116 return os.path.join(build_root, 'frog', 'bin', 'frog') | 116 return os.path.join(build_root, 'frog', 'bin', 'frog') |
| 117 elif component == 'frogsh': | 117 elif component == 'frogsh' or component == 'frogbrowsers': |
| 118 return os.path.join(build_root, 'frog', 'bin', 'frogsh') | 118 return os.path.join(build_root, 'frog', 'bin', 'frogsh') |
| 119 else: | 119 else: |
| 120 return os.path.join(build_root, 'dart_bin') | 120 return os.path.join(build_root, 'dart_bin') |
| 121 | 121 |
| 122 | 122 |
| 123 # Mapping table between build mode and build configuration. | 123 # Mapping table between build mode and build configuration. |
| 124 BUILD_MODES = { | 124 BUILD_MODES = { |
| 125 'debug': 'Debug', | 125 'debug': 'Debug', |
| 126 'release': 'Release', | 126 'release': 'Release', |
| 127 } | 127 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 def __init__(self, value): | 255 def __init__(self, value): |
| 256 self.value = value | 256 self.value = value |
| 257 | 257 |
| 258 def __str__(self): | 258 def __str__(self): |
| 259 return repr(self.value) | 259 return repr(self.value) |
| 260 | 260 |
| 261 | 261 |
| 262 if __name__ == "__main__": | 262 if __name__ == "__main__": |
| 263 import sys | 263 import sys |
| 264 Main(sys.argv) | 264 Main(sys.argv) |
| OLD | NEW |