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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 help='Timeout in seconds', | 1161 help='Timeout in seconds', |
1162 default=None, | 1162 default=None, |
1163 type='int') | 1163 type='int') |
1164 result.add_option( | 1164 result.add_option( |
1165 '--checked', | 1165 '--checked', |
1166 help='Run tests in checked mode', | 1166 help='Run tests in checked mode', |
1167 default=False, | 1167 default=False, |
1168 action='store_true') | 1168 action='store_true') |
1169 result.add_option( | 1169 result.add_option( |
1170 '--flag', | 1170 '--flag', |
1171 help='Pass this additional flag to the VM', | 1171 help='Pass this additional flag to the VM or the program running the test'
, |
1172 default=[], | 1172 default=[], |
1173 action='append') | 1173 action='append') |
1174 result.add_option( | 1174 result.add_option( |
1175 '--arch', | 1175 '--arch', |
1176 help='The architecture to run tests for', | 1176 help='The architecture to run tests for', |
1177 metavar='[all,ia32,x64,simarm,arm]', | 1177 metavar='[all,ia32,x64,simarm,arm]', |
1178 default=ARCH_GUESS) | 1178 default=ARCH_GUESS) |
1179 result.add_option( | 1179 result.add_option( |
1180 '--os', | 1180 '--os', |
1181 help='The OS to run tests on', | 1181 help='The OS to run tests on', |
(...skipping 30 matching lines...) Expand all 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, webdriver)', |
1223 'webdriver)', | |
1224 metavar='[most,vm,dartc,chromium,dartium]', | 1223 metavar='[most,vm,dartc,chromium,dartium]', |
1225 default='vm') | 1224 default='vm') |
1226 return result | 1225 return result |
1227 | 1226 |
1228 | 1227 |
1229 def ProcessOptions(options): | 1228 def ProcessOptions(options): |
1230 """Process command line options.""" | 1229 """Process command line options.""" |
1231 if options.arch == 'all': | 1230 if options.arch == 'all': |
1232 options.arch = 'ia32,x64,simarm' | 1231 options.arch = 'ia32,x64,simarm' |
1233 if options.mode == 'all': | 1232 if options.mode == 'all': |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 for entry in timed_tests[:20]: | 1522 for entry in timed_tests[:20]: |
1524 t = FormatTime(entry.duration) | 1523 t = FormatTime(entry.duration) |
1525 print '%4i (%s) %s' % (index, t, entry.GetLabel()) | 1524 print '%4i (%s) %s' % (index, t, entry.GetLabel()) |
1526 index += 1 | 1525 index += 1 |
1527 | 1526 |
1528 return result | 1527 return result |
1529 | 1528 |
1530 | 1529 |
1531 if __name__ == '__main__': | 1530 if __name__ == '__main__': |
1532 sys.exit(Main()) | 1531 sys.exit(Main()) |
OLD | NEW |