Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: tools/test-runtime.dart

Issue 8845001: Add --time option to dart test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Runtime test script Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 // TODO(ager): Get rid of this version of test.dart when we don't have 6 // TODO(ager): Get rid of this version of test.dart when we don't have
7 // to worry about the special runtime checkout anymore. 7 // to worry about the special runtime checkout anymore.
8 8
9 #library("test"); 9 #library("test");
10 10
(...skipping 13 matching lines...) Expand all
24 var optionsParser = new TestOptionsParser(); 24 var optionsParser = new TestOptionsParser();
25 List<Map> configurations = optionsParser.parse(new Options().arguments); 25 List<Map> configurations = optionsParser.parse(new Options().arguments);
26 if (configurations == null) return; 26 if (configurations == null) return;
27 27
28 // Extract global options from first configuration. 28 // Extract global options from first configuration.
29 var firstConf = configurations[0]; 29 var firstConf = configurations[0];
30 Map<String, RegExp> selectors = firstConf['selectors']; 30 Map<String, RegExp> selectors = firstConf['selectors'];
31 var maxProcesses = firstConf['tasks']; 31 var maxProcesses = firstConf['tasks'];
32 var progressIndicator = firstConf['progress']; 32 var progressIndicator = firstConf['progress'];
33 var verbose = firstConf['verbose']; 33 var verbose = firstConf['verbose'];
34 var printTiming = firstConf['time'];
34 35
35 var configurationIterator = configurations.iterator(); 36 var configurationIterator = configurations.iterator();
36 bool enqueueConfiguration(ProcessQueue queue) { 37 bool enqueueConfiguration(ProcessQueue queue) {
37 if (!configurationIterator.hasNext()) { 38 if (!configurationIterator.hasNext()) {
38 return false; 39 return false;
39 } 40 }
40 41
41 var conf = configurationIterator.next(); 42 var conf = configurationIterator.next();
42 if (selectors.containsKey('standalone')) { 43 if (selectors.containsKey('standalone')) {
43 queue.addTestSuite(new StandaloneTestSuite(conf)); 44 queue.addTestSuite(new StandaloneTestSuite(conf));
(...skipping 18 matching lines...) Expand all
62 } 63 }
63 64
64 return true; 65 return true;
65 } 66 }
66 67
67 // Start process queue. 68 // Start process queue.
68 var queue = new ProcessQueue(maxProcesses, 69 var queue = new ProcessQueue(maxProcesses,
69 progressIndicator, 70 progressIndicator,
70 verbose, 71 verbose,
71 startTime, 72 startTime,
73 printTiming,
72 enqueueConfiguration); 74 enqueueConfiguration);
73 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698