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

Side by Side Diff: tests/co19/testcfg.py

Issue 8341066: Fixes problem with running test.py --arch dartc --mode release,debug (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: style change Created 9 years, 1 month 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 | tools/test.py » ('j') | 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 5
6 import os 6 import os
7 from os.path import join, exists 7 from os.path import join, exists
8 import re 8 import re
9 9
10 import test 10 import test
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 # Parse the options by reading the .dart source file. 43 # Parse the options by reading the .dart source file.
44 source = self.GetSource() 44 source = self.GetSource()
45 vm_options = utils.ParseTestOptions(test.VM_OPTIONS_PATTERN, source, 45 vm_options = utils.ParseTestOptions(test.VM_OPTIONS_PATTERN, source,
46 self.context.workspace) 46 self.context.workspace)
47 dart_options = utils.ParseTestOptions(test.DART_OPTIONS_PATTERN, source, 47 dart_options = utils.ParseTestOptions(test.DART_OPTIONS_PATTERN, source,
48 self.context.workspace) 48 self.context.workspace)
49 49
50 # Combine everything into a command array and return it. 50 # Combine everything into a command array and return it.
51 command = self.context.GetDart(self.mode, self.arch) 51 command = self.context.GetDart(self.mode, self.arch)
52 command += self.context.flags 52 command += self.context.flags
53 if self.mode == 'release': command += ['--optimize']
53 if vm_options: command += vm_options 54 if vm_options: command += vm_options
54 if dart_options: command += dart_options 55 if dart_options: command += dart_options
55 else: 56 else:
56 command += [self.filename] 57 command += [self.filename]
57 return command 58 return command
58 59
59 def GetName(self): 60 def GetName(self):
60 return self.path[-1] 61 return self.path[-1]
61 62
62 def GetPath(self): 63 def GetPath(self):
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 patterns[idx : idx] = ['*'] * (len(file) - len(path)) 141 patterns[idx : idx] = ['*'] * (len(file) - len(path))
141 path = [test.Pattern(p) for p in patterns] 142 path = [test.Pattern(p) for p in patterns]
142 143
143 for i in xrange(len(path)): 144 for i in xrange(len(path)):
144 if not path[i].match(file[i]): 145 if not path[i].match(file[i]):
145 return False 146 return False
146 return True 147 return True
147 148
148 def GetConfiguration(context, root): 149 def GetConfiguration(context, root):
149 return Co19TestConfiguration(context, root) 150 return Co19TestConfiguration(context, root)
OLDNEW
« no previous file with comments | « no previous file | tools/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698