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

Side by Side Diff: tools/utils.py

Issue 8273035: Add short read/write testing of Socket and Process tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 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 | « tests/standalone/src/ProcessStdoutTest.dart ('k') | 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 167
168 def ParseTestOptionsMultiple(pattern, source, workspace): 168 def ParseTestOptionsMultiple(pattern, source, workspace):
169 matches = pattern.findall(source) 169 matches = pattern.findall(source)
170 if matches: 170 if matches:
171 result = [] 171 result = []
172 for match in matches: 172 for match in matches:
173 if len(match) > 0: 173 if len(match) > 0:
174 result.append( 174 result.append(
175 [RewritePathSeparator(o, workspace) for o in match.split(' ')]); 175 [RewritePathSeparator(o, workspace) for o in match.split(' ')]);
176 else:
177 result.append([])
176 return result 178 return result
177 else: 179 else:
178 return None 180 return None
179 181
180 182
181 def ConfigureJava(): 183 def ConfigureJava():
182 java_home = '/usr/libexec/java_home' 184 java_home = '/usr/libexec/java_home'
183 if os.path.exists(java_home): 185 if os.path.exists(java_home):
184 proc = subprocess.Popen([java_home, '-v', '1.6+'], 186 proc = subprocess.Popen([java_home, '-v', '1.6+'],
185 stdout=subprocess.PIPE, 187 stdout=subprocess.PIPE,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 def __init__(self, value): 243 def __init__(self, value):
242 self.value = value 244 self.value = value
243 245
244 def __str__(self): 246 def __str__(self):
245 return repr(self.value) 247 return repr(self.value)
246 248
247 249
248 if __name__ == "__main__": 250 if __name__ == "__main__":
249 import sys 251 import sys
250 Main(sys.argv) 252 Main(sys.argv)
OLDNEW
« no previous file with comments | « tests/standalone/src/ProcessStdoutTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698