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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 'webdriver, webdriverff, webdriverie, webdriverchrome)', |
Siggi Cherem (dart-lang)
2011/11/14 23:56:06
I'm not sure about adding so many components. Mayb
Emily Fortuna
2011/11/15 00:38:07
Sounds good. I like that better.
On 2011/11/14 23
| |
1224 metavar='[most,vm,dartc,chromium,dartium]', | 1224 metavar='[most,vm,dartc,chromium,dartium]', |
1225 default='vm') | 1225 default='vm') |
1226 return result | 1226 return result |
1227 | 1227 |
1228 | 1228 |
1229 def ProcessOptions(options): | 1229 def ProcessOptions(options): |
1230 """Process command line options.""" | 1230 """Process command line options.""" |
1231 if options.arch == 'all': | 1231 if options.arch == 'all': |
1232 options.arch = 'ia32,x64,simarm' | 1232 options.arch = 'ia32,x64,simarm' |
1233 if options.mode == 'all': | 1233 if options.mode == 'all': |
(...skipping 21 matching lines...) Expand all Loading... | |
1255 for mode in options.mode: | 1255 for mode in options.mode: |
1256 if not mode in ['debug', 'release']: | 1256 if not mode in ['debug', 'release']: |
1257 print 'Unknown mode %s' % mode | 1257 print 'Unknown mode %s' % mode |
1258 return False | 1258 return False |
1259 for arch in options.arch: | 1259 for arch in options.arch: |
1260 if not arch in ['ia32', 'x64', 'simarm', 'arm']: | 1260 if not arch in ['ia32', 'x64', 'simarm', 'arm']: |
1261 print 'Unknown arch %s' % arch | 1261 print 'Unknown arch %s' % arch |
1262 return False | 1262 return False |
1263 for component in options.component: | 1263 for component in options.component: |
1264 if not component in ['vm', 'dartc', 'frog', 'frogsh', 'leg', | 1264 if not component in ['vm', 'dartc', 'frog', 'frogsh', 'leg', |
1265 'chromium', 'dartium', 'frogium', 'webdriver']: | 1265 'chromium', 'dartium', 'frogium', 'webdriver', |
1266 'webdriverff', 'webdriverie', 'webdriverchrome']: | |
1266 print 'Unknown component %s' % component | 1267 print 'Unknown component %s' % component |
1267 return False | 1268 return False |
1268 options.flags = [] | 1269 options.flags = [] |
1269 options.flags.append('--ignore-unrecognized-flags') | 1270 options.flags.append('--ignore-unrecognized-flags') |
1270 if options.checked: | 1271 if options.checked: |
1271 options.flags.append('--enable_asserts') | 1272 options.flags.append('--enable_asserts') |
1272 options.flags.append('--enable_type_checks') | 1273 options.flags.append('--enable_type_checks') |
1273 if options.optimize: | 1274 if options.optimize: |
1274 options.flags.append('--optimize') | 1275 options.flags.append('--optimize') |
1275 for flag in options.flag: | 1276 for flag in options.flag: |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1525 for entry in timed_tests[:20]: | 1526 for entry in timed_tests[:20]: |
1526 t = FormatTime(entry.duration) | 1527 t = FormatTime(entry.duration) |
1527 print '%4i (%s) %s' % (index, t, entry.GetLabel()) | 1528 print '%4i (%s) %s' % (index, t, entry.GetLabel()) |
1528 index += 1 | 1529 index += 1 |
1529 | 1530 |
1530 return result | 1531 return result |
1531 | 1532 |
1532 | 1533 |
1533 if __name__ == '__main__': | 1534 if __name__ == '__main__': |
1534 sys.exit(Main()) | 1535 sys.exit(Main()) |
OLD | NEW |