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

Side by Side Diff: frog/scripts/bootstrap/build_frogpad_js.py

Issue 9546015: create build_frogpad_js.py to help repro bug 1700 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: removed chmod Created 8 years, 9 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 | tools/testing/frogpad/frogpad.dart » ('j') | tools/testing/frogpad/frogpad.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2011 Google Inc. All Rights Reserved.
ahe 2012/03/07 13:07:54 Why is this file in scripts/bootstrap? How is this
2
3 import os
4 import platform
5 import shutil
6 import stat
7 import sys
8
9 HOME = os.path.dirname(os.path.realpath(__file__))
10 HOME = os.path.join(HOME, os.pardir, os.pardir)
11
12 sys.path.append(HOME)
13 import frog
14
15 # Runs frog.dart on the dart vm to compile frogpad.dart to frogpad.js
16 def main(args):
17 if len(args) >= 2:
18 product_dir = args[1]
19 else:
20 product_dir = os.path.abspath(os.path.join(os.path.dirname(__file__),
21 '..', '..', '..', 'out/Release_ia32'))
ngeoffray 2012/03/07 12:53:44 out/Release_ia32 is linux only. I think this scrip
22 print product_dir
23
24 vm = os.path.join(product_dir, 'dart')
25 frogpad_dart = os.path.join(product_dir, '..', '..',
26 'tools', 'testing', 'frogpad', 'frogpad.dart')
27 frogpad_js = os.path.join(product_dir, 'frog', 'bin', 'frogpad.js')
28
29 if not os.path.exists(vm):
30 raise Exception("cannot find dart vm '%s'" % vm)
31
32 args = ['frog.py',
33 '--verbose',
34 '--vm=' + vm,
35 '--',
36 '--out=' + frogpad_js,
37 frogpad_dart]
38
39 exit_code = frog.main(args)
40 if exit_code:
41 return exit_code
42
43 if not os.path.exists(frogpad_js):
44 raise Exception("didn't generate '%s'" % frogpad_js)
45
46 return 0
47
48
49 if __name__ == '__main__':
50 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | tools/testing/frogpad/frogpad.dart » ('j') | tools/testing/frogpad/frogpad.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698