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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 ] | 132 ] |
133 if argv: | 133 if argv: |
134 cmd.append(argv.pop(0)) | 134 cmd.append(argv.pop(0)) |
135 else: | 135 else: |
136 print( | 136 print( |
137 'Test commands should be followed by tests to run. Defaulting to html') | 137 'Test commands should be followed by tests to run. Defaulting to html') |
138 cmd.append('html') | 138 cmd.append('html') |
139 return call(cmd) | 139 return call(cmd) |
140 | 140 |
141 def test_server(): | 141 def test_server(): |
142 start_test_server(5400, os.path.join('out', 'ReleaseIA32')) | 142 start_test_server(5400, os.path.join('out', 'ReleaseX64')) |
143 | 143 |
144 def test_server_dartium(): | 144 def test_server_dartium(): |
145 start_test_server(5500, os.path.join('..', 'out', 'Release')) | 145 start_test_server(5500, os.path.join('..', 'out', 'Release')) |
146 | 146 |
147 def start_test_server(port, build_directory): | 147 def start_test_server(port, build_directory): |
148 print('Browse tests at ' | 148 print('Browse tests at ' |
149 '\033[94mhttp://localhost:%d/root_build/generated_tests/\033[0m' % port) | 149 '\033[94mhttp://localhost:%d/root_build/generated_tests/\033[0m' % port) |
150 return call([ | 150 return call([ |
151 utils.DartBinary(), | 151 utils.DartBinary(), |
152 os.path.join('tools', 'testing', 'dart', 'http_server.dart'), | 152 os.path.join('tools', 'testing', 'dart', 'http_server.dart'), |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 help(); | 205 help(); |
206 success = False | 206 success = False |
207 break | 207 break |
208 returncode = commands[command][0]() | 208 returncode = commands[command][0]() |
209 success = success and not bool(returncode) | 209 success = success and not bool(returncode) |
210 | 210 |
211 sys.exit(not success) | 211 sys.exit(not success) |
212 | 212 |
213 if __name__ == '__main__': | 213 if __name__ == '__main__': |
214 main() | 214 main() |
OLD | NEW |