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 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 default='true', | 1210 default='true', |
1211 type='choice') | 1211 type='choice') |
1212 result.add_option( | 1212 result.add_option( |
1213 '--optimize', | 1213 '--optimize', |
1214 help='Invoke dart compiler with --optimize flag', | 1214 help='Invoke dart compiler with --optimize flag', |
1215 default=False, | 1215 default=False, |
1216 action='store_true') | 1216 action='store_true') |
1217 result.add_option( | 1217 result.add_option( |
1218 '-c', '--component', | 1218 '-c', '--component', |
1219 help='The component to test against ' | 1219 help='The component to test against ' |
1220 '(most, vm, dartc, frog, frogsh, chromium, dartium)', | 1220 '(most, vm, dartc, frog, frogsh, leg, chromium, dartium)', |
1221 metavar='[most,vm,dartc,chromium,dartium]', | 1221 metavar='[most,vm,dartc,chromium,dartium]', |
1222 default='vm') | 1222 default='vm') |
1223 return result | 1223 return result |
1224 | 1224 |
1225 | 1225 |
1226 def ProcessOptions(options): | 1226 def ProcessOptions(options): |
1227 """Process command line options.""" | 1227 """Process command line options.""" |
1228 if options.arch == 'all': | 1228 if options.arch == 'all': |
1229 options.arch = 'ia32,x64,simarm' | 1229 options.arch = 'ia32,x64,simarm' |
1230 if options.mode == 'all': | 1230 if options.mode == 'all': |
(...skipping 18 matching lines...) Expand all Loading... |
1249 options.component = options.component.split(',') | 1249 options.component = options.component.split(',') |
1250 for mode in options.mode: | 1250 for mode in options.mode: |
1251 if not mode in ['debug', 'release']: | 1251 if not mode in ['debug', 'release']: |
1252 print 'Unknown mode %s' % mode | 1252 print 'Unknown mode %s' % mode |
1253 return False | 1253 return False |
1254 for arch in options.arch: | 1254 for arch in options.arch: |
1255 if not arch in ['ia32', 'x64', 'simarm', 'arm']: | 1255 if not arch in ['ia32', 'x64', 'simarm', 'arm']: |
1256 print 'Unknown arch %s' % arch | 1256 print 'Unknown arch %s' % arch |
1257 return False | 1257 return False |
1258 for component in options.component: | 1258 for component in options.component: |
1259 if not component in ['vm', 'dartc', 'frog', 'frogsh', | 1259 if not component in ['vm', 'dartc', 'frog', 'frogsh', 'leg', |
1260 'chromium', 'dartium']: | 1260 'chromium', 'dartium']: |
1261 print 'Unknown component %s' % component | 1261 print 'Unknown component %s' % component |
1262 return False | 1262 return False |
1263 options.flags = [] | 1263 options.flags = [] |
1264 options.flags.append('--ignore-unrecognized-flags') | 1264 options.flags.append('--ignore-unrecognized-flags') |
1265 if options.checked: | 1265 if options.checked: |
1266 options.flags.append('--enable_asserts') | 1266 options.flags.append('--enable_asserts') |
1267 options.flags.append('--enable_type_checks') | 1267 options.flags.append('--enable_type_checks') |
1268 if options.optimize: | 1268 if options.optimize: |
1269 options.flags.append('--optimize') | 1269 options.flags.append('--optimize') |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1519 for entry in timed_tests[:20]: | 1519 for entry in timed_tests[:20]: |
1520 t = FormatTime(entry.duration) | 1520 t = FormatTime(entry.duration) |
1521 print '%4i (%s) %s' % (index, t, entry.GetLabel()) | 1521 print '%4i (%s) %s' % (index, t, entry.GetLabel()) |
1522 index += 1 | 1522 index += 1 |
1523 | 1523 |
1524 return result | 1524 return result |
1525 | 1525 |
1526 | 1526 |
1527 if __name__ == '__main__': | 1527 if __name__ == '__main__': |
1528 sys.exit(Main()) | 1528 sys.exit(Main()) |
OLD | NEW |