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

Side by Side Diff: tools/testing/architecture.py

Issue 8226016: Add the ability to run tests with several sets of VM flags (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments from ngeoffray@ 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 | « runtime/tests/dart/src/ProcessStdoutTest.dart ('k') | tools/testing/test_case.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 """ 8 """
9 Runs a Dart unit test in different configurations: dartium, chromium, ia32, x64, 9 Runs a Dart unit test in different configurations: dartium, chromium, ia32, x64,
10 arm, simarm, and dartc. Example: 10 arm, simarm, and dartc. Example:
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (!needsToWait) pass(); 98 if (!needsToWait) pass();
99 mainIsFinished = true; 99 mainIsFinished = true;
100 } catch(var e, var trace) { 100 } catch(var e, var trace) {
101 fail(e, trace); 101 fail(e, trace);
102 } 102 }
103 } 103 }
104 ''' 104 '''
105 105
106 106
107 # Patterns for matching test options in .dart files. 107 # Patterns for matching test options in .dart files.
108 VM_OPTIONS_PATTERN = re.compile(r"// VMOptions=(.*)")
109 DART_OPTIONS_PATTERN = re.compile(r"// DartOptions=(.*)") 108 DART_OPTIONS_PATTERN = re.compile(r"// DartOptions=(.*)")
110 109
111 # Pattern for checking if the test is a web test. 110 # Pattern for checking if the test is a web test.
112 DOM_IMPORT_PATTERN = re.compile(r"^#import.*(dart:dom|html.dart)'\);", 111 DOM_IMPORT_PATTERN = re.compile(r"^#import.*(dart:dom|html.dart)'\);",
113 re.MULTILINE) 112 re.MULTILINE)
114 113
115 # Pattern for matching the output of a browser test. 114 # Pattern for matching the output of a browser test.
116 BROWSER_OUTPUT_PASS_PATTERN = re.compile(r"^Content-Type: text/plain\nPASS$", 115 BROWSER_OUTPUT_PASS_PATTERN = re.compile(r"^Content-Type: text/plain\nPASS$",
117 re.MULTILINE) 116 re.MULTILINE)
118 117
(...skipping 20 matching lines...) Expand all
139 138
140 139
141 class Architecture(object): 140 class Architecture(object):
142 def __init__(self, root_path, arch, mode, test): 141 def __init__(self, root_path, arch, mode, test):
143 self.root_path = root_path; 142 self.root_path = root_path;
144 self.arch = arch; 143 self.arch = arch;
145 self.mode = mode; 144 self.mode = mode;
146 self.test = test; 145 self.test = test;
147 self.build_root = utils.GetBuildRoot(OS_GUESS, self.mode, self.arch) 146 self.build_root = utils.GetBuildRoot(OS_GUESS, self.mode, self.arch)
148 source = file(test).read() 147 source = file(test).read()
149 self.vm_options = utils.ParseTestOptions(VM_OPTIONS_PATTERN, 148 self.vm_options = []
150 source, 149 self.dart_options = []
151 root_path)
152 if not self.vm_options: self.vm_options = []
153
154 self.dart_options = utils.ParseTestOptions(DART_OPTIONS_PATTERN,
155 source,
156 root_path)
157 self.is_web_test = IsWebTest(test, source) 150 self.is_web_test = IsWebTest(test, source)
158 self.temp_dir = None 151 self.temp_dir = None
159 152
160 def HasFatalTypeErrors(self): 153 def HasFatalTypeErrors(self):
161 return False 154 return False
162 155
163 def GetTestFrameworkPath(self): 156 def GetTestFrameworkPath(self):
164 return join(self.root_path, 'tests', 'isolate', 'src', 157 return join(self.root_path, 'tests', 'isolate', 'src',
165 'TestFramework.dart') 158 'TestFramework.dart')
166 159
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 return ChromiumArchitecture(root_path, arch, mode, test) 434 return ChromiumArchitecture(root_path, arch, mode, test)
442 435
443 elif arch == 'dartium': 436 elif arch == 'dartium':
444 return DartiumArchitecture(root_path, arch, mode, test) 437 return DartiumArchitecture(root_path, arch, mode, test)
445 438
446 elif arch in ['ia32', 'x64', 'simarm', 'arm']: 439 elif arch in ['ia32', 'x64', 'simarm', 'arm']:
447 return RuntimeArchitecture(root_path, arch, mode, test) 440 return RuntimeArchitecture(root_path, arch, mode, test)
448 441
449 elif arch == 'dartc': 442 elif arch == 'dartc':
450 return DartcArchitecture(root_path, arch, mode, test) 443 return DartcArchitecture(root_path, arch, mode, test)
451
OLDNEW
« no previous file with comments | « runtime/tests/dart/src/ProcessStdoutTest.dart ('k') | tools/testing/test_case.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698