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

Side by Side Diff: dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py

Issue 9430046: Explicitly use node.js in the cases where it is needed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/frog/scripts/bootstrap/frog_wrapper.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 Google Inc. All Rights Reserved. 1 # Copyright 2012 Google Inc. All Rights Reserved.
2 2
3 import os 3 import os
4 import platform 4 import platform
5 import shutil 5 import shutil
6 import stat 6 import stat
7 import sys 7 import sys
8 8
9 HOME = os.path.dirname(os.path.realpath(__file__)) 9 HOME = os.path.dirname(os.path.realpath(__file__))
10 HOME = os.path.join(HOME, os.pardir, os.pardir) 10 HOME = os.path.join(HOME, os.pardir, os.pardir)
11 BUILDER_NAME = os.environ.get('BUILDBOT_BUILDERNAME') 11 BUILDER_NAME = os.environ.get('BUILDBOT_BUILDERNAME')
12 12
13 END_SCRIPT = ''' 13 END_SCRIPT = '''
14 VM = '%s' 14 VM = '%s'
15 VM_FLAGS = '%s' 15 VM_FLAGS = '%s'
16 D8 = '%s'
16 if __name__ == '__main__': 17 if __name__ == '__main__':
17 sys.exit(main(sys.argv)) 18 sys.exit(main(sys.argv))
18 ''' 19 '''
19 20
20 def main(args): 21 def main(args):
21 product_dir = args[1] 22 product_dir = args[1]
22 vm = os.path.join(product_dir, 'dart') 23 vm = os.path.join(product_dir, 'dart')
24 d8 = os.path.join(product_dir, 'd8')
23 id = platform.system() 25 id = platform.system()
24 if id == 'Windows' or id == 'Microsoft': 26 if id == 'Windows' or id == 'Microsoft':
25 vm = vm + '.exe' 27 vm = vm + '.exe'
26 frog = os.path.join(product_dir, 'frog', 'bin', 'frog') 28 frog = os.path.join(product_dir, 'frog', 'bin', 'frog')
27 29
28 shutil.copy(os.path.join(HOME, 'scripts', 'bootstrap', 'frog_wrapper.py'), 30 shutil.copy(os.path.join(HOME, 'scripts', 'bootstrap', 'frog_wrapper.py'),
29 frog) 31 frog)
30 shutil.copy(os.path.join(HOME, 'scripts', 'bootstrap', 'frog.bat'), 32 shutil.copy(os.path.join(HOME, 'scripts', 'bootstrap', 'frog.bat'),
31 frog + '.bat') 33 frog + '.bat')
32 34
33 if 'Release' in product_dir and \ 35 if 'Release' in product_dir and \
34 (BUILDER_NAME == None or 'web' not in BUILDER_NAME): 36 (BUILDER_NAME == None or 'web' not in BUILDER_NAME):
35 # We want to run our tests on the VM in production mode and in 37 # We want to run our tests on the VM in production mode and in
36 # developer mode. It turns out that developer mode is really slow 38 # developer mode. It turns out that developer mode is really slow
37 # on the debug VM, so it makes sense to make the pairings: 39 # on the debug VM, so it makes sense to make the pairings:
38 # (release VM, developer mode) and (debug VM, production mode). 40 # (release VM, developer mode) and (debug VM, production mode).
39 vm_flags = '--vm_flags=--enable_asserts --enable_type_checks' 41 vm_flags = '--vm_flags=--enable_asserts --enable_type_checks'
40 else: 42 else:
41 # For test turnaround time, we run fully in release mode on 43 # For test turnaround time, we run fully in release mode on
42 # our web browser buildbots (and with debug VM). 44 # our web browser buildbots (and with debug VM).
43 vm_flags = '' 45 vm_flags = ''
44 46
45 with open(frog, 'a+') as f: 47 with open(frog, 'a+') as f:
46 f.write(END_SCRIPT % (vm, vm_flags)) 48 f.write(END_SCRIPT % (vm, vm_flags, d8))
47 49
48 os.chmod(frog, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR | 50 os.chmod(frog, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR |
49 stat.S_IRGRP | stat.S_IWUSR) 51 stat.S_IRGRP | stat.S_IWUSR)
50 return 0 52 return 0
51 53
52 54
53 if __name__ == '__main__': 55 if __name__ == '__main__':
54 sys.exit(main(sys.argv)) 56 sys.exit(main(sys.argv))
OLDNEW
« 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