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

Side by Side Diff: tools/utils.py

Issue 10634018: Fix benchmark script to account for the recent executable directory name change. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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 platform 8 import platform
9 import re 9 import re
10 import os 10 import os
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 'freebsd': os.path.join('out'), 118 'freebsd': os.path.join('out'),
119 'macos': os.path.join('xcodebuild'), 119 'macos': os.path.join('xcodebuild'),
120 } 120 }
121 121
122 def GetBuildMode(mode): 122 def GetBuildMode(mode):
123 global BUILD_MODES 123 global BUILD_MODES
124 return BUILD_MODES[mode] 124 return BUILD_MODES[mode]
125 125
126 126
127 def GetBuildConf(mode, arch): 127 def GetBuildConf(mode, arch):
128 return GetBuildMode(mode) + "_" + arch 128 return GetBuildMode(mode) + arch.upper()
129 129
130 130
131 def GetBuildRoot(target_os, mode=None, arch=None): 131 def GetBuildRoot(target_os, mode=None, arch=None):
132 global BUILD_ROOT 132 global BUILD_ROOT
133 if mode: 133 if mode:
134 return os.path.join(BUILD_ROOT[target_os], GetBuildConf(mode, arch)) 134 return os.path.join(BUILD_ROOT[target_os], GetBuildConf(mode, arch))
135 else: 135 else:
136 return BUILD_ROOT[target_os] 136 return BUILD_ROOT[target_os]
137 137
138 138
139 def Main(argv): 139 def Main(argv):
140 print "GuessOS() -> ", GuessOS() 140 print "GuessOS() -> ", GuessOS()
141 print "GuessArchitecture() -> ", GuessArchitecture() 141 print "GuessArchitecture() -> ", GuessArchitecture()
142 print "GuessCpus() -> ", GuessCpus() 142 print "GuessCpus() -> ", GuessCpus()
143 print "IsWindows() -> ", IsWindows() 143 print "IsWindows() -> ", IsWindows()
144 144
145 145
146 if __name__ == "__main__": 146 if __name__ == "__main__":
147 import sys 147 import sys
148 Main(sys.argv) 148 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