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

Unified Diff: dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py

Issue 9332008: Use production mode when running on debug VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 10 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 | « no previous file | dart/frog/scripts/bootstrap/frog_wrapper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py
diff --git a/dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py b/dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py
index f61d8b5e0d0aeaec164dbcb9df68a54d36e23db3..2dda5cef11e7c14b500de259d7cd44aceb177692 100644
--- a/dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py
+++ b/dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py
@@ -11,6 +11,7 @@ HOME = os.path.join(HOME, os.pardir, os.pardir)
END_SCRIPT = '''
VM = '%s'
+VM_FLAGS = '%s'
if __name__ == '__main__':
sys.exit(main(sys.argv))
'''
@@ -23,13 +24,20 @@ def main(args):
vm = vm + '.exe'
frog = os.path.join(product_dir, 'frog', 'bin', 'frog')
- # TODO(ngeoffray): Create a script that will run the VM in production mode.
- # if js_out.find('Release') != -1:
shutil.copy(os.path.join(HOME, 'scripts', 'bootstrap', 'frog_wrapper.py'),
frog)
+ if 'Release' in product_dir:
+ # We want to run our tests on the VM in production mode and in
+ # developer mode. It turns out that developer mode is really slow
+ # on the debug VM, so it makes sense to make the pairings:
+ # (release VM, developer mode) and (debug VM, production mode).
+ vm_flags = '--vm_flags=--enable_asserts --enable_type_checks'
srdjan 2012/02/07 16:31:00 Per specification, enabling type checks enables as
+ else:
+ vm_flags = ''
+
with open(frog, 'a+') as f:
- f.write(END_SCRIPT % vm)
+ f.write(END_SCRIPT % (vm, vm_flags))
os.chmod(frog, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR |
stat.S_IRGRP | stat.S_IWUSR)
« no previous file with comments | « no previous file | dart/frog/scripts/bootstrap/frog_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698