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

Unified Diff: tools/testing/architecture.py

Issue 8523024: Adding frogium: a frog-chromium architecture that runs tests in chromium that (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge with latest changes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/test.py ('k') | tools/testing/test_configuration.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/architecture.py
diff --git a/tools/testing/architecture.py b/tools/testing/architecture.py
index 5be05dbe9506cba72745b6b8a2a3e74eadec7ff6..f62605bb1b628a48d2ba99de8ed74a006936572b 100755
--- a/tools/testing/architecture.py
+++ b/tools/testing/architecture.py
@@ -346,6 +346,16 @@ class ChromiumArchitecture(BrowserArchitecture):
relpath = os.path.relpath(self.test, self.root_path)
return relpath.replace(os.sep, '_') + '.html'
+ def Compile(self):
+ return ExecuteCommand(self.GetCompileCommand())
+
+class DartcChromiumArchitecture(ChromiumArchitecture):
+ """ChromiumArchitecture that compiles code using dartc."""
+
+ def __init__(self, root_path, arch, mode, component, test):
+ super(DartcChromiumArchitecture, self).__init__(
+ root_path, arch, mode, component, test)
+
def GetCompileCommand(self, fatal_static_type_errors=False):
"""Returns cmdline as an array to invoke the compiler on this test."""
@@ -366,8 +376,27 @@ class ChromiumArchitecture(BrowserArchitecture):
cmd.append(self.GetTestScriptFile())
return cmd
- def Compile(self):
- return ExecuteCommand(self.GetCompileCommand())
+
+class FrogChromiumArchitecture(ChromiumArchitecture):
+ """ChromiumArchitecture that compiles code using frog."""
+
+ def __init__(self, root_path, arch, mode, component, test):
+ super(FrogChromiumArchitecture, self).__init__(
+ root_path, arch, mode, component, test)
+
+ def GetCompileCommand(self, fatal_static_type_errors=False):
+ """Returns cmdline as an array to invoke the compiler on this test."""
+
+ # We need an absolute path because the compilation will run
+ # in a temporary directory.
+
+ frog = os.path.abspath(utils.GetDartRunner(self.mode, self.arch, 'frogsh'))
+ cmd = [frog, '--out=' + self.GetScriptPath(), '--compile-only',
+ '--libdir=' + os.path.abspath(
+ os.path.join(self.root_path, 'frog', 'lib'))]
+ cmd.extend(self.vm_options)
+ cmd.append(self.GetTestScriptFile())
+ return cmd
class DartiumArchitecture(BrowserArchitecture):
@@ -524,11 +553,14 @@ def ExecuteCommand(cmd, verbose=False):
def GetArchitecture(arch, mode, component, test):
root_path = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..'))
if component == 'chromium':
- return ChromiumArchitecture(root_path, arch, mode, component, test)
+ return DartcChromiumArchitecture(root_path, arch, mode, component, test)
elif component == 'dartium':
return DartiumArchitecture(root_path, arch, mode, component, test)
+ elif component == 'frogium':
+ return FrogChromiumArchitecture(root_path, arch, mode, component, test)
+
elif component == 'webdriver':
return WebDriverArchiecture(root_path, arch, mode, component, test)
« no previous file with comments | « tools/test.py ('k') | tools/testing/test_configuration.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698