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

Unified Diff: tools/testing/architecture.py

Issue 8341066: Fixes problem with running test.py --arch dartc --mode release,debug (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: style change 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 | « tools/test.py ('k') | no next file » | 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 dcf21153b8ded8361016fdaef0cb14e0a0767a4c..0ea525f82447765f807a364fceb5c5ef9e758d6a 100755
--- a/tools/testing/architecture.py
+++ b/tools/testing/architecture.py
@@ -106,7 +106,7 @@ main() {
# Patterns for matching test options in .dart files.
-DART_OPTIONS_PATTERN = re.compile(r"// DartOptions=(.*)")
+DART_OPTIONS_PATTERN = re.compile(r'// DartOptions=(.*)')
# Pattern for checking if the test is a web test.
DOM_IMPORT_PATTERN = re.compile(r'#import.*(dart:(dom|html)|html\.dart).*\);',
@@ -271,8 +271,6 @@ class BrowserArchitecture(Architecture):
dart_flags = '--dart-flags=--enable_asserts --enable_type_checks '
dart_flags += ' '.join(self.vm_options)
- if self.arch == 'chromium' and self.mode == 'release':
- dart_flags += ' --optimize '
drt_flags.append(dart_flags)
html_output_file = os.path.join(self.GetHtmlPath(), self.GetHtmlName())
@@ -353,6 +351,8 @@ class ChromiumArchitecture(BrowserArchitecture):
'dartc'))
if utils.IsWindows(): dartc += '.exe'
cmd = [dartc, '--work', self.temp_dir]
+ if self.mode == 'release':
+ cmd += ['--optimize']
cmd += self.vm_options
cmd += ['--out', self.GetScriptPath()]
if fatal_static_type_errors:
@@ -405,6 +405,8 @@ class StandaloneArchitecture(Architecture):
test_name = os.path.basename(self.test)
test_path = os.path.abspath(self.test)
command = [dart] + self.vm_options
+ if self.mode == 'release':
+ command += ['--optimize']
(classname, extension) = os.path.splitext(test_name)
if self.dart_options:
command += self.dart_options
« no previous file with comments | « tools/test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698