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

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
Index: dart/tools/testing/test_case.py
===================================================================
--- dart/tools/testing/test_case.py (revision 813)
+++ dart/tools/testing/test_case.py (working copy)
@@ -18,12 +18,14 @@
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, FOOBAR, vm_options=None):
super(StandardTestCase, self).__init__(context, path)
self.filename = filename
self.mode = mode
self.arch = arch
+ self.FOOBAR = FOOBAR
self.run_arch = architecture.GetArchitecture(self.arch, self.mode,
+ self.FOOBAR,
self.filename)
for flag in context.flags:
self.run_arch.vm_options.append(flag)
@@ -36,7 +38,7 @@
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.FOOBAR, '/'.join(self.path))
def GetCommand(self):
return self.run_arch.GetRunCommand()
@@ -60,8 +62,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, FOOBAR):
+ super(MultiTestCase, self).__init__(context, path, filename, mode, arch,
+ FOOBAR)
self.kind = kind
def GetCommand(self):
@@ -90,9 +93,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, FOOBAR, vm_options=None):
super(BrowserTestCase, self).__init__(
- context, path, filename, mode, arch, vm_options)
+ context, path, filename, mode, arch, FOOBAR, vm_options)
self.fatal_static_type_errors = fatal_static_type_errors
def Run(self):
@@ -125,12 +128,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, FOOBAR):
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.FOOBAR = FOOBAR
+ self.run_arch = architecture.GetArchitecture(self.arch,
+ self.mode,
+ self.FOOBAR,
self.filename)
self.temp_dir = tempfile.mkdtemp(prefix='dartc-output-')
@@ -138,7 +144,7 @@
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.FOOBAR, '/'.join(self.path))
def GetCommand(self):
"""Returns a command line to run the test."""

Powered by Google App Engine
This is Rietveld 408576698