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

Unified Diff: dart/tools/testing/test_case.py

Issue 8408002: Add a new variable environment for testing, to replace the misusage of 'arch'. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/tools/testing/architecture.py ('k') | dart/tools/testing/test_configuration.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/test_case.py
===================================================================
--- dart/tools/testing/test_case.py (revision 991)
+++ dart/tools/testing/test_case.py (working copy)
@@ -18,12 +18,15 @@
class StandardTestCase(test.TestCase):
"""A test case defined by a *Test.dart file."""
- def __init__(self, context, path, filename, mode, arch, vm_options=None):
+ def __init__(self, context, path, filename, mode, arch, component,
+ vm_options=None):
super(StandardTestCase, self).__init__(context, path)
self.filename = filename
self.mode = mode
self.arch = arch
+ self.component = component
self.run_arch = architecture.GetArchitecture(self.arch, self.mode,
+ self.component,
self.filename)
for flag in context.flags:
self.run_arch.vm_options.append(flag)
@@ -36,7 +39,8 @@
return self.GetName().endswith('NegativeTest')
def GetLabel(self):
- return '%s%s %s' % (self.mode, self.arch, '/'.join(self.path))
+ return '%s%s %s %s' % (self.mode, self.arch, self.component,
+ '/'.join(self.path))
def GetCommand(self):
return self.run_arch.GetRunCommand()
@@ -60,8 +64,9 @@
class MultiTestCase(StandardTestCase):
"""Multiple test cases defined within a single *Test.dart file."""
- def __init__(self, context, path, filename, kind, mode, arch):
- super(MultiTestCase, self).__init__(context, path, filename, mode, arch)
+ def __init__(self, context, path, filename, kind, mode, arch, component):
+ super(MultiTestCase, self).__init__(context, path, filename, mode, arch,
+ component)
self.kind = kind
def GetCommand(self):
@@ -90,9 +95,9 @@
"""A test case that executes inside a browser (or DumpRenderTree)."""
def __init__(self, context, path, filename,
- fatal_static_type_errors, mode, arch, vm_options=None):
+ fatal_static_type_errors, mode, arch, component, vm_options=None):
super(BrowserTestCase, self).__init__(
- context, path, filename, mode, arch, vm_options)
+ context, path, filename, mode, arch, component, vm_options)
self.fatal_static_type_errors = fatal_static_type_errors
def Run(self):
@@ -125,12 +130,15 @@
class CompilationTestCase(test.TestCase):
"""Run the dartc compiler on a given top level .dart file."""
- def __init__(self, path, context, filename, mode, arch):
+ def __init__(self, path, context, filename, mode, arch, component):
super(CompilationTestCase, self).__init__(context, path)
self.filename = filename
self.mode = mode
self.arch = arch
- self.run_arch = architecture.GetArchitecture(self.arch, self.mode,
+ self.component = component
+ self.run_arch = architecture.GetArchitecture(self.arch,
+ self.mode,
+ self.component,
self.filename)
self.temp_dir = tempfile.mkdtemp(prefix='dartc-output-')
@@ -138,7 +146,8 @@
return False
def GetLabel(self):
- return '%s/%s %s' % (self.mode, self.arch, '/'.join(self.path))
+ return '%s/%s %s %s' % (self.mode, self.arch, self.component,
+ '/'.join(self.path))
def GetCommand(self):
"""Returns a command line to run the test."""
« no previous file with comments | « dart/tools/testing/architecture.py ('k') | dart/tools/testing/test_configuration.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698