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

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

Issue 8437081: Frog changes (in experimental) to get frog integrated into the test infrastructure. (Closed) Base URL: http://dart.googlecode.com/svn/experimental/frog/
Patch Set: '' 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2011 Google Inc. All Rights Reserved. 1 # Copyright 2011 Google Inc. All Rights Reserved.
2 2
3 import os 3 import os
4 import shutil 4 import shutil
5 import stat 5 import stat
6 import sys 6 import sys
7 7
8 HOME = os.path.dirname(os.path.realpath(__file__)) 8 HOME = os.path.dirname(os.path.realpath(__file__))
9 # TODO(ngeoffray): does not work on Windows.
10 HOME = os.path.join(HOME, os.pardir, os.pardir) 9 HOME = os.path.join(HOME, os.pardir, os.pardir)
11 10
12 sys.path.append(HOME) 11 sys.path.append(HOME)
13 import frog 12 import frog
14 13
15 def main(args): 14 def main(args):
16 for arg in args: 15 js_out = args[1]
17 index = arg.find('--js_out=')
18 if index != -1:
19 js_out = arg[9:len(arg)];
20 16
21 exit_code = 0 17 # TODO(ngeoffray): Create a script that will run the VM in production mode.
22 if js_out.find('Release') != -1: 18 # if js_out.find('Release') != -1:
23 exit_code = frog.main(args) 19 shutil.copy(os.path.join(HOME, 'scripts', 'bootstrap', 'frog_wrapper.py'),
24 else: 20 js_out)
25 shutil.copy(os.path.join(HOME, 'scripts', 'bootstrap', 'frog_wrapper.py'),
26 js_out)
27 if exit_code:
28 return exit_code
29 os.chmod(js_out, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR | 21 os.chmod(js_out, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR |
30 stat.S_IRGRP | stat.S_IWUSR) 22 stat.S_IRGRP | stat.S_IWUSR)
31 return exit_code 23 return 0
32 24
33 25
34 if __name__ == '__main__': 26 if __name__ == '__main__':
35 sys.exit(main(sys.argv)) 27 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698