Chromium Code Reviews| 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) |