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

Side by Side Diff: tools/utils.py

Issue 9133019: bot: fix to get appropriate executable in windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | « no previous file | 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) 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
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698