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

Side by Side Diff: tools/test.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
« no previous file with comments | « no previous file | tools/test-runtime.dart » ('j') | tools/testing/dart/test_progress.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #library("test"); 6 #library("test");
7 7
8 #import("testing/dart/test_runner.dart"); 8 #import("testing/dart/test_runner.dart");
9 #import("testing/dart/test_options.dart"); 9 #import("testing/dart/test_options.dart");
10 10
(...skipping 18 matching lines...) Expand all
29 var optionsParser = new TestOptionsParser(); 29 var optionsParser = new TestOptionsParser();
30 List<Map> configurations = optionsParser.parse(new Options().arguments); 30 List<Map> configurations = optionsParser.parse(new Options().arguments);
31 if (configurations == null) return; 31 if (configurations == null) return;
32 32
33 // Extract global options from first configuration. 33 // Extract global options from first configuration.
34 var firstConf = configurations[0]; 34 var firstConf = configurations[0];
35 Map<String, RegExp> selectors = firstConf['selectors']; 35 Map<String, RegExp> selectors = firstConf['selectors'];
36 var maxProcesses = firstConf['tasks']; 36 var maxProcesses = firstConf['tasks'];
37 var progressIndicator = firstConf['progress']; 37 var progressIndicator = firstConf['progress'];
38 var verbose = firstConf['verbose']; 38 var verbose = firstConf['verbose'];
39 var printTiming = firstConf['time'];
39 40
40 var configurationIterator = configurations.iterator(); 41 var configurationIterator = configurations.iterator();
41 bool enqueueConfiguration(ProcessQueue queue) { 42 bool enqueueConfiguration(ProcessQueue queue) {
42 if (!configurationIterator.hasNext()) { 43 if (!configurationIterator.hasNext()) {
43 return false; 44 return false;
44 } 45 }
45 46
46 var conf = configurationIterator.next(); 47 var conf = configurationIterator.next();
47 if (selectors.containsKey('samples')) { 48 if (selectors.containsKey('samples')) {
48 queue.addTestSuite(new SamplesTestSuite(conf)); 49 queue.addTestSuite(new SamplesTestSuite(conf));
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 92 }
92 93
93 return true; 94 return true;
94 } 95 }
95 96
96 // Start process queue. 97 // Start process queue.
97 var queue = new ProcessQueue(maxProcesses, 98 var queue = new ProcessQueue(maxProcesses,
98 progressIndicator, 99 progressIndicator,
99 verbose, 100 verbose,
100 startTime, 101 startTime,
102 printTiming,
101 enqueueConfiguration); 103 enqueueConfiguration);
102 } 104 }
OLDNEW
« no previous file with comments | « no previous file | tools/test-runtime.dart » ('j') | tools/testing/dart/test_progress.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698