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

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

Issue 8258016: Fix running of tests on Chromium and Dartium (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 | « no previous file | tools/testing/test_configuration.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 """Common TestCase subclasses used to define a single test.""" 5 """Common TestCase subclasses used to define a single test."""
6 6
7 import os 7 import os
8 import tempfile 8 import tempfile
9 9
10 import test 10 import test
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return False 83 return False
84 if self.kind == 'static type error': 84 if self.kind == 'static type error':
85 return self.run_arch.HasFatalTypeErrors() 85 return self.run_arch.HasFatalTypeErrors()
86 return False 86 return False
87 87
88 88
89 class BrowserTestCase(StandardTestCase): 89 class BrowserTestCase(StandardTestCase):
90 """A test case that executes inside a browser (or DumpRenderTree).""" 90 """A test case that executes inside a browser (or DumpRenderTree)."""
91 91
92 def __init__(self, context, path, filename, 92 def __init__(self, context, path, filename,
93 fatal_static_type_errors, mode, arch): 93 fatal_static_type_errors, mode, arch, vm_options=None):
94 super(BrowserTestCase, self).__init__(context, path, filename, mode, arch) 94 super(BrowserTestCase, self).__init__(
95 context, path, filename, mode, arch, vm_options)
95 self.fatal_static_type_errors = fatal_static_type_errors 96 self.fatal_static_type_errors = fatal_static_type_errors
96 97
97 def Run(self): 98 def Run(self):
98 """Optionally compiles and then runs the specified test.""" 99 """Optionally compiles and then runs the specified test."""
99 command = self.run_arch.GetCompileCommand(self.fatal_static_type_errors) 100 command = self.run_arch.GetCompileCommand(self.fatal_static_type_errors)
100 if command: 101 if command:
101 # We change the directory where dartc will be launched because 102 # We change the directory where dartc will be launched because
102 # it is not predictable on the location of the compiled file. In 103 # it is not predictable on the location of the compiled file. In
103 # case the test is a web test, we make sure the app file is not 104 # case the test is a web test, we make sure the app file is not
104 # in a subdirectory. 105 # in a subdirectory.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 cmd += ['-check-only', 147 cmd += ['-check-only',
147 '-fatal-type-errors', 148 '-fatal-type-errors',
148 '-Werror', 149 '-Werror',
149 '-out', self.temp_dir, 150 '-out', self.temp_dir,
150 self.filename] 151 self.filename]
151 152
152 return cmd 153 return cmd
153 154
154 def GetName(self): 155 def GetName(self):
155 return self.path[-1] 156 return self.path[-1]
OLDNEW
« no previous file with comments | « no previous file | tools/testing/test_configuration.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698