OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, 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 | 7 |
8 """Test driver for the Dart project used by continuous build and developers.""" | 8 """Test driver for the Dart project used by continuous build and developers.""" |
9 | 9 |
10 | 10 |
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 default='true', | 1212 default='true', |
1213 type='choice') | 1213 type='choice') |
1214 result.add_option( | 1214 result.add_option( |
1215 '--optimize', | 1215 '--optimize', |
1216 help='Invoke dart compiler with --optimize flag', | 1216 help='Invoke dart compiler with --optimize flag', |
1217 default=False, | 1217 default=False, |
1218 action='store_true') | 1218 action='store_true') |
1219 result.add_option( | 1219 result.add_option( |
1220 '-c', '--component', | 1220 '-c', '--component', |
1221 help='The component to test against ' | 1221 help='The component to test against ' |
1222 '(most, vm, dartc, frog, frogsh, leg, chromium, dartium)', | 1222 '(most, vm, dartc, frog, frogsh, leg, chromium, dartium, ' |
| 1223 'webdriver)', |
1223 metavar='[most,vm,dartc,chromium,dartium]', | 1224 metavar='[most,vm,dartc,chromium,dartium]', |
1224 default='vm') | 1225 default='vm') |
1225 return result | 1226 return result |
1226 | 1227 |
1227 | 1228 |
1228 def ProcessOptions(options): | 1229 def ProcessOptions(options): |
1229 """Process command line options.""" | 1230 """Process command line options.""" |
1230 if options.arch == 'all': | 1231 if options.arch == 'all': |
1231 options.arch = 'ia32,x64,simarm' | 1232 options.arch = 'ia32,x64,simarm' |
1232 if options.mode == 'all': | 1233 if options.mode == 'all': |
(...skipping 19 matching lines...) Expand all Loading... |
1252 for mode in options.mode: | 1253 for mode in options.mode: |
1253 if not mode in ['debug', 'release']: | 1254 if not mode in ['debug', 'release']: |
1254 print 'Unknown mode %s' % mode | 1255 print 'Unknown mode %s' % mode |
1255 return False | 1256 return False |
1256 for arch in options.arch: | 1257 for arch in options.arch: |
1257 if not arch in ['ia32', 'x64', 'simarm', 'arm']: | 1258 if not arch in ['ia32', 'x64', 'simarm', 'arm']: |
1258 print 'Unknown arch %s' % arch | 1259 print 'Unknown arch %s' % arch |
1259 return False | 1260 return False |
1260 for component in options.component: | 1261 for component in options.component: |
1261 if not component in ['vm', 'dartc', 'frog', 'frogsh', 'leg', | 1262 if not component in ['vm', 'dartc', 'frog', 'frogsh', 'leg', |
1262 'chromium', 'dartium']: | 1263 'chromium', 'dartium', 'webdriver']: |
1263 print 'Unknown component %s' % component | 1264 print 'Unknown component %s' % component |
1264 return False | 1265 return False |
1265 options.flags = [] | 1266 options.flags = [] |
1266 options.flags.append('--ignore-unrecognized-flags') | 1267 options.flags.append('--ignore-unrecognized-flags') |
1267 if options.checked: | 1268 if options.checked: |
1268 options.flags.append('--enable_asserts') | 1269 options.flags.append('--enable_asserts') |
1269 options.flags.append('--enable_type_checks') | 1270 options.flags.append('--enable_type_checks') |
1270 if options.optimize: | 1271 if options.optimize: |
1271 options.flags.append('--optimize') | 1272 options.flags.append('--optimize') |
1272 for flag in options.flag: | 1273 for flag in options.flag: |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1522 for entry in timed_tests[:20]: | 1523 for entry in timed_tests[:20]: |
1523 t = FormatTime(entry.duration) | 1524 t = FormatTime(entry.duration) |
1524 print '%4i (%s) %s' % (index, t, entry.GetLabel()) | 1525 print '%4i (%s) %s' % (index, t, entry.GetLabel()) |
1525 index += 1 | 1526 index += 1 |
1526 | 1527 |
1527 return result | 1528 return result |
1528 | 1529 |
1529 | 1530 |
1530 if __name__ == '__main__': | 1531 if __name__ == '__main__': |
1531 sys.exit(Main()) | 1532 sys.exit(Main()) |
OLD | NEW |