| OLD | NEW |
| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 'analyze': [analyze, 'Run the dart analyzer'], | 176 'analyze': [analyze, 'Run the dart analyzer'], |
| 177 'build': [build, 'Build dart in release mode'], | 177 'build': [build, 'Build dart in release mode'], |
| 178 'dart2js': [dart2js, 'Run dart2js on the .dart file specified'], | 178 'dart2js': [dart2js, 'Run dart2js on the .dart file specified'], |
| 179 'dartc': [dartc, 'Runs dartc in release mode'], | 179 'dartc': [dartc, 'Runs dartc in release mode'], |
| 180 'docs': [docs, 'Generates docs.json'], | 180 'docs': [docs, 'Generates docs.json'], |
| 181 'gen': [gen, 'Re-generate DOM generated files (run go.sh)'], | 181 'gen': [gen, 'Re-generate DOM generated files (run go.sh)'], |
| 182 'size_check': [size_check, 'Check the size of dart2js compiled Swarm'], | 182 'size_check': [size_check, 'Check the size of dart2js compiled Swarm'], |
| 183 'test_docs': [test_docs, 'Tests docs.dart'], | 183 'test_docs': [test_docs, 'Tests docs.dart'], |
| 184 'test_chrome': [test_chrome, 'Run tests in checked mode in Chrome.\n' | 184 'test_chrome': [test_chrome, 'Run tests in checked mode in Chrome.\n' |
| 185 '\t\tOptionally provide name of test to run.'], | 185 '\t\tOptionally provide name of test to run.'], |
| 186 'test_drt': [test_drt, 'Run tests in checked mode in DumpRenderTree.\n' | 186 # TODO(antonm): fix option name. |
| 187 'test_drt': [test_drt, 'Run tests in checked mode in content shell.\n' |
| 187 '\t\tOptionally provide name of test to run.'], | 188 '\t\tOptionally provide name of test to run.'], |
| 188 'test_ff': [test_ff, 'Run tests in checked mode in Firefox.\n' | 189 'test_ff': [test_ff, 'Run tests in checked mode in Firefox.\n' |
| 189 '\t\tOptionally provide name of test to run.'], | 190 '\t\tOptionally provide name of test to run.'], |
| 190 'http_server': [http_server, 'Starts the testing server for manually ' | 191 'http_server': [http_server, 'Starts the testing server for manually ' |
| 191 'running browser tests.'], | 192 'running browser tests.'], |
| 192 } | 193 } |
| 193 | 194 |
| 194 def main(): | 195 def main(): |
| 195 success = True | 196 success = True |
| 196 argv.pop(0) | 197 argv.pop(0) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 208 help(); | 209 help(); |
| 209 success = False | 210 success = False |
| 210 break | 211 break |
| 211 returncode = commands[command][0]() | 212 returncode = commands[command][0]() |
| 212 success = success and not bool(returncode) | 213 success = success and not bool(returncode) |
| 213 | 214 |
| 214 sys.exit(not success) | 215 sys.exit(not success) |
| 215 | 216 |
| 216 if __name__ == '__main__': | 217 if __name__ == '__main__': |
| 217 main() | 218 main() |
| OLD | NEW |