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

Side by Side Diff: tools/dom/dom.py

Issue 14732003: Implement Model-Driven-Views spec for Dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: trying upload again Created 7 years, 7 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 6
7 # A script which makes it easy to execute common DOM-related tasks 7 # A script which makes it easy to execute common DOM-related tasks
8 8
9 import os 9 import os
10 import subprocess 10 import subprocess
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 '-o%s' % out_file 91 '-o%s' % out_file
92 ] 92 ]
93 if checked: 93 if checked:
94 args.append('--checked') 94 args.append('--checked')
95 95
96 call(args) 96 call(args)
97 return out_file 97 return out_file
98 98
99 def gen(): 99 def gen():
100 os.chdir(os.path.join('tools', 'dom', 'scripts')) 100 os.chdir(os.path.join('tools', 'dom', 'scripts'))
101 return call([os.path.join(os.getcwd(), 'dartdomgenerator.py'), 101 result = call([os.path.join(os.getcwd(), 'dartdomgenerator.py'),
102 '--rebuild', '--parallel', '--systems=htmldart2js,htmldartium']) 102 '--rebuild', '--parallel', '--systems=htmldart2js,htmldartium'])
103 os.chdir(os.path.join('..', '..', '..'))
blois 2013/05/01 17:00:42 Is this necessary? The script should reset the pat
Jennifer Messerly 2013/05/01 18:03:44 Unless init_dir was a recent addition, yeah, this
Jennifer Messerly 2013/05/01 18:11:46 I figured it out. Python __file__ is a relative pa
104 return result
103 105
104 def http_server(): 106 def http_server():
105 print('Browse tests at ' 107 print('Browse tests at '
106 '\033[94mhttp://localhost:5400/root_build/generated_tests/\033[0m') 108 '\033[94mhttp://localhost:5400/root_build/generated_tests/\033[0m')
107 return call([ 109 return call([
108 utils.DartBinary(), 110 utils.DartBinary(),
109 os.path.join('tools', 'testing', 'dart', 'http_server.dart'), 111 os.path.join('tools', 'testing', 'dart', 'http_server.dart'),
110 '--port=5400', 112 '--port=5400',
111 '--crossOriginPort=5401', 113 '--crossOriginPort=5401',
112 '--network=0.0.0.0', 114 '--network=0.0.0.0',
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 help(); 210 help();
209 success = False 211 success = False
210 break 212 break
211 returncode = commands[command][0]() 213 returncode = commands[command][0]()
212 success = success and not bool(returncode) 214 success = success and not bool(returncode)
213 215
214 sys.exit(not success) 216 sys.exit(not success)
215 217
216 if __name__ == '__main__': 218 if __name__ == '__main__':
217 main() 219 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698